Description Usage Arguments Details Value Author(s) See Also Examples
This function computes an approximation (AELRTESS) to the expecation of the likelihood ratio test statistic from a pedRSP object and uses this to calculate power. This function uses the effective number of sibpairs approximation.
1 | computeAELRTESS(pedRSP, truehsq, null, sig.level = 0.05)
|
pedRSP |
a pedRSP object computed using the computeRSPs function |
truehsq |
a vector of at least length 1 of the true heritability. Exactly one of truehsq and null must have length 1. |
null |
a vector of at least length 1 of the null hypothesis heritability. |
sig.level |
a scalar of the significance level of the hypothesis test |
This function calculates the approximate ELRT/power from a pedRSP object using only the actual study size and the variance of the log-eigenvalues. This approximation is usually a good approximation for intermediate levels of heritability. When heritability is small or large, it can be overly conservative (under estimate power/ELRT). See paper for more details
a pedELRT object with the approximated ELRT and power.
Jesse D. Raffa
1 2 3 4 5 6 7 8 9 | require(kinship2)
test1 <- data.frame(id =c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14),
mom =c(0, 0, 0, 0, 2, 2, 4, 4, 6, 2, 0, 0, 12, 13),
dad =c(0, 0, 0, 0, 1, 1, 3, 3, 3, 7, 0, 0, 11, 10),
sex =c(1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 2, 2))
tped <- with(test1, pedigree(id, dad, mom, sex))
x <- computeRSPs(ped=tped)
elrtess <- computeAELRTESS(pedRSP=x,truehsq=0.3,null=seq(0.1,0.8,0.1))
plot(elrtess)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.