nested_model_formulas: Create nested models formulas and corresponding data.frame

Description Usage Arguments Value Author(s)

View source: R/nested_model_formulas.R

Description

Create nested models formulas and corresponding data.frame

Usage

1
2
nested_model_formulas(formula, data, extra_formula, type = 3,
  test_intercept = FALSE, na.action)

Arguments

formula

Two-sided formula. Separate formulas (i.e., nested models) will be created for each model term on right side of this formula. For example, for mixed-effects models this should be the response (i.e., dependent) variable plus the fixed-effects.

data

data.frame passed to model.frame holding the variables in formula and extra_formula.

extra_formula

Optional one-sided formula that will be added to the resulting formulas. No separate formulas will be built based on this formula. For example, for mixed-effects model this should contain the random-effects.

type

Type of sums of squares. Currently only Type III (i.e., 3 or "III") are supported.

test_intercept

Logical. Should test for intercept be included in output? Default is FALSE

na.action

how NAs are treated. Passed to model.frame.

Value

List with three slots:

formulas

List of named formulas. First entry is the full_model, each following entry contains the formula for the full model after withholding one model term.

data

data.frame holding all variables used inthe formulas

reduced_formulas

Same as formulars, but without adding the extra_formula.

Author(s)

Henrik Singmann with contributions from Ben Bolker and Joshua Wiley.


singmann/monet documentation built on April 23, 2021, 3:02 a.m.