simulateModel: Simulate a new data set

View source: R/simulation_functions.R

simulateModelR Documentation

Simulate a new data set

Description

simulateModel() builds a new model set with a specified number of levels of a specified random effect.

Usage

simulateModel(model, data, n_want, simvar, fixed_effects)

Arguments

model

lme4 model: starting mixed model used for simulation

data

data frame: data used to inform the simulation

n_want

integer: how many levels should the new model be based on?

simvar

character element: name of the varaible containing the random effect levels

fixed_effects

vector containing variable names used as fixed effects

Value

A modified mixed model


DejanDraschkow/mixedpower documentation built on Feb. 16, 2024, 7:58 a.m.