Learn R Programming

rotations (version 1.6.5)

region: Confidence and credible regions for the central orientation

Description

Find the radius of a \(100(1-\alpha)\)% confidence or credible region for the central orientation based on the projected mean or median. For more on the currently available methods see prentice, fisheretal, chang, zhang and bayesCR.

Usage

region(x, method, type, estimator, alp = NULL, ...)

# S3 method for Q4 region(x, method, type, estimator, alp = NULL, ...)

# S3 method for SO3 region(x, method, type, estimator, alp = NULL, ...)

Value

For frequentist regions only the radius of the confidence region centered at the specified estimator is returned. For Bayes regions the posterior mode and radius of the credible region centered at that mode is returned.

Arguments

x

\(n\times p\) matrix where each row corresponds to a random rotation in matrix (\(p=9\)) or quaternion (\(p=4\)) form.

method

character string specifying which type of interval to report, "bayes", "transformation" or "direct" based theory.

type

character string, "bootstrap" or "asymptotic" are available. For Bayes regions, give the type of likelihood: "Cayley","Mises" or "Fisher."

estimator

character string either "mean" or "median." Note that not all method/type combinations are available for both estimators.

alp

the alpha level desired, e.g. 0.05 or 0.10.

...

additional arguments that are method specific.

See Also

bayesCR, prentice, fisheretal, chang, zhang

Examples

Run this code
Rs <- ruars(20, rvmises, kappa = 10)

# Compare the region sizes that are currently available

region(Rs, method = "transformation", type = "asymptotic", estimator = "mean", alp = 0.1)
region(Rs, method = "transformation", type = "bootstrap", estimator = "mean",
alp = 0.1, symm = TRUE)
region(Rs, method = "direct", type = "bootstrap", estimator = "mean", alp = 0.1, m = 100)
region(Rs, method = "direct", type = "asymptotic", estimator = "mean", alp = 0.1)
# \donttest{
region(Rs, method = "Bayes", type = "Mises", estimator = "mean",
       S0 = mean(Rs), kappa0 = 10, tuneS = 5000, tuneK = 1, burn_in = 1000, alp = .01, m = 5000)
# }

Run the code above in your browser using DataLab