Learn R Programming

scorematchingad (version 0.1.1)

vMF: Score Matching Estimator for the von-Mises Fisher Distribution

Description

In general the normalising constant in von Mises Fisher distributions is hard to compute, so mardia2016sc;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 mardia2016scscorematchingad. For maximum likelihood estimators of the von Mises Fisher distribution, which all use approximations of the normalising constant, consider movMF::movMF().

Usage

vMF(Y, paramvec = NULL, method = "Mardia", w = rep(1, nrow(Y)))

Value

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.

Arguments

Y

A matrix of multivariate observations in Cartesian coordinates. Each row is a multivariate measurement (i.e. each row corresponds to an individual).

paramvec

smfull method only: Optional. A vector of same length as the dimension, representing the elements of the \(\kappa \mu\) vector.

method

Either "Mardia" or "hybrid" for the hybrid score matching estimator from mardia2016sc;textualscorematchingad or "smfull" for the full score matching estimator.

w

An optional vector of weights for each measurement in Y

von Mises Fisher Model

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 @p169, @mardia2000discorematchingad, allowing for estimating \(\mu\) and \(\kappa\) separately.

Details

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.

References

See Also

Other directional model estimators: Bingham(), FB(), vMF_robust()

Examples

Run this code
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")

Run the code above in your browser using DataLab