Hi All, I am working on an example where the electric utility is investigating the effect of size of household and the type of air conditioning on electricity consumption. I fit a multiple linear regression
Electricity consumption=size of the house hold + air conditioning type There are 3 air conditioning types so I modeled them as a dummy variable Type A Type B Type C Where type A is the reference Below are the results Electricity consumption= 0.4 size of the household+ 0.95 type B -0.95 type C But when I look at the mean of the predicted values of electricity consumption by air conditioning type, this is what I get Type A 29.86 Type B 25.94 Type C 30.1 I calculated the above means by fitting a linear model as Electricity consumption= size of the household, without including the air conditioning type. Looked at the predicted valued of the response variable and calculated the mean of the predicted valued for each category. But you can see that the mean response for type B is lower than Type A(25.94 for type B and 29.86 for Type A) My question is the sign of the Beta’ in the regression model are not consistent with the means, for type B the beta is positive 0.95. Is this possible? In what circumstances this can happen? I appreciate your input. -- View this message in context: http://n4.nabble.com/regression-with-categorial-variables-tp1415633p1415633.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list 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.