lmn_prof {LMN} | R Documentation |
Profile loglikelihood for the LMN model.
Description
Calculate the loglikelihood of the LMN model defined in lmn_suff()
at the MLE Beta = Bhat
and Sigma = Sigma.hat
.
Usage
lmn_prof(suff, noSigma = FALSE)
Arguments
suff |
An object of class |
noSigma |
Logical. If |
Value
Scalar; the calculated value of the profile loglikelihood.
Examples
# generate data
n <- 50
q <- 2
Y <- matrix(rnorm(n*q),n,q) # response matrix
X <- matrix(1,n,1) # covariate matrix
V <- exp(-(1:n)/n) # diagonal variance specification
suff <- lmn_suff(Y, X = X, V = V, Vtype = "diag") # sufficient statistics
# profile loglikelihood
lmn_prof(suff)
# check that it's the same as loglikelihood at MLE
lmn_loglik(Beta = suff$Bhat, Sigma = suff$S/suff$n, suff = suff)
[Package LMN version 1.1.3 Index]