Re: [R] Problem of intercept?

2023-02-22 Thread varin sacha via R-help
Dear Peter, Bert and Timothy, Really appreciated your help. I guess Peter's comments were the nearest of what I was trying to do. I have tried but it still does not work. I mean the graph is showing the coefficients I am not expecting ! I will try to explain.  Starting from the equation : Y =

Re: [R] Problem of intercept?

2023-02-22 Thread peter dalgaard
Not sure what you are trying to do here. The immediate issue is that you are getting 'y' on the RHS, because that is the 1st column in Dataset. So "for (i in 2:3)" might be closer to intention. However, a 0/1 regresson with no intercept implies that the mean for the "0" group is zero, and

Re: [R] Problem of intercept?

2023-02-21 Thread Bert Gunter
Sigh... In a linear model with qualitative predictor variables, models with and without intercepts are just different parameterizations of the *same* model. -- they produce exactly the same predicted responses. So what do you mean? Search on "contrasts in linear models R" and similar for an