R/estimHeritPar.R

Defines functions estimHeritPar

estimHeritPar <- function(rawResid, Delta, Phi, blkID)
## Finds the maximum likelihood estimator of the polygenic heritability 
## parameter. 'rawResid' is a vector of raw residuals, 'Delta' a censoring 
## indicator, 'Phi' a kinship matrix, and 'blkID' a vector identifying 
## correlated groups of observations.
{
    herit <- optimize(likeHeritPar, interval=c(0, 1), rawResid=rawResid, 
                      Delta=Delta, Phi=Phi, blkID=blkID)$min
    return(herit)
}

Try the gyriq package in your browser

Any scripts or data that you put into this service are public.

gyriq documentation built on May 2, 2019, 2:39 a.m.