FallenApple
- 564
- 61
So what if my response variable, y, is say a scale. For example, ranking, something like 1-10. How would I transform the response to make linear regression work?
Oh ok got it. But why the mid point, is it because the rankings are evenly spaced? so 1 becomes 0.05.andrewkirk said:Do a glm where the response variable is uniformly distributed on [0,1] and the link function is the cdf of the standard normal.
Code response variable values 1,...,10 as 0.05, 0.15,...,0.95.
glm(y~x1+x2+ ... + xn, family=quasi(link = "probit", variance = "constant"))
We need to apply ##\Phi## to the sum of regressors.FallenApple said:So Prob( Z < transformed(y))= sum of regressors?
n<-length(levels(fac))
y.transformed<- (2 * fac.int - 1) / (2 * n)
Oh ok. I'll research into the probit glm.What about dichotomizing it? Would that hurt?andrewkirk said:I think the code would be something like
But I am not completely sure about the variance argument. Unfortunately, the R documentation on the 'quasi' family is almost non-existent. Best to try it and see what happens.We need to apply ##\Phi## to the sum of regressors.Code:glm(y~x1+x2+ ... + xn, family=quasi(link = "probit", variance = "constant"))
If you have an ordered factor variable fac and the vector of corresponding integer values is fac.int then the transformation would be
Code:n<-length(levels(fac)) y.transformed<- (2 * fac.int - 1) / (2 * n)
You could also try searching 'Ordinal regression', which is the term for what you are trying to do.
Yes, it depends on what you are trying to achieve.FallenApple said:So it depends on context if I can do this?
andrewkirk said:Yes, it depends on what you are trying to achieve.