| כפרי | עירוני | |
|---|---|---|
| חרדי | 13 | 181 |
| ממלכתי | 149 | 289 |
| ממלכתי-דתי | 69 | 138 |
fit = chisq.test(tab)
fit
##
## Pearson's Chi-squared test
##
## data: tab
## X-squared = 54.919, df = 2, p-value = 1.187e-12
tab =
dat %>%
# filter(age_type == "יסודי") %>%
filter(age_type == "תיכון") %>%
select(system_type, town_type) %>%
table
| כפרי | עירוני | |
|---|---|---|
| חרדי | 1 | 82 |
| ממלכתי | 62 | 156 |
| ממלכתי-דתי | 34 | 88 |
fit = chisq.test(tab)
fit
##
## Pearson's Chi-squared test
##
## data: tab
## X-squared = 27.596, df = 2, p-value = 1.018e-06
# Model - dirug
fit = lm(
formula = value ~ town_type2 + year,
data = tmp[tmp$variable2 == "dirug", ]
)
summary(fit)
##
## Call:
## lm(formula = value ~ town_type2 + year, data = tmp[tmp$variable2 ==
## "dirug", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -163.01 -34.29 -0.51 36.21 115.99
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 137.1388 6.8471 20.029 < 2e-16 ***
## town_type2rural 26.9991 7.5663 3.568 0.000458 ***
## year2013 -0.1277 7.4819 -0.017 0.986405
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 51.29 on 185 degrees of freedom
## Multiple R-squared: 0.0644, Adjusted R-squared: 0.05428
## F-statistic: 6.367 on 2 and 185 DF, p-value: 0.002118
# Model - eshkol
fit = lm(
formula = value ~ town_type2 + year,
data = tmp[tmp$variable2 == "eshkol", ]
)
summary(fit)
##
## Call:
## lm(formula = value ~ town_type2 + year, data = tmp[tmp$variable2 ==
## "eshkol", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.9582 -0.9582 -0.1436 1.0418 4.8564
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.1436 0.2260 22.755 <2e-16 ***
## town_type2rural 0.6019 0.2498 2.409 0.017 *
## year2013 0.2128 0.2470 0.861 0.390
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.693 on 185 degrees of freedom
## Multiple R-squared: 0.03418, Adjusted R-squared: 0.02374
## F-statistic: 3.274 on 2 and 185 DF, p-value: 0.04007
# Model - tipuah
fit = lm(
formula = meitzav ~ town_type2 * value,
data = tmp[tmp$variable2 == "tipuah", ]
)
summary(fit)
##
## Call:
## lm(formula = meitzav ~ town_type2 * value, data = tmp[tmp$variable2 ==
## "tipuah", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.2548 -7.2001 0.9572 6.4846 29.2429
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 64.3024 4.2243 15.222 < 2e-16 ***
## town_type2rural 7.4270 5.1924 1.430 0.156
## value -2.8083 0.6253 -4.491 2.16e-05 ***
## town_type2rural:value -0.5604 0.8960 -0.625 0.533
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.32 on 87 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.4419, Adjusted R-squared: 0.4226
## F-statistic: 22.96 on 3 and 87 DF, p-value: 4.871e-11
# Model - eshkol
fit = lm(
formula = meitzav ~ town_type2 * value,
data = tmp[tmp$variable2 == "eshkol_2013", ]
)
summary(fit)
##
## Call:
## lm(formula = meitzav ~ town_type2 * value, data = tmp[tmp$variable2 ==
## "eshkol_2013", ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -37.197 -6.900 0.341 7.574 28.450
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 18.756 5.924 3.166 0.00213 **
## town_type2rural 11.736 8.414 1.395 0.16661
## value 5.301 1.053 5.036 2.55e-06 ***
## town_type2rural:value -0.772 1.413 -0.546 0.58630
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 11.29 on 87 degrees of freedom
## (1 observation deleted due to missingness)
## Multiple R-squared: 0.4448, Adjusted R-squared: 0.4256
## F-statistic: 23.23 on 3 and 87 DF, p-value: 3.886e-11
# Fit model - Tipuah
fit = lm(
formula = tipuah ~ town_type2 + system_type2 + age_type2 + region12,
data = dat[!is.na(dat$tipuah), ]
)
summary(fit)
##
## Call:
## lm(formula = tipuah ~ town_type2 + system_type2 + age_type2 +
## region12, data = dat[!is.na(dat$tipuah), ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.0531 -1.5353 -0.1273 1.5430 5.6963
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.53528 0.12493 36.303 <2e-16 ***
## town_type2rural -2.74946 0.17532 -15.682 <2e-16 ***
## system_type2secular-religious 0.31374 0.15908 1.972 0.0488 *
## system_type2religious 0.34074 0.16796 2.029 0.0427 *
## age_type2Tihon 0.07421 0.13671 0.543 0.5874
## region12North 2.51784 0.17057 14.761 <2e-16 ***
## region12South 2.33572 0.15310 15.256 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.114 on 1061 degrees of freedom
## Multiple R-squared: 0.3344, Adjusted R-squared: 0.3306
## F-statistic: 88.84 on 6 and 1061 DF, p-value: < 2.2e-16
# Fit model - Meitzav
fit = lm(
formula = meitzav ~ town_type2 + system_type2 + age_type2 + region12,
data = dat[!is.na(dat$meitzav), ]
)
summary(fit)
##
## Call:
## lm(formula = meitzav ~ town_type2 + system_type2 + age_type2 +
## region12, data = dat[!is.na(dat$meitzav), ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -55.613 -14.912 0.224 14.574 60.451
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 61.150 1.402 43.601 < 2e-16 ***
## town_type2rural 11.937 1.946 6.134 1.43e-09 ***
## system_type2secular-religious -8.954 1.760 -5.087 4.68e-07 ***
## system_type2religious -23.591 3.089 -7.636 7.30e-14 ***
## age_type2Tihon -5.474 1.803 -3.037 0.00248 **
## region12North -13.257 2.042 -6.493 1.59e-10 ***
## region12South -12.647 1.843 -6.864 1.47e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 20.86 on 705 degrees of freedom
## Multiple R-squared: 0.2237, Adjusted R-squared: 0.2171
## F-statistic: 33.85 on 6 and 705 DF, p-value: < 2.2e-16