[R] Regressing the residuals on the country dummies

Mark Leeds markleeds2 at gmail.com
Fri Oct 2 08:03:48 CEST 2015


Hi: You'd have to provide a dput of "model2" and "Country" for anyone to
give a definitive answer but my guess is that you have an orthogonal X
matrix which is causing you to fit the
model perfectly which causes the model residuals to be zero.

Also, you didn't explain what you're doing but modelling residuals by using
purely factors doesn't sound like something one would want to do ? I could
be mistaken since
I don't know the context but  you should explain what exactly what your
goal is and your reasoning for doing what you're doing.








On Thu, Oct 1, 2015 at 3:15 PM, Johanna von Bahr <johanna.vonbahr at gmail.com>
wrote:

> I’m trying to estimate a model regressing the residuals on the country
> dummies as follows;
> model.resC <- lm(model2$res ~ as.factor(Country))
> summary(model.resC)
>
> As I call the model I get the following results regarding the residuals:
>
> "ALL 90 residuals are 0: no residual degrees of freedom!"
>
> What has gone wrong?
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

	[[alternative HTML version deleted]]



More information about the R-help mailing list