Learn R Programming

rotations (version 1.6.5)

bayesCR: Bayes credible regions

Description

Find the radius of a \(100(1-\alpha)\)% credible region for the central orientation and concentration parameter using non-informative Bayesian methods.

Usage

bayesCR(x, type, S0, kappa0, tuneS, tuneK, burn_in, m = 5000, alp = 0.1)

# S3 method for SO3 bayesCR(x, type, S0, kappa0, tuneS, tuneK, burn_in, m = 5000, alp = 0.1)

# S3 method for Q4 bayesCR(x, type, S0, kappa0, tuneS, tuneK, burn_in, m = 5000, alp = 0.1)

Value

list of

  • Shat,Qhat Mode of the posterior distribution for the central orientation S

  • Radius Radius of the credible region centered at the posterior mode

Arguments

x

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

type

Angular distribution assumed on R. Options are Cayley, Fisher or Mises

S0

initial estimate of central orientation

kappa0

initial estimate of concentration parameter

tuneS

central orientation tuning parameter, concentration of proposal distribution

tuneK

concentration tuning parameter, standard deviation of proposal distribution

burn_in

number of draws to use as burn-in

m

number of draws to keep from posterior distribution

alp

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

Details

Compute the radius of a \(100(1-\alpha)\)% credible region for the central orientation and concentration parameter as described in bingham2009b and bingham2010. The posterior mode is returned along with the radius of the credible region centered at the posterior mode.

bingham2009b bingham2010

See Also

fisheretal, prentice, chang, zhang

Examples

Run this code
#Not run due to time constraints
# \donttest{
Rs <- ruars(20, rvmises, kappa = 10)

#Compare the region size of the moment based theory mean estimator to the
#Bayes region.

region(Rs, method = "direct", type = "theory", estimator = "mean", alp=0.1, m = 100)
bayesCR <- region(Rs, type = "Mises", method = "Bayes", estimator = "mean", S0 = mean(Rs),
                   kappa0 = 10, tuneS = 5000, tuneK = 1, burn_in = 1000, alp = .01, m = 5000)

bayesCR$Radius       #Region size is give by "Radius"
bayesCR$Shat         #The Bayes region is centered around the posterior mode: "Shat"# }

Run the code above in your browser using DataLab