Learn R Programming

fullfact (version 1.0)

JackLmer: Jackknife 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

JackLmer(observ, dam, sire, response, ml = F, size = 1, first = NULL)

Arguments

observ
Data frame of observed 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.
ml
Default is FALSE for restricted maximum likelihood. Change to TRUE for maximum likelihood.
size
Default is 1 for delete-one jackknife resampling. If size > 1, delete-d jackknife resampling occurs removing a block d equal to size.
first
Number of initial sub-samples to run. Useful for examing if there is variation among sub-samples before jackknife resampling the entire data set. There can be little varitation for delete-one jackknife resampling with large data sets, and delete-d jackknife resampling should be considered.

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 total number of observations (N) for delete-one jackknife resampling or M groups for delete-d jackknife resampling to the lowest integer. Each row represents a deleted single observation or deleted d observations group.

Details

Uses delete-one jackknife resampling (Efron & Tibshirani 1993, p. 141-145). For the option of delete-d jackknife resampling, the rows of the observed data frame are shuffled and a block of observations of size d is deleted sequentially. 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

Efron B, Tibshirani R. 1993. An introduction to the Bootstrap. Chapman and Hall, New York.

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

See Also

JackLmer2, JackLmer3

Examples

Run this code
data(chinook_length) #Chinook salmon offspring length

#Delete-one
#length_jack1<- JackLmer(observ=chinook_length,dam="dam",sire="sire",response="length")
length_jack1<- JackLmer(observ=chinook_length,dam="dam",sire="sire",response="length",
first=2) #first 2

#Delete-d, d=5
#length_jack1.2<- JackLmer(observ=chinook_length,dam="dam",sire="sire",response="length",
#size=5)
length_jack1.2<- JackLmer(observ=chinook_length,dam="dam",sire="sire",response="length",
size=5,first=2) #first 2

Run the code above in your browser using DataLab