lmn_prof | R Documentation |
Calculate the loglikelihood of the LMN model defined in lmn_suff()
at the MLE Beta = Bhat
and Sigma = Sigma.hat
.
lmn_prof(suff, noSigma = FALSE)
suff |
An object of class |
noSigma |
Logical. If |
Scalar; the calculated value of the profile loglikelihood.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.