fullfact-package {fullfact}R Documentation

Full Factorial Breeding Analysis

Description

Full factorial breeding designs are useful for quantifying the amount of additive genetic, nonadditive genetic, and maternal variance that explain phenotypic traits. Such variance estimates are important for examining evolutionary potential. Traditionally, full factorial mating designs have been analyzed using a two- way analysis of variance, which may produce negative variance values and is not suited for unbalanced designs. Mixed-effects models do not produce negative variance values and are suited for unbalanced designs. However, extracting the variance components, calculating significance values, and estimating confidence intervals and/or power values for the components are not straightforward using traditional analytic methods.

In this package we address these issues and facilitate the analysis of full factorial mating designs with mixed-effects models. The observed data functions extract the variance explained by random and fixed effects and provide their significance. We then calculate the additive genetic, nonadditive genetic, and maternal variance components explaining the phenotype. In particular, we integrate nonnormal error structures for estimating these components for nonnormal data types. The resampled data functions are used to produce bootstrap confidence intervals, which can then be plotted using a simple function. This package will facilitate the analyses of full factorial mating designs in R, especially for the analysis of binary, proportion, and/or count data types and for the ability to incorporate additional random and fixed effects and power analyses.

The package contains six vignettes containing detailed examples: browseVignettes(package="fullfact").

The paper associated with the package including worked examples is: Houde ALS, Pitcher TE. 2016. fullfact: an R package for the analysis of genetic and maternal variance components from full factorial mating designs. Ecology and evolution 6 (6), 1656-1665. doi: 10.1002/ece3.1943.

Details

The DESCRIPTION file:

Package: fullfact
Type: Package
Title: Full Factorial Breeding Analysis
Version: 1.5.2
Date: 2024-02-04
Author: Aimee Lee Houde [aut, cre], Trevor Pitcher [aut]
Maintainer: Aimee Lee Houde <aimee.lee.houde@gmail.com>
Depends: R (>= 3.6)
Imports: lme4, afex
VignetteBuilder: knitr
Suggests: knitr, rmarkdown
Description: We facilitate the analysis of full factorial mating designs with mixed-effects models. The package contains six vignettes containing detailed examples.
License: GPL (>=2)

Index of help topics:

JackGlmer               Jackknife components for non-normal data
JackGlmer2              Jackknife components for non-normal data 2
JackGlmer3              Jackknife components for non-normal data 3
JackLmer                Jackknife components for normal data
JackLmer2               Jackknife components for normal data 2
JackLmer3               Jackknife components for normal data 3
barMANA                 Bargraph of confidence intervals
boxMANA                 Boxplot of resampled results
buildBinary             Convert to a binary data frame
buildMulti              Convert to a multinomial frame
chinook_bootL           Chinook salmon length, bootstrap calculations
chinook_bootS           Chinook salmon survival, bootstrap data
chinook_jackL           Chinook salmon length, jackknife data
chinook_jackS           Chinook salmon survival, jackknife data
chinook_length          Chinook salmon length, raw data
chinook_resampL         Chinook salmon length, bootstrap resampled
chinook_resampS         Chinook salmon survival, bootstrap resampled
chinook_survival        Chinook salmon survival, raw data
ciJack                  Jackknife confidence intervals
ciJack2                 Jackknife confidence intervals 2
ciJack3                 Jackknife confidence intervals 3
ciMANA                  Bootstrap confidence intervals
ciMANA2                 Bootstrap confidence intervals 2
ciMANA3                 Bootstrap confidence intervals 3
fullfact-package        Full Factorial Breeding Analysis
observGlmer             Variance components for non-normal data
observGlmer2            Variance components for non-normal data 2
observGlmer3            Variance components for non-normal data 3
observLmer              Variance components for normal data
observLmer2             Variance components for normal data 2
observLmer3             Variance components for normal data 3
powerGlmer              Power analysis for non-normal data
powerGlmer2             Power analysis for non-normal data 2
powerGlmer3             Power analysis for non-normal data 3
powerLmer               Power analysis for normal data
powerLmer2              Power analysis for normal data 2
powerLmer3              Power analysis for normal data 3
resampFamily            Bootstrap resample within families
resampGlmer             Bootstrap components for non-normal data
resampGlmer2            Bootstrap components for non-normal data 2
resampGlmer3            Bootstrap components for non-normal data 3
resampLmer              Bootstrap components for normal data
resampLmer2             Bootstrap components for normal data 2
resampLmer3             Bootstrap components for normal data 3
resampRepli             Bootstrap resample within replicates

