example_data_mmdml: Generate data from partially linear mixed-effects model

Description Usage Arguments Value See Also Examples

View source: R/example_data_mmdml.R

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

1
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

1
## See example(mmdml) for examples

dmlalg documentation built on Feb. 3, 2022, 5:08 p.m.