Learn R Programming

fido (version 1.0.4)

loglikMaltipooCollapsed: Calculations for the Collapsed Maltipoo Model

Description

Functions providing access to the Log Likelihood, Gradient, and Hessian of the collapsed maltipoo model. Note: These are convenience functions but are not as optimized as direct coding of the MaltipooCollapsed C++ class due to a lack of Memoization. By contrast function optimMaltipooCollapsed is much more optimized and massively cuts down on repeated calculations. A more efficient Rcpp module based implementation of these functions may following if the future. For model details see optimMaltipooCollapsed documentation

Usage

loglikMaltipooCollapsed(Y, upsilon, Theta, X, KInv, U, eta, ell, sylv = FALSE)

gradMaltipooCollapsed(Y, upsilon, Theta, X, KInv, U, eta, ell, sylv = FALSE)

hessMaltipooCollapsed(Y, upsilon, Theta, X, KInv, U, eta, ell, sylv = FALSE)

Value

see below

  • loglikMaltipooCollapsed - double

  • gradMaltipooCollapsed - vector

  • hessMaltipooCollapsed- matrix

Arguments

Y

D x N matrix of counts

upsilon

(must be > D)

Theta

D-1 x Q matrix the prior mean for regression coefficients

X

Q x N matrix of covariates

KInv

D-1 x D-1 symmetric positive-definite matrix

U

a PQxQ matrix of stacked variance components

eta

matrix (D-1)xN of parameter values at which to calculate quantities

ell

P-vector of scale factors for each variance component (aka VCScale)

sylv

(default:false) if true and if N < D-1 will use sylvester determinant identity to speed computation