2

This is the model: lme(score ~ 0 + rule, random=~1|subject, data=mydata) My response variable is called score, my explanatory variable is called rule. The same subjects were tested on all the rules, so random=~1|subject accounts for the subject effect. Can someone explain to me: what is 0 in this model and why it is needed there? Note: this code was advised to me, I did not come up with it myself (I am still a beginner).

1 Answers1

2

0 stands in R for removing the intercept, as well as -1. Why almost always you want to include intercept is well answered here: When is it ok to remove the intercept in a linear regression model?

I can imagine one reason you'd be interested in removing intercept, that's when you scale your variables, please see: Interpreting the Intercept in a Regression Model

  • 2
    Another reason to drop the intercept is when 'rule' is categorical, in that case you find (when droppig the intercept) the average score for each value of rule as the coefficients (and taking into account the repeated measures by suject (random=~1|subject)). –  Aug 21 '16 at 17:10