example_data_mmdml {dmlalg}R Documentation

Generate data from partially linear mixed-effects model

Description

Generate data from a partially linear mixed-effects model with one or two fixed effects, 2 random effects, and 3 nonparametric variables. The true underlying function of the nonparametric variables are step functions. The random effects and error terms are from a Gaussian distribution.

Usage

example_data_mmdml(beta0, N = 10L, n = 5L)

Arguments

beta0

Numeric vector of length 1 or 2 representing the linear coefficient/fixed effects of the model.

N

Number of experimental units. Equals 10 per default.

n

Expected number of observations per experimental unit, needs to be at least 5. Equals 5 per default.

Value

A data frame with the columns resp (the response), id and cask (random effects), w1, w2, and w3 (nonparametric confounders), and x1 if beta0 is of length 1 and x1 and x2 if beta0 is of length 2. The random effects are modelled with "(1|id) + (1|cask:id)".

See Also

mmdml

Examples

## See example(mmdml) for examples

[Package dmlalg version 1.0.2 Index]