I am (again) having a problem with Rstudio. I'm running a mutivariate regression. One of my predictor variables has multiple levels. For some reason the first level is missing.
```{r}
levels(ESS$hinctnta_REC)
```
[1] "J - 1st decile" "R - 2nd decile" "C - 3rd decile" "M - 4th decile"
[5] "F - 5th decile" "S - 6th decile" "K - 7th decile" "P - 8th decile"
[9] "D - 9th decile" "H - 10th decile" "Refusal" "Don't know"
[13] "No answer"
```{r}
model1 <- lm(ESS$freehomosexuals_NUM2 ~ ESS$worseorbetterplacetolive_NUM2 + ESS$rlgblg_REC +
ESS$hinctnta_REC, data = ESS)
summary(model1)
```
Call:
lm(formula = ESS$freehomosexuals_NUM2 ~ ESS$worseorbetterplacetolive_NUM2 +
ESS$rlgblg_REC + ESS$hinctnta_REC, data = ESS)
Residuals:
Min 1Q Median 3Q Max
-1.14129 -0.63621 0.08439 0.36379 1.72209
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.441386 0.018085 79.699 < 2e-16 ***
ESS$worseorbetterplacetolive_NUM2 0.157964 0.006512 24.257 < 2e-16 ***
ESS$rlgblg_REC1 0.226011 0.007391 30.581 < 2e-16 ***
ESS$hinctnta_RECR - 2nd decile -0.028366 0.015909 -1.783 0.0746 .
ESS$hinctnta_RECC - 3rd decile -0.067715 0.015791 -4.288 1.81e-05 ***
ESS$hinctnta_RECM - 4th decile -0.096692 0.015927 -6.071 1.29e-09 ***
ESS$hinctnta_RECF - 5th decile -0.121103 0.015914 -7.610 2.81e-14 ***
ESS$hinctnta_RECS - 6th decile -0.122475 0.016052 -7.630 2.41e-14 ***
ESS$hinctnta_RECK - 7th decile -0.162637 0.015959 -10.191 < 2e-16 ***
ESS$hinctnta_RECP - 8th decile -0.219497 0.016169 -13.575 < 2e-16 ***
ESS$hinctnta_RECD - 9th decile -0.296647 0.017601 -16.854 < 2e-16 ***
ESS$hinctnta_RECH - 10th decile -0.321444 0.017920 -17.938 < 2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.6707 on 34229 degrees of freedom
(10146 observations deleted due to missingness)
Multiple R-squared: 0.06503, Adjusted R-squared: 0.06473
F-statistic: 216.4 on 11 and 34229 DF, p-value: < 2.2e-16