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

getData

Get an object's data.


Description

Get the data associated with a model object.

Usage

getData(object)

getData(object) <- value

Arguments

object

a fitted model object (e.g. an object of class merMod or lm).

value

a new data.frame to replace the old one. The new data will be stored in the newData attribute.

Details

Looks for data in the following order:

  1. The object's newData attribute, if it has been set by simr.

  2. The data argument of getCall(object), in the environment of formula(object).

Value

A data.frame with the required data.

Examples

lm1 <- lmer(y ~ x + (1|g), data=simdata)
X <- getData(lm1)

simr

Power Analysis for Generalised Linear Mixed Models by Simulation

v1.0.5
GPL (>= 2)
Authors
Green Peter [aut, cre] (<https://orcid.org/0000-0002-0238-9852>), MacLeod Catriona [aut], Alday Phillip [ctb]
Initial release

We don't support your browser anymore

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