findFormFuns: 'findFormFuns' used by averageObs to calculate proper...

View source: R/merData.R

findFormFunsR Documentation

findFormFuns used by averageObs to calculate proper averages

Description

The purpose is to properly derive data for the average observation in the data by being 'aware' of formulas that contain interactions and/or function calls. For example, in the old behavior, if the formula contained a square term specified as I(x^2), we were returning the mean of x(^2) not the square of mean(x).

Usage

findFormFuns(merMod, origData = NULL)

Arguments

merMod

the merMod object from which to draw the average observation

origData

(default=NULL) a data frame containing the original, untransformed data used to call the model. This MUST be specified if the original variables used in formula function calls are NOT present as 'main effects'.

Value

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


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