Learn R Programming

QTLRel (version 0.1)

aicVC: AIC Model Selection

Description

Select genetic variance components via Akaike's information criterion (AIC).

Usage

aicVC(y, x, v = vector("list", 6), initpar, k=2, init = 6, keep = 6,
   direction=c("forward","backward"), nit = 25, verbose = FALSE,
   method = c("Nelder-Mead", "BFGS", "CG", "SANN"), control = list(),
   hessian = FALSE)

Arguments

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 (AA, DD, HH, AD, MH, EE, ...) where "AA" and "DD" are respectively additive and dominance genetic matrices, "HH", "AD" and "MH" are other genetic matrices that one may be interested in (see "details"), "EE" is the residual ma
initpar
optional initial parameter values.
k
penalty on a parameter. The selection criterion is the known "AIC" if k = 2 and is "BIC" if k = log(n) where "n" is the sample size.
init
indicator of the initial model pertaining to genetic variance components. For instance, c(1,2,6) indicates the initial model includes "AA", "DD" and "EE". By default, only "EE" is considered.
keep
indicator of which variance components should be forced into the final model. The default is "EE".
direction
the mode of search. Either "forward" or "backward" with default "forward".
nit
number of iterations to call optim for optimization.
verbose
a logical variable. True if ones wants to track the process for monitoring purpose.
method
the optimization method to be used. See optim for details.
control
a list of control parameters to be passed to optim.
hessian
logical. Should a numerically differentiated Hessian matrix be returned?

Value

  • aicAIC of the final model.
  • modelgives parameter estimates, log-likihood, and other information.
  • liklog-likelihood of the model selected at each intermediate step.
  • traceindicates which variance components were selected at each intermediate step.

Details

In genome-wide 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.

References

Abney, M., M. S. McPeek, and C. Ober (2000). Estimation of variance components of quantitative traits in inbred populations. Am. J. Hum. Genet. 141, 629-650.

See Also

estVC and genoImpute for more information.

Examples

Run this code
data(miscEx)

vv<- v
vv[3]<- vv[4]<- vv[5] <- list(NULL)

# forward selection
# any variance component will be selected
# if AIC improve by 1e-5 or larger
o<- aicVC(y,x,k=0,v=vv)
o

# forward selection
of<- aicVC(y, x, v=vv, k=1/2, init=6, direction="for",
   verbose=TRUE)
of

# backward elimination
ob<- aicVC(y, x, v=vv, k=1/2, keep=6, direction="back",
   verbose=TRUE)
ob

Run the code above in your browser using DataLab