Skip to content

Commit 213ec1f

Browse files
built vignette
1 parent ada8899 commit 213ec1f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

SimFit.Rproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ LineEndingConversion: Posix
1919
BuildType: Package
2020
PackageUseDevtools: Yes
2121
PackageInstallArgs: --no-multiarch --with-keep.source
22-
PackageRoxygenize: rd,collate,namespace
22+
PackageRoxygenize: rd,collate,namespace,vignette

vignettes/ACEsimFit.Rmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ library(ACEsimFit)
1919
```
2020

2121
## Overview
22+
2223
This package is designed for
2324
1) Simulating kin pairs data based on the assumption that every trait is affected by genetic effects (A), common environmental effects (C) and unique environmental effects (E).
2425
2) Using kin pairs data to fit an ACE model and get model fit output.
@@ -57,12 +58,14 @@ kindata <- kinsim_double(
5758
)
5859
head(kindata)
5960
```
61+
6062
Now you can see we have a data.frame with 180 pairs of simulated twins. And we also have their variance components and other information.
6163

6264
## Calculate the power of the heritability estimate given the variance structure
6365
Generally, calculating power for the A estimate had two approaches: likelihood theory and the least squares theory.
6466

6567
### Calculate power based on likelihood theory
68+
6669
To use the likelihood theory, we need to simulate a number of datasets with the same variance structure and average the suggested power from each set of data. See a more detailed explanation at [link](http://www.people.vcu.edu/~bverhulst/power/power.html). So we need to have a set of model fitting results with the -2ll values for the ACE model and the CE model.
6770

6871
Luckily, in our package they have a function `Sim_Fit` to simulate kin pairs data, fit them automatically into a ACE model and return the model summary results. The function fit the ACE model with the help of `OpenMx` package.

0 commit comments

Comments
 (0)