Description Usage Arguments Details Author(s) Examples
View source: R/SIMCRNpoisson_glmm_simple.R
The function simulates data under a Poisson model with fixed mean lambda and a random intercept with with distribution N(0, sigma^2)
. For each of the nk
simulated datasets, a vector of summary statistics is computed, consisting of the mean and an estimate of the dispersion based on the Pearson statistic (sum of the squared Pearson residuals) of this model. The function is designed to estimate theta by the approximate maximum likelihood algorithm in KDKW.FD
or KDKW.SP
.
1 | SIMCRNpoisson_glmm_simple(nk, theta, seed, n)
|
nk |
integer, number of datasets to be simulated |
theta |
numeric, parameter vector. theta = c(lambda, sigma) |
seed |
integer. Seed to simulate the random effect and poisson distributed response. |
n |
integer, number of observations |
The simulations are obtained with the given seed (designed for the use of Common Random Numbers in the Approximate Maximum Likelihood Algorithm).
SIMpoisson_glmm_simple uses simGLMM::simDataGLMM.
This function might be replaced by a more flexible function based on simGLMM::simDataGLMMdesign that uses a design matrix.
Johanna Bertl
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.