Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

randomObs

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

Tools for Analyzing Mixed Effect Regression Models

v0.5.2
GPL (>= 2)
Authors
Jared E. Knowles [aut, cre], Carl Frederick [aut], Alex Whitworth [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.