vMF | R Documentation |
In general the normalising constant in von Mises Fisher distributions is hard to compute, so \insertCitemardia2016sc;textualscorematchingad suggested a hybrid method that uses maximum likelihood to estimate the mean direction and score matching for the concentration.
We can also estimate all parameters using score matching (smfull
method), although this estimator is likely to be less efficient than the hybrid estimator.
On the circle the hybrid estimators were often nearly as efficient as maximum likelihood estimators \insertCitemardia2016scscorematchingad.
For maximum likelihood estimators of the von Mises Fisher distribution, which all use approximations of the normalising constant, consider movMF::movMF()
.
vMF(Y, paramvec = NULL, method = "Mardia", w = rep(1, nrow(Y)))
Y |
A matrix of multivariate observations in Cartesian coordinates. Each row is a multivariate measurement (i.e. each row corresponds to an individual). |
paramvec |
|
method |
Either "Mardia" or "hybrid" for the hybrid score matching estimator from \insertCitemardia2016sc;textualscorematchingad or "smfull" for the full score matching estimator. |
w |
An optional vector of weights for each measurement in |
The full score matching estimator (method = "smfull"
) estimates \kappa \mu
.
The hybrid estimator (method = "Mardia"
) estimates \kappa
and \mu
separately.
Both use cppad_closed()
for score matching estimation.
A list of est
, SE
and info
.
est
contains the estimates in vector form, paramvec
, and with user friendly names k
and m
.
SE
contains estimates of the standard errors if computed. See cppad_closed()
.
info
contains a variety of information about the model fitting procedure and results.
The von Mises Fisher density is proportional to
\exp(\kappa \mu^T z),
where z
is on a unit sphere,
\kappa
is termed the concentration,
and \mu
is the mean direction unit vector.
The effect of the \mu
and \kappa
can be decoupled in a sense \insertCite@p169, @mardia2000discorematchingad, allowing for estimating \mu
and \kappa
separately.
Other directional model estimators:
Bingham()
,
FB()
,
vMF_robust()
if (requireNamespace("movMF")){
Y <- movMF::rmovMF(1000, 100 * c(1, 1) / sqrt(2))
movMF::movMF(Y, 1) #maximum likelihood estimate
} else {
Y <- matrix(rnorm(1000 * 2, sd = 0.01), ncol = 2)
Y <- Y / sqrt(rowSums(Y^2))
}
vMF(Y, method = "smfull")
vMF(Y, method = "Mardia")
vMF(Y, method = "hybrid")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.