0
$\begingroup$

Using R I have fit some data to a model of the form y~A*B where A is a factor with levels A1, A2, ..., A5 and similarly with B.

I am using a different contrast than the default, so the results do not come out in terms of the original factor levels. I would like to take the estimates of the intercept and the contrasts and convert those back into estimates of the factor levels.

Is there a package or function for doing that? Also, perhaps more importantly, is there a standard name for doing that? If I just knew what it was called then I could probably track it down on my own, but I don’t even know the right terminology.

$\endgroup$
1
$\begingroup$

The term is estimated marginal means. In R there is a package emmeans that does exactly this. Once you have the estimated marginal means then you can further use those to calculate different contrasts than the contrasts that were originally specified in the model.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.