cat2Table.Rd
This function makes a table of fitted values and confidence intervals for all of the combinations of two categorical variables in an interaction.
cat2Table(eff.obj, digits = 2, rownames = NULL, colnames = NULL)
eff.obj | An object generated by |
---|---|
digits | Number of digits of the fitted values and confidence intervals to print. |
rownames | An optional vector of row names for the table, if
|
colnames | An optional vector of column names for the table, if
|
A matrix of fitted values and confidence intervals
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)#> bc prof wc #> (31.7,56.3] "32.13" "100.64" "35.91" #> "(17.21,47.05)" "(79.34,121.94)" "(21.31,50.50)" #> (56.3,81.1] "40.63" "61.09" "31.21" #> "(32.37,48.88)" "(53.15,69.02)" "(17.28,45.13)" #> (6.93,31.7] "41.43" "69.72" "25.64" #> "(14.17,68.68)" "(53.84,85.59)" "(5.61,45.66)"