SIMpoisson_glmm_regr: Simulation function for a Poisson model with one random...

Description Usage Arguments Details Functions Author(s) See Also

View source: R/SIMpoisson_glmm_regr.R

Description

The function simulates data under a Poisson model with given explanatory variables x and parameter vector theta, consisting of the coefficients of the fixed effects, beta, and sigma, the standard deviation of a single random effect with distribution N(0, sigma^2). For each of the nk simulated datasets, a vector of summary statistics is computed, consisting of the regression coefficients estimated in a Poisson model without random effects, 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
2
3
4
5
SIMpoisson_glmm_regr(nk, theta, x)

SIMpoisson_glmm_beta(nk, theta, sigma, x)

SIMpoisson_glmm_sigma(nk, theta, beta, x)

Arguments

nk

integer, number of datasets to be simulated

theta

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

x

numeric matrix, explanatory variables

Details

SIMpoisson_glmm uses glm to obtain the summary statistics. This probably has a lot of overhead and could maybe be replaced by a faster alternative.

Functions

Author(s)

Johanna Bertl

See Also


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