I am trying to run a one-factor model of two regressors. One is a category (group: other, Africa, oecd, etc.) and the other one is expected living time(lifeExpF). When I run the command:

m1 = lm(lifeExpF~group,data = UN11)

It only gives me:

            Estimate Std. Error t value Pr(>|t|)    
(Intercept)   82.446      1.128  73.095  < 2e-16 ***
groupother    -7.120      1.271  -5.602  7.1e-08 ***
groupafrica  -22.674      1.420 -15.968  < 2e-16 ***

I am not sure why it gives me only two levels: groupother, groupafrica. In my factor "group", there are 3 levels: other, africa and oecd.

Do you know why the summary does not give me "groupoecd"?

Thank you!


The levels of the categorical predictor variable in this example are being evaluated as treatment contrasts, the default in R. Thus the "Intercept" is the value of lifeExpF for the reference level of Group, evidently oecd. The other coefficients represent the differences in lifeExpF from that reference level for the other 2 levels. You need to pay attention to how categorical variables are evaluated as not all statistical software may use the same defaults.


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.