indikator_IPM <-read_excel(path="D:/data_komlan.xlsx",col_names=TRUE)
indikator_IPM
## # A tibble: 38 × 6
## Provinsi UHH HLS RLS Pengeluaran IPM
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Aceh 73.5 14.4 9.95 11191 76.2
## 2 Sumatera Utara 74.2 13.5 10.1 11898 76.5
## 3 Sumatera Barat 74.7 14.3 9.77 12041 77.3
## 4 Riau 74.7 13.4 9.55 12233 76.3
## 5 Jambi 74.4 13.3 8.95 12018 75.1
## 6 Sumatera Selatan 74.6 12.6 8.91 12416 74.8
## 7 Bengkulu 73.6 13.8 9.23 12197 75.7
## 8 Lampung 74.7 12.8 8.61 11683 74.0
## 9 Kep. Bangka Belitung 74.5 12.5 8.65 13837 75.3
## 10 Kep. Riau 75.5 13.3 10.7 15881 80.5
## # ℹ 28 more rows
summary(indikator_IPM)
## Provinsi UHH HLS RLS
## Length:38 Min. :67.55 Min. : 9.64 Min. : 4.300
## Class :character 1st Qu.:71.45 1st Qu.:12.99 1st Qu.: 8.445
## Mode :character Median :74.17 Median :13.34 Median : 9.050
## Mean :73.18 Mean :13.26 Mean : 9.029
## 3rd Qu.:74.73 3rd Qu.:13.76 3rd Qu.: 9.765
## Max. :76.27 Max. :15.78 Max. :11.590
## Pengeluaran IPM
## Min. : 5861 Min. :54.91
## 1st Qu.:10598 1st Qu.:72.67
## Median :11978 Median :74.81
## Mean :11962 Mean :74.25
## 3rd Qu.:12766 3rd Qu.:76.29
## Max. :20676 Max. :85.05
Rata-rata IPM adalah 74.25
Matrix Plot Hubungan Variabel
Bentuk persamaan yang digunakan adalah: \[ IPM = \beta_0 + \beta_1 UHH + \beta_2 HLS + \beta_3 RLS + \beta_4 Pengeluaran + \epsilon \] ## estimasi parameter
model = lm(IPM ~ UHH + HLS + RLS + Pengeluaran, data = indikator_IPM)
summary(model)
##
## Call:
## lm(formula = IPM ~ UHH + HLS + RLS + Pengeluaran, data = indikator_IPM)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.42545 -0.17094 0.09716 0.23276 0.68412
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -7.023e+00 3.350e+00 -2.096 0.0438 *
## UHH 6.182e-01 5.194e-02 11.902 1.75e-13 ***
## HLS 1.182e+00 1.132e-01 10.440 5.45e-12 ***
## RLS 1.366e+00 1.130e-01 12.086 1.15e-13 ***
## Pengeluaran 6.708e-04 5.323e-05 12.601 3.69e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4358 on 33 degrees of freedom
## Multiple R-squared: 0.9937, Adjusted R-squared: 0.993
## F-statistic: 1307 on 4 and 33 DF, p-value: < 2.2e-16
Model Akhir: \[ IPM = -7.0225 + 0.6182 UHH + 1.1815 HLS + 1.3662 RLS + 7\times 10^{-4} Pengeluaran \]
error = model$residuals
ks.test(error,"pnorm",mean(error),sqrt(var(error)))
##
## Exact one-sample Kolmogorov-Smirnov test
##
## data: error
## D = 0.15349, p-value = 0.3006
## alternative hypothesis: two-sided
dwtest(model)
##
## Durbin-Watson test
##
## data: model
## DW = 1.6362, p-value = 0.06968
## alternative hypothesis: true autocorrelation is greater than 0
Scatter plot dari setiap variabel independen (X) terhadap IPM (Y) dan garis regresinya.
Scatterplot Variabel X vs IPM