aicVC  R Documentation 
Select genetic variance components via Akaike's information criterion (AIC).
aicVC(y, x, v = list(E=diag(length(y))), initpar, k = 2, init = 1, keep = 1,
direction = c("forward", "backward"), nit = 25, msg = FALSE,
control = list(), hessian = FALSE)
y 
A numeric vector or a numeric matrix of one column (representing a phenotype for instance). 
x 
A data frame or matrix, representing covariates if not missing. 
v 
A list of variance components of interest. Note:

initpar 
Optional initial parameter values. 
k 
Penalty on a parameter. The selection criterion is the known "AIC" if 
init 
Indicates which variance components for the initial model. By default, 
keep 
Indicator of which variance components should be forced into the final model. By default, 
direction 
The mode of search. Either "forward" or "backward" with default "forward". 
nit 
Maximum number of iterations for optimization. Ignored if there are not more than two variance components. 
msg 
A logical variable. True if one wants to track the process for monitoring purpose. 
control 
A list of control parameters to be passed to 
hessian 
Logical. Should a numerically differentiated Hessian matrix be returned? 
In genomewide association studies (GWAS), random effects are usually added to a model to account for polygenic variation. Abney et al (2000) showed that five variance components including the most interesting additive and dominance variance components are potentially induced by polygenes. The above function is intended for selecting variance components that contribute "most" to a quantitative trait.
Function estVC
is called by the above function to estimate the parameters and maximum likelihood in each model. Refer to estVC
for more information.
aic 
AIC of the final model. 
model 
Gives parameter estimates, loglikihood, and other information. 
lik 
Loglikelihood of the model selected at each intermediate step. 
trace 
Indicates which variance components were selected at each intermediate step. 
estVC
for more information.
data(miscEx)
## Not run:
# forward selection
# any variance component will be selected
# if AIC improve by 1e5 or larger
pheno< pdatF8[!is.na(pdatF8$bwt) & !is.na(pdatF8$sex),]
ii< match(rownames(pheno), rownames(gmF8$AA))
v< list(A=gmF8$AA[ii,ii], D=gmF8$DD[ii,ii])
o< aicVC(y=pheno$bwt, x=pheno$sex, k=0, v=v, msg=TRUE)
o
# forward selection
of< aicVC(y=pheno$bwt, x=pheno$sex, v=v, k=1/2,
direction="for", msg=TRUE)
of
# backward elimination
ob< aicVC(y=pheno$bwt, x=pheno$sex, v=v, k=1/2, init=1:2,
direction="back", msg=TRUE)
ob
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.