Learn R Programming

fullfact (version 1.0)

resampLmer: Bootstrap components for normal data

Description

Extracts additive genetic, non-additive genetic, and maternal variance components from a linear mixed-effect model using the lmer function of the lme4 package. Model random effects are dam, sire, and dam by sire.

Usage

resampLmer(resamp, dam, sire, response, start, end, ml = F)

Arguments

resamp
Data frame of bootstrap resampled data.
dam
Column name containing dam(female) parent identity information.
sire
Column name containing sire(male) parent identity information.
response
Column name containing the offspring (response) phenotype values.
start
Starting model number.
end
Ending model number.
ml
Default is FALSE for restricted maximum likelihood. Change to TRUE for maximum likelihood.

Value

A data frame with columns containing the raw variance components for dam, sire, dam by sire, residual, total, additive genetic, non-additive genetic, and maternal. The number of rows in the data frame matches the number of iterations in the resampled data set and each row represents a model number.

Details

Used for bootstrap resampled data set produced using resampRepli or resampFamily. Extracts the dam, sire, dam, dam by sire, and residual variance components. Calculates the total variance component. Calculates the additive genetic, non-additive genetic, and maternal variance components (see Lynch and Walsh 1998, p. 603).

References

Bolker BM, Brooks ME, Clark CJ, Geange SW, Poulsen JR, Stevens MHH, White J-SS. 2009. Generalized linear mixed models: a practical guide for ecology and evolution. Trends in Ecology and Evolution 24(3): 127-135. DOI: 10.1016/j.tree.2008.10.008

Lynch M, Walsh B. 1998. Genetics and Analysis of Quantitative Traits. Sinauer Associates, Massachusetts.

See Also

resampLmer2, resampLmer3

Examples

Run this code
data(chinook_resampL) #5 iterations

#length_rcomp1<- resampLmer(resamp=length_datR,dam="dam",sire="sire",response="length",
#start=1,end=1000)
length_rcomp1<- resampLmer(resamp=chinook_resampL,dam="dam",sire="sire",response="length",
start=1,end=5)

Run the code above in your browser using DataLab