calcLL | R Documentation |
Calculate the log likelihood for a given value of the heritability, hsq
.
calcLL(hsq, Kva, y, X, reml = TRUE, use_cpp = TRUE)
hsq |
heritability |
Kva |
eigenvalues of K (calculated by |
y |
rotated phenotypes (calculated by |
X |
rotated covariate matrix (calculated by |
reml |
If TRUE, use REML; otherwise use ordinary maximum likelihood. |
use_cpp |
= if TRUE, use c++ version of code |
The log likelihood value, with the corresponding estimates
of beta
and sigmasq
included as attributes.
data(recla)
e <- eigen_rotation(recla$kinship, recla$pheno[,1], recla$covar)
loglik <- calcLL(0.5, e$Kva, e$y, e$X)
many_loglik <- calcLL(seq(0, 1, by=0.1), e$Kva, e$y, e$X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.