README.md

Litter Diallel

Summary

This package includes functions for reproducing the analysis in our litter diallel manuscript.

Installation

You can install litterDiallel using the following steps. First, please make sure devtools is installed in R.

  1. Install MCMCglmm (for compatibility, must be version 2.25) in R:

    R devtools::install_version("MCMCglmm", version = "2.25", repos = "http://cran.us.r-project.org")

  2. Install litterDiallel (with the vignette, recommended):

    R devtools::install_github("mauriziopaul/litterDiallel", build_vignettes=TRUE, build = TRUE, build_opts = c("--no-resave-data", "--no-manual"))

    or

    Install litterDiallel (without the vignette).

    R devtools::install_github("mauriziopaul/litterDiallel")

Using the Package

  1. You should then be able to load the package in R:

    R library(litterDiallel)

  2. To load the data set, litters, use:

    R data("litters")

  3. For an overview of the analysis, see the vignette:

    R browseVignettes("litterDiallel")

Analysis Summary

The included data file, litter-diallel.csv, has the following column names, where each of 4,448 observed litters is represented by a single row. All counts represent animals that are observed at the time of weaning (~ 3 weeks after birth):

The order of the columns in the data set does not matter.

We use the functions diallelMatrixMaker and diallelMatrixMakeAndRotate to generate design matrices for modeling the different classes of effects. After reading in the data, these functions expect: the name of the data frame object, the dam column name, the sire column name, and two random effect (batch, batch.1) column names.

We then use the MCMCglmm function from the MCMCglmm package (version 2.25) to analyze our data by fitting (generalized) linear mixed models, including the overdispersed zero-truncated Poisson, binomial, or Gaussian model.

Notes



mauriziopaul/litterDiallel documentation built on June 3, 2022, 12:39 a.m.