PolyGenius
Contents

LinearComparison

Internal linear-model comparison family

Comparison family for continuous outcomes (family key "lm"). It supports the incremental, heterogeneity and contrast types. Incremental and heterogeneity compare nested lm fits with an F-test (anova), reporting the change in R-squared for incremental. Contrast takes pairwise Wald contrasts of the predictor effect across groups.by levels.

Super class

PolyGenius::ComparisonFamily -> LinearComparison

Methods

Public methods

  • LinearComparison$new()
  • LinearComparison$validate.context()
  • LinearComparison$prepare.data()
  • LinearComparison$clone()

Method new()

Create the family (key set by the class).

Usage

LinearComparison$new()

Method validate.context()

Check the resolved frame supports the requested comparison.

Usage

LinearComparison$validate.context(frame, cell, fit.specs, type)

Arguments

frame — data.table resolved from the study.

cell — Fit-cell list.

fit.specs — Extra fitting options.

type — Comparison type.

Returns

TRUE, invisibly, or an abort.

Method prepare.data()

Build the complete-case data and role names for fitting.

Usage

LinearComparison$prepare.data(frame, cell, fit.specs)

Arguments

frame — data.table resolved from the study.

cell — Fit-cell list.

fit.specs — Extra fitting options.

Returns

A list of fit inputs.

Method clone()

The objects of this class are cloneable with this method.

Usage

LinearComparison$clone(deep = FALSE)

Arguments

deep — Whether to make a deep clone.

See Also