I have squared root the dependent variable to deal with the non-normally distributed residuals. The dependent variable is measured in centimetres, so the values for the dependent variable are greater than 0. All the independent variables are dummy variables. My sample size is 1000. After running the linear regression and estimating the margins, I transformed the margins back to the original values. I have used this command:
generate generate sqrtindep1=sqrt(indep1)
repress dependent i.sqrtindep1 i.indep2 i.indep3 i.indep4
margins sqrtindep1, expression(predict(xb)^2)"
I have read also instead of transforming the dependent variable I can use glm with link power and then estimate margins. However, the estimated margins from glm are different from the liner regression. Any advice why the margins are different and which model is more appropriate?
glm dependent i.indep1 i.indep2 i.indep3 i.indep4 , link(power 0.5)
margins indep1
Related Posts with Linear regression
It seems that we cannot use tuples in tuples?I try to use tuples in the loop of tuples, however, it got some error: invalid 'y2' Does anyone know…
Histogram with dummiesHi I want to do a Histogram, which shows how many percentage of certain people earn less than the mi…
Coefplot matrix with transform option when the matrix contains missing valuesHello everyone, I am always being helped a lot from past threads, but this time I need to start a n…
Help! Standard deviation interpret?How much would Expenditure have to increase, holding Percent constant, to increase SAT by one standa…
Stata Graph Not DisplayingWhen I run my command, the graph viewer appears but not the graph itself. It only appears after I cl…
Subscribe to:
Post Comments (Atom)
0 Response to Linear regression
Post a Comment