Learn R Programming

BayesBrainMap (version 0.1.3)

LL2_kappa: Compute part of kappa log-likelihood

Description

Compute part of log-likelihood involving kappa (or kappa_q) for numerical optimization

Usage

LL2_kappa(
  kappa,
  Amat,
  Fmat,
  Gmat,
  GFinvG,
  OplusW,
  u,
  v,
  C1 = 1/(4 * pi),
  Q = NULL
)

Value

Value of log-likelihood at logkappa

Arguments

kappa

Value of kappa for which to compute log-likelihood

Amat

Mesh projection matrix

Fmat

Matrix used in computation of SPDE precision

Gmat

Matrix used in computation of SPDE precision

GFinvG

Matrix used in computation of SPDE precision

OplusW

Sparse matrix containing estimated values of RHS of trace in part 2 of log-likelihood. In common smoothness model, represents the sum over q=1,...,Q.

u

Vector needed for part 3 of log-likelihood

v

Vector needed for part 3 of log-likelihood

C1

For the unit variance case, \(\tau^2 = C1/\kappa^2\), where \(C1 = 1/(4\pi)\) when \(\alpha=2\), \(\nu=1\), \(d=2\)

Q

Equal to the number of networks for the common smoothness model, or NULL for the network-specific smoothness model

Details

This is the function to be maximized in order to determine the MLE for \(\kappa\) or the \(\kappa_q\)'s in the M-step of the EM algorithm in spatial model. In the model where \(\kappa_q\) can be different for each network \(q\), the optimization function factorizes over the \(\kappa_q\)'s. This function computes the value of the part of the optimization function pertaining to one of the \(\kappa_q\)'s.