Learn R Programming

QTLRel (version 0.1)

mAIC: Multiple QTL AIC

Description

Multiple QTL model selection by AIC criterion.

Usage

mAIC(y, x, gdat, prdat = NULL, vc=NULL, chrIdx, xin, k=2,
   direction=c("both","backward", "forward"), nit=25,
   ext=FALSE, verbose=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.
gdat
genotype data. Should be a matrix or a data frame, with each row representing an observation and each column a marker locus. The column names should be marker names. Ignored if prdat is an object from ge
vc
an object from estVC or aicVC, or an estimated variance-covariance matrix induced by relatedness. The scan will assume no polygenic variation if vc
prdat
an object from genoProb.
chrIdx
chromsome index of markers in columns of gdat if given. Ignored if prdat is an object from genoProb.
xin
vector indicating whether a locus is already in the model.
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.
direction
the mode of search: "both", "forward" or "backward" with default "both".
nit
number of iterations to call optim for optimization.
ext
a logical variable. True if ones wants more exhaustive search.
verbose
a logical variable. True if ones wants to track the process for monitoring purpose.

Value

  • a list with the following components: model: the resulting model; aic: AIC of the model; snp: selected SNPs. xin: vector indicating whether a SNP is selected.

Details

Makes use of "Haley-Knott" method (Haley and Knott 1992) if prdat is an object from genoProb.

References

Haley, C. S., and S. A. Knott (1992). A simple regression method for mapping quantitative trait loci in line crosses using flanking markers. Heredity 69: 315-324.

See Also

optim, genoProb and aicVC.

Examples

Run this code
data(miscEx)

gdat.imp<- genoImpute(gdat, gmap=genMap, step=Inf,
   gr=2, na.str=NA)
y<- rnorm(20)
x<- sample(c("M","F"),20,replace=TRUE)
v<- cov(matrix(rnorm(500*20),ncol=20))
o<- estVC(y, x, v = list(AA=v,DD=NULL,HH=NULL,AD=NULL,
   MH=NULL,EE=diag(20)))

gdtmp<- (gdat=="AA") + (gdat=="AB")*2 + (gdat=="BB")*3
   gdtmp<- replace(gdtmp,is.na(gdtmp),0)
prDat<- genoProb(gdat=gdtmp, gmap=genMap, step=Inf,
   gr=2, method="Haldane", verbose=TRUE)

# not run
llk.hk<- scanOne(y=y, x=x, prdat=prDat, vc=o)
xin<- llk.hk$lr > 1.5
mg<- mAIC(y=y, x=x, prdat=prDat, vc=o, xin=xin,
   k=1.5,direction="back", nit=50, verbose=TRUE)
mg$model$value # likelihood of the final model

Run the code above in your browser using DataLab