sim_nbglmm: sim_nbglmm

sim_nbglmmR Documentation

sim_nbglmm

Description

Simulated counts data from a NB-GLMM for a single trait

Usage

data(sim_nbglmm)

Format

A data.frame sim_nbglmm containing the following columns:

Mean:

numeric containing the base mean computed as the linear combination of the simulated fixed and random effect weights multiplied by their respective weight matrices.

Mean.Count:

numeric containing the integer count values randomly sampled from a negative binomail distribution with mean = Mean and dispersion = r

r:

numeric containing the dispersion value used to simulate the integer counts in Mean.Count.

Intercept:

numeric of all 1s which can be used to set the intercept term in the X design matrix.

FE1:

numeric a binary fixed effect variable taking on values [0, 1]

FE2:

numeric a continuous fixed effect variables

RE1:

numeric a random effect variable with 10 levels

RE2:

numeric a random effect variable with 7 levels

Details

Data are simulated counts from 50 samples in a single data frame, from which the X and Z design matrices, can be constructed (see examples). There are 2 random effects and 2 fixed effect variables used to simulate the count trait.

Examples

data(sim_nbglmm)
head(sim_nbglmm)


MikeDMorgan/miloR documentation built on Oct. 19, 2024, 8:39 p.m.