Learn R Programming

scorematchingad (version 0.1.1)

Bingham: Score Matching Estimators for the Bingham Distribution

Description

Score matching estimators for the Bingham distribution's parameter matrix. Two methods are available: a full score matching method that estimates the parameter matrix directly and a hybrid method by mardia2016sc;textualscorematchingad that uses score matching to estimate just the eigenvalues of the parameter matrix.

Usage

Bingham(Y, A = NULL, w = rep(1, nrow(Y)), method = "Mardia")

Value

A list of est, SE and info.

  • est contains the estimated matrix A and a vector form, paramvec, of A (ordered according to c(diag(A)[1:(p-1)], A[upper.tri(A)]) ). For the Mardia method, the estimated eigenvalues of A (named evals) and eigenvectors of A (named G) are also returned.

  • 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).

A

For full score matching only: if supplied, then NA elements of A are estimated and the other elements are fixed. For identifiability the final element of diag(A) must be NA.

w

An optional vector of weights for each measurement in Y

method

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

Details

The Bingham distribution has a density proportional to $$\exp(z^T A z),$$ where \(A\) is a symmetric matrix and the trace (sum of the diagonals) of \(A\) is zero for identifiability @p181, @mardia2000discorematchingad.

The full score matching method estimates all elements of \(A\) directly except the final element of the diagonal, which is calculated from the sum of the other diagonal elements to ensure that the trace of \(A\) is zero.

The method by mardia2016sc;textualscorematchingad first calculates the maximum-likelihood estimate of the eigenvectors \(G\) of \(A\). The observations Y are then standardised to Y\(G\). This standardisation corresponds to diagonalising \(A\) where the eigenvalues of \(A\) become the diagonal elements of the new \(A\). The diagonal elements of the new \(A\) are then estimated using score matching, with the final diagonal element calculated from the sum of the other elements. See mardia2016sc;textualscorematchingad for details.

References

See Also

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

Examples

Run this code
p <- 4
A <- rsymmetricmatrix(p)
A[p,p] <- -sum(diag(A)[1:(p-1)]) #to satisfy the trace = 0 constraint
if (requireNamespace("simdd")){
  Y <- simdd::rBingham(100, A)
  Bingham(Y, method = "Mardia")
}

Run the code above in your browser using DataLab