cat2Table: Fitted Values and CIs for 2-Categorical Interactions

Description Usage Arguments Value Author(s) Examples

Description

This function makes a table of fitted values and confidence intervals for all of the combinations of two categorical variables in an interaction.

Usage

1
cat2Table(eff.obj, digits = 2, rownames = NULL, colnames = NULL)

Arguments

eff.obj

An object generated by effect from the effects package where the effect is calculated for two factors involved in an interaction.

digits

Number of digits of the fitted values and confidence intervals to print.

rownames

An optional vector of row names for the table, if NULL, the levels of the factor will be used

colnames

An optional vector of column names for the table, if NULL, the levels of the factor will be used

Value

A matrix of fitted values and confidence intervals

Author(s)

Dave Armstrong

Examples

1
2
3
4
5
6
library(effects)
data(Duncan, package="carData")
Duncan$inc.cat <- cut(Duncan$income, 3)
mod <- lm(prestige ~ inc.cat*type + income, data=Duncan)
e1 <- effect("inc.cat*type", mod)
cat2Table(e1)

DAMisc documentation built on Jan. 12, 2022, 1:07 a.m.