randomObs: Select a random observation from model data

View source: R/merData.R

randomObsR Documentation

Select a random observation from model data

Description

Select a random observation from the model frame of a merMod

Usage

randomObs(merMod, varList, seed = NULL)

Arguments

merMod

an object of class merMod

varList

optional, a named list of conditions to subset the data on

seed

numeric, optional argument to set seed for simulations

Details

Each factor variable in the data frame has all factor levels from the full model.frame stored so that the new data is compatible with predict.merMod

Value

a data frame with a single row for a random observation, but with full factor levels. See details for more.


merTools documentation built on May 29, 2024, 7:05 a.m.