dmm-package | R Documentation |
Dyadic mixed model analysis with multi-trait responses and pedigree-based partitioning of an individual random effect into a range of genetic and environmental (co)variance components for individual (ie direct) and maternal contributions to phenotype.
Package: | dmm |
Type: | Package |
Version: | 2.1-8 |
Date: | 2023-07-13 |
License: | GPL-2 |
This package provides tools for setting up and solving dyadic model equations leading to estimates of variance components and their standard errors, for transforming variance components to genetic parameters and their standard errors, and for computing genetic response to selection.
You may wish to use this package if you are looking for any of the following features in a quantitative genetic analysis:
suited to small multi-trait datasets with pedigree information
individual, maternal, and cohort environmental component estimates and standard errors
individual and maternal additive, dominance, epistatic, and sex-linked genetic component estimates and standard errors
cross-effect and cross-trait covariance components
multicollinearities among the components
genetic parameters (ie proportion of variance and correlation) and standard errors for all fitted components
genetic response to phenotypic selection for individual additive and maternal additive cases with autosomal and sexlinked components
data preparation tools
S3 methods to organize output
test example datasets
alternative approach to iterative ML and REML estimation procedures
component estimates equivalent to MINQUE (after fixed effects by OLS) and bias-corrected-ML (after fixed effects by GLS)
multi-trait or traitspairwise or traitsblockwise analyses
class-specific genetic parameters
maternal or paternal founderline components
The main functions in dmm are:
Sets up and solves dyadic model equations for a dataset which is supplied as a dataframe containing both the pedigree information and the observations
Checks the dataframe for compliance with dmm requirements, converts multi-trait data to a matrix within the dataframe, and optionally appends relationship matrices to the dataframe.
S3 method, reports estimated (co)variance components and standard errors
S3 method, reports reports (co)varianve components with standard erors, sorted into class-specific groups, so that thaey sum to phenotypic (co)variance within each group
S3 method, reports genetic parameters and standard errors
S3 method, reports genetic response to selection
S3 method, briefly reports output object from dmm()
S3 method, plots residuals for dyadic model fit
There are also some example datasets, some with 'known' answers:
A small balanced dataset showing agreement with aov in balanced case
A real dataset from Harvey(1960) with extensive fixed effects
A large real multi-trait dataset from a Merino sheep breeding experiment
A 2-trait dataset supplied with the QUERCUS program
A small 3-trait dataset used for demonstration
A univariate dataset supplied with the DFREML program
We also use the warcolak dataset from package nadiv
To use dmm one first must put the desired dataset into an R workspace as a dataframe object. The minimum requirement is for a dataframe with columns labelled :
Identifier for each individual
Identifier for the sire of each individual
Identifier for the dam of each individual
Sex code for each individual
Codes for levels of each fixed factor
Numeric values for each observation or trait
There are other requirements, and these are documented under the mdf()
help page, which also documents how to use mdf()
to convert the user's dataframe to an acceptable form, which can be either another dataframe or an object of class mdf
.
Given an acceptable data object, one simply calls function dmm()
with appropriate arguments, the first of which is the data object's name. There are formula
arguments to specify fixed effects and cohorts, and the components to be partitioned are specified in a simple vector of names. Arguments are documented under the dmm()
help page. An object of class dmm
is returned and should be saved in the R workspace.
Given a dmm
object, there are S3 methods to display the results as follows:
Reports fixed effect coefficient and (co)variance component estimates
Reports fixed effect coefficient and (co)variance component estimates with standard errors and confidence limits
Reports genetic parameters (proportion of variance and correlation) for each component partitioned
Reports genetic parameters with standard errors and confidence limits
reports genetic response to selection, for estimated parameters
These functions are documented on their help pages.
Other results (eg plots) may be obtained by accessing the dmm
object's attributes directly. See dmm.object
help page.
Neville Jackson
Maintainer: Neville Jackson <nanddjackson@bigpond.com>
dmmOverview.pdf
In the dmm
package
for dmm function arguments and return value
for fixed coefficients and (co)variance components
for genetic parameters
for predicted selection response
for comprehensive list of variance components
for data preparation
for brief print of dmm() output
for residual plots for dyadic model
Other R packages
pedigreemm
nadiv
varComp
minque
gremlin
library(dmm)
# simple univariate case, direct from the dataframe
data(dt8bal.df)
dt8.fit <- dmm(dt8bal.df, CWW ~ 1 + Sex,
components=c("VarE(I)","VarG(Ia)"))
summary(dt8.fit) # fixed effects and variance components
gsummary(dt8.fit) # heritability with se's
rm(dt8.fit)
rm(dt8bal.df)
# Note: 'dt8bal.df' is a small demo dataset. Results are
# illustrative but not meaningful.
# for more examples see 'dmm' help page and references
# for a tutorial and fully documented examples see 'dmmOverview.pdf'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.