This function is adapted from example 7.1 of Rabe-Hesketh et al. (2008). It also procides heritability estimate and confidence intervals.

1 |

`model` |
a linear mixed model formula, see example below |

`random` |
random effect, see exampe below |

`data` |
data to be analyzed |

`seed` |
random number seed |

`n.sim` |
number of simulations |

`verbose` |
a flag for printing out results |

The returned value is a list containing:

`lme.result` |
the linear mixed model result |

`h2` |
the heritability estimate |

`CL` |
confidence intervals |

Rabe-Hesketh S, Skrondal A, Gjessing HK. Biometrical modeling of twin and family data using standard mixed model software. Biometrics 2008, 64:280-288

Adapted from f.mbf.R from the paper

Jing Hua Zhao

1 2 3 4 5 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.