I am currently writing my Master's thesis in economics. I am analyzing the second home rate in Swiss municipalities in R.
The second home rate for municipality $j$ is defined as the share of the residential housing in the municipality used as second home.
For example the observation for municipality Bern has totally 1000 flats, where 100 flats are used as second home. So the dependent variable "second home rate" has the value 100/1000 = 0.1.
I have 30 independent variables (2 dummy variables and the rest are numeric variables). My goal is to find out which of these variables have a significant effect on the second home rate. I used the
lm function including all my variables (without any transformation or any interaction terms). Then I used
regsubsets to get the best model by the BIC criterion.
So far so good, but then I began to test the OLS assumptions. I got significant results for the Breusch Pagan test (to test homoscedasticity), for the raintest (to test linearity) and for the reset test (to test model specification). This means there is violation of the linearity assumption, normal distribution of residuals assumption and the homoscedasticity assumption.
Now there are two possibilities: either I transform variables or I use for example
glm. Honestly I would like to work with OLS, so I need to transform variables. But how do I know which variables I need to transform? And which transformation they need? Do I need to consider all 30 independent variables for transformation?
I know there is the function
powertransform or I used histograms of every variables to detect the transformation. But this way didn't work well. Does anyone have a good suggestion for me? Maybe I didn't use the
powertransform function in the right way.
Here are the plots I get out of
I hope my explanation is fine. If not let me know and I will give some further information.