mAIC: Multiple QTL AIC

View source: R/aic.R

mAICR Documentation

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"), ext = FALSE, msg = 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. Numeric coding of genotype is treated as numeric. Ignored if prdat is an object from genoProb.

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 is NULL.

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".

ext

A logical variable. True if ones wants more exhaustive search.

msg

A logical variable. True if ones wants to track the process for monitoring purpose.

Details

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

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.

Note

Currently only suitable for advanced intercross lines (or diallelic data).

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

data(miscEx)

## Not run: 
# impute missing genotypes
pheno<- pdatF8[!is.na(pdatF8$bwt) & !is.na(pdatF8$sex),]
ii<- match(rownames(pheno), rownames(gdatF8))
geno<- gdatF8[ii,]
ii<- match(rownames(pheno), rownames(gmF8$AA))
v<- list(A=gmF8$AA[ii,ii], D=gmF8$DD[ii,ii])

gdat.imp<- genoImpute(geno, gmap=gmapF8,
   gr=8, na.str=NA)
# estimate variance components
o<- estVC(y=pheno$bwt, x=pheno$sex, v=v)

# run 'genoProb'
gdtmp<- geno
   gdtmp<- replace(gdtmp,is.na(gdtmp),0)
prDat<- genoProb(gdat=gdtmp, gmap=gmapF8,
   gr=8, method="Haldane", msg=TRUE)

# genome scan
llk.hk<- scanOne(y=pheno$bwt, x=pheno$sex, prdat=prDat, vc=o)
xin<- llk.hk$LRT > 10

# run 'mAIC' based on genome scan results
mg<- mAIC(y=pheno$bwt, x=pheno$sex, prdat=prDat, vc=o, xin=xin,
   k=5, direction="back", msg=TRUE)
mg$model$value # likelihood of the final model

## End(Not run)

QTLRel documentation built on Aug. 9, 2023, 1:07 a.m.

Related to mAIC in QTLRel...