Anda di halaman 1dari 3

> model.BF.

agama<-lm(BF~ISLAM+KRISTEN+KATOLIK, data = datazen)


> summary(model.BF.agama)
Call:
lm(formula = BF ~ ISLAM + KRISTEN + KATOLIK, data = datazen)
Residuals:
Min
1Q Median
3Q
Max
-0.24328 -0.07104 0.01766 0.06420 0.13247
Coefficients:
Estimate Std. Error t
(Intercept) 0.602994 0.902567
ISLAM
0.700105 0.226329
KRISTEN
0.017753 0.100633
KATOLIK
0.007325 0.068252
--Signif. codes: 0 *** 0.001 **

value
0.668
3.093
0.176
0.107

Pr(>|t|)
0.51360
0.00698 **
0.86218
0.91586

0.01

0.05 .

0.1

Residual standard error: 0.107 on 16 degrees of freedom


Multiple R-squared: 0.6321,
Adjusted R-squared: 0.5631
F-statistic: 9.164 on 3 and 16 DF, p-value: 0.0009187
> step(model.BF.agama)
Start: AIC=-85.86
BF ~ ISLAM + KRISTEN + KATOLIK
Df Sum of Sq
RSS
AIC
- KATOLIK 1 0.000132 0.18333 -87.844
- KRISTEN 1 0.000356 0.18356 -87.819
<none>
0.18320 -85.858
- ISLAM
1 0.109560 0.29276 -78.483
Step: AIC=-87.84
BF ~ ISLAM + KRISTEN
Df Sum of Sq
RSS
AIC
- KRISTEN 1 0.002238 0.18557 -89.601
<none>
0.18333 -87.844
- ISLAM
1 0.115119 0.29845 -80.098
Step: AIC=-89.6
BF ~ ISLAM
Df Sum of Sq
RSS
AIC
<none>
0.18557 -89.601
- ISLAM 1
0.3124 0.49797 -71.859
Call:
lm(formula = BF ~ ISLAM, data = datazen)
Coefficients:
(Intercept)
0.3720

ISLAM
0.7657

> model.BF.agama<-lm(BF~ISLAM, data = datazen)


> residual.BF.agama<-resid(model.BF.agama)
> shapiro.test(residual.BF.agama)
Shapiro-Wilk normality test

data: residual.BF.agama
W = 0.95011, p-value = 0.3688
> library(lmtest)
> bptest(model.BF.agama,studentize = F,data = datazen)
Breusch-Pagan test
data: model.BF.agama
BP = 1.3738, df = 1, p-value = 0.2412
> ey=fitted(model.BF.agama)
> model.BF.agama
Call:
lm(formula = BF ~ ISLAM, data = datazen)
Coefficients:
(Intercept)
0.3720
>
>
>
>

ISLAM
0.7657

yf<-datazen$BF/ey
x1f<-datazen$ISLAM/ey
abc1<-lm(yf~x1f)
summary(abc1)

Call:
lm(formula = yf ~ x1f)
Residuals:
Min
1Q
Median
3Q
Max
-0.066340 -0.017412 0.003294 0.019510 0.036866
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.98722
1.70864 0.578
0.571
x1f
0.01085
1.45001 0.007
0.994
Residual standard error: 0.02702 on 18 degrees of freedom
Multiple R-squared: 3.11e-06, Adjusted R-squared: -0.05555
F-statistic: 5.598e-05 on 1 and 18 DF, p-value: 0.9941
> residual.BF.agama<-resid(model.BF.agama)
> qqPlot(residual.BF.agama)
> plot(resid(model.BF.agama)~fitted(model.BF.agama))
> library(car)
> vif(model.BF.agama)
Error in vif.default(model.BF.agama) : model contains fewer than 2 terms
> summary(model.BF.agama)
Call:
lm(formula = BF ~ ISLAM, data = datazen)
Residuals:
Min
1Q Median
3Q
Max
-0.24276 -0.06746 0.01256 0.07155 0.13507
Coefficients:
Estimate Std. Error t value Pr(>|t|)

(Intercept) 0.3720
ISLAM
0.7657
--Signif. codes: 0 ***

0.6253
0.1391
0.001

0.595
0.559
5.505 3.16e-05 ***
** 0.01

0.05 .

0.1

Residual standard error: 0.1015 on 18 degrees of freedom


Multiple R-squared: 0.6273,
Adjusted R-squared: 0.6066
F-statistic: 30.3 on 1 and 18 DF, p-value: 3.156e-05

Anda mungkin juga menyukai