Author(s)

Aimee Lee Houde [aut, cre], Trevor Pitcher [aut]

Maintainer: Aimee Lee Houde <aimee.lee.houde@gmail.com>

References

Traditional full factorial breeding design analysis:

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

Residual variance component values for generalized linear mixed-effects models:

Nakagawa S, Schielzeth H. 2010. Repeatability for Gaussian and non-Gaussian data: a practical guide for biologists. Biological Reviews 85(4): 935-956. DOI: 10.1111/j.1469-185X.2010.00141.x

Fixed effect variance component values for mixed-effects models:

Nakagawa S, Schielzeth H. 2013. A general and simple method for obtaining R2 from generalized linear mixed-effects models. Methods in Ecology and Evolution 4(2): 133-142. DOI: 10.1111/j.2041-210x.2012.00261.x

Confidence intervals (bootstrap resampling, bias and acceleration correction, jackknife resampling):

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

Martin, H., Westad, F. & Martens, H. (2004). Imporved Jackknife Variance Estimates of Bilinear Model Parameters. COMPSTAT 2004 – Proceedings in Computational Statistics 16th Symposium Held in Prague, Czech Republic, 2004 (ed J. Antoch), pp. 261-275. Physica-Verlag HD, Heidelberg.

Data sources:

Pitcher TE, Neff BD. 2007. Genetic quality and offspring performance in Chinook salmon: implications for supportive breeding. Conservation Genetics 8(3):607-616. DOI: 10.1007/s10592-006-9204-z

Examples

data(chinook_length) #Chinook salmon offspring length

## Standard additive genetic, non-additive genetic, and maternal variance analysis

length_mod1<- observLmer(observ=chinook_length,dam="dam",sire="sire",response="length")
length_mod1

## Confidence intervals

##Bootstrap resampling of data: replicates within family
## Not run: resampRepli(dat=chinook_length,copy=c(3:8),family="family",replicate="repli",
iter=1000)
## End(Not run)
#saves the files in working directory: one for each replicate and
#one final (combined) file "resamp_datR.csv"

##Import file
#length_datR<- read.csv("resamp_datR.csv")
data(chinook_resampL) #same as length_datR, 5 iterations

##Models for the resampled data: standard analysis
## Not run: length_rcomp<- resampLmer(resamp=length_datR,dam="dam",sire="sire",
response="length",start=1,end=1000)
## End(Not run)

## 1. Uncorrected Bootstrap 95% confidence interval

#ciMANA(comp=length_rcomp)
data(chinook_bootL)  #similar to length_rcomp, but 1,000 models
ciMANA(comp=chinook_bootL)

## 2. Bias and accelerated corrected Bootstrap 95% confidence interval

##Jackknife resampling of data, delete-one: for acceleration estimate
## Not run: length_jack<- JackLmer(observ=chinook_length,dam="dam",sire="sire",
response="length")
## End(Not run)

#ciMANA(comp=length_rcomp,bias=c(0,0.7192,0.2030),accel=length_jack)
data(chinook_jackL)  #similar to length_jack, but all observations
ciMANA(comp=chinook_bootL,bias=c(0,0.7192,0.2030),accel=chinook_jackL)

##3. Jackknife 95% confidence interval

#ciJack(comp=length_jack,full=c(0,0.7192,0.2030,1.0404))
ciJack(comp=chinook_jackL,full=c(0,0.7192,0.2030,1.0404))

[Package fullfact version 1.5.2 Index]