Description Usage Arguments Value Author(s) References Examples

View source: R/remlfunctions.R

An R function to generate a simulated data set with given parameters, model, and data structure.

1 | ```
lmm.simudata(formula, data = list(), v, b, SimuNum = NULL)
``` |

`formula` |
A linear mixed model formula |

`data` |
A data frame. It can be default. |

`v` |
A vector of preset variance components |

`b` |
A vector of present fixed effects. |

`SimuNum` |
The number of simulations. The default number is 200. |

Return a simulated data set which is a matrix.

Jixiang Wu <[email protected]>

Rao, C.R. 1971. Estimation of variance and covariance components-MINQUE theory. J Multiva Ana 1:19

Rao, C. R. and Kleffe, J. 1980. Estimation of variance components. In Handbook of Statistics. Vol. l: 1-40. Krishnaiah, P. R. ed. New York. North-Holland.

Searle, S. R., Casella, G. and McCulloch, C. E. 1992. Variance Components. John Wiley & Sons, Inc. New York.

Wu J (2012) GenMod: An R package for various agricultural data analyses. ASA, CSSA, and SSSA 2012 International Annual Meetings, Cincinnati, OH, p 127

Wu J., Bondalapati K., Glover K., Berzonsky W., Jenkins J.N., McCarty J.C. 2013. Genetic analysis without replications: model evaluation and application in spring wheat. Euphytica. 190:447-458

Zhu J. 1989. Estimation of Genetic Variance Components in the General Mixed Model. Ph.D. Dissertation, NC State University, Raleigh, U.S.A

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
library(minque)
data(ncii)
lmm.inf=lmm.check(Yld~1|Female*Male+Rep,data=ncii)
lmm.inf ##there are five variance components
v=c(20,20,20,20,20) ##there are five variance components
b=as.vector(100) ##there is only population mean as fixed effect
Y=lmm.simudata(Yld~1|Female*Male+Rep,data=ncii,v=v,b=b,SimuNum=50)
#End
``` |

minque documentation built on May 29, 2017, 3:51 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.