algebra: Algebra for Predicted Marginal Group Means

Description Usage Arguments Value Examples

View source: R/algebra.R

Description

Extracts a table displaying how the predicted marginal group means would be calculated based on the specified design matrix and a set of regression coefficients. Also displays the algebra for the overall group mean averaging over all groups.

Usage

1
algebra(dm)

Arguments

dm

An object of class designmatrix.

Value

A data frame giving the combinations of grouping variables and then the sums of the regression coefficients needed to predict the marginal group means based on the specified design matrix. The final row (separated by '-') shows the sums over the regression coefficients for the predicted overal average.

Examples

1
2
3
# Example with R data set 'PlantGrowth'
dm = designmatrix( PlantGrowth, list( 'weight', 'group' ) )
df = algebra( dm )

rettopnivek/designmatrix documentation built on Jan. 13, 2020, 7:09 p.m.