SIMpoisson_glmm_simple: Simulation function for a Poisson model with fixed mean and...

Description Usage Arguments Details Author(s) Examples

View source: R/SIMpoisson_glmm_simple.R

Description

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.

Usage

1
SIMpoisson_glmm_simple(nk, theta, n)

Arguments

nk

integer, number of datasets to be simulated

theta

numeric, parameter vector. theta = c(lambda, sigma)

n

integer, number of observations

Details

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.

Author(s)

Johanna Bertl

Examples

1
2
3
SIMpoisson_glmm_simple(10, c(1,0.5), 100)

simDataGLMM(clus=10, rep=1, fixedMean=rep(c(-5,5), each=5), fixedCoef=NULL, fixedMat=NULL, covM = 1, disFam=poisson())

johannabertl/ApproxML documentation built on May 22, 2019, 2:19 p.m.