Hi Gregory, thank you so much for your answer, the use of estimable() gave
me interesting hints.
Following the same small example as before, I observed that fit.contrast
and estimable give the same response when contrasting A vs D in the
categorial variable x (differences among groups at the
Dear R-users,
I want to fit a linear model with Y as response variable and X a categorical
variable (with 4 categories), with the aim of comparing the basal category of X
(category=1) with category 4. Unfortunately, there is another categorical
variable with 2 categories which interact with x
Hello Berta,
gmodels::fit.contrasts() simply performs a single-variable contrast
using the model you have specified. To perform the more involved
contrasts that you are describing, there are two approaches:
1) use the estimable() function in the gmodels package.
gmodels::estimable()
3 matches
Mail list logo