Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/rmvtnorm.pedigree.R

Simulates residual multivariate t-distributed response data from a pedigree where the additive genetic, dominance genetic, and shared environmental effects are taken into account.

1 | ```
rmvt.pedigree(n = 1, pedigree, h2 = 0, c2 = 0, d2 = 0, df = 1)
``` |

`n` |
numeric. The number of simulations to generate |

`pedigree` |
a |

`h2` |
numeric. The heritability |

`c2` |
numeric. The environmentability |

`d2` |
numeric. The dominance deviance effect |

`df` |
numeric. The degrees of freedom for the t distribution |

The three parameters should have a sum: h2+c2+d2 that is less than 1. The total variance is set to 1, and the mean is zero.

Returns a matrix with the simulated values with n columns (one for each simulation) and each row matches the corresponding individual from the pedigree

Claus Ekstrom claus@rprimer.dk

1 2 3 4 5 6 7 8 9 10 11 | ```
library(kinship2)
library(mvtnorm)
mydata <- data.frame(id=1:5,
dadid=c(NA, NA, 1, 1, 1),
momid=c(NA, NA, 2, 2, 2),
sex=c("male", "female", "male", "male", "male"),
famid=c(1,1,1,1,1))
relation <- data.frame(id1=c(3), id2=c(4), famid=c(1), code=c(1))
ped <- pedigree(id=mydata$id, dadid=mydata$dadid, momid=mydata$momid,
sex=mydata$sex, relation=relation)
rmvt.pedigree(2, ped, h2=.25, df=4)
``` |

MESS documentation built on May 29, 2017, 2:39 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.