R: QTL Variance

qtlVar {QTLRel} | R Documentation

## QTL Variance

### Description

Estimate variance in a quantitative trait induced by QTL.

### Usage

    qtlVar(lrt, prdat, simulation = FALSE, nsim = 25)

### Arguments

`lrt` | A data frame (a, d, ...), where 'a' and 'd' are respectively additive and dominance effects.
`prdat` | A 3-D array that provides probabilities of genotypes "AA", "AB" and "BB". If `prDat` is an object of `genoProb`, then `prdat` can be `prDat$pr`.
`simulation` | Whether to use simulations to estimate the variance explained by QTL.
`nsim` | Number of simulations to perform if `simulation` is TRUE.

### Value

A vector displaying the estimated variance at each loci.

### Note

Correlations among observations are ignored, and this function should be used with caution.

### See Also

`scanOne` and `genoProb`

### 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])

    gdtmp<- geno
       gdtmp<- replace(gdtmp,is.na(gdtmp),0)
    # rung 'genoProb'
    prDat<- genoProb(gdat=gdtmp, gmap=gmapF8, step=Inf,
       gr=8, method="Haldane", msg=TRUE)
    # estimate variance components
    o<- estVC(y=pheno$bwt, x=pheno$sex, v=v)

    # genome scan
    pv.hk<- scanOne(y=pheno$bwt, x=pheno$sex, prdat=prDat, vc=o)

    # run 'qtlVar'
    qef<- NULL
    for(n in 1:length(pv.hk$par))
       qef<- rbind(qef,pv.hk$par[[n]][c("a","d")])
       qef<- as.data.frame(qef)
    qtlVar(qef,prDat$pr)[1:3]

    ## End(Not run)

[Package QTLRel version 1.0 Index]