Upload
jacklyn-fulton
View
216
Download
0
Embed Size (px)
DESCRIPTION
Hasil pengujian korelasi pearson dan regresi linier dari BMI, BB, dan tekanan darah
Citation preview
Tugas korelasi BMI, BB, Tekanan darah (dengan BMI sebagai variabel Dependent)
Contoh data :
BMI sistol diastol berat badan17.8 110 70 4817.9 110 70 5017.9 110 70 4318.1 110 70 5218.2 120 75 5318.3 120 75 6018.4 120 80 6718.4 90 60 6618.4 120 80 6818.5 120 80 6918.6 120 80 7018.7 120 80 7119.2 120 80 7419.4 120 80 6919.4 120 80 7019.5 120 80 6619.6 120 80 6419.7 120 80 6519.9 120 80 6320.1 120 80 5720.5 120 80 5520.7 90 60 4520.7 120 80 5620.8 120 80 5420.9 120 80 5220.9 120 80 6021.2 120 80 7021.3 120 80 6621.3 120 80 6421.4 120 80 6221.8 120 80 6121.9 120 80 5422.3 120 80 6422.4 120 80 7722.4 120 80 7628.7 140 90 8028.8 150 90 8227.9 140 90 7829.9 140 90 8223.2 120 80 8123.5 120 80 76
1
23.6 120 80 7723.7 120 80 6123.8 120 80 6325.1 120 80 6225.2 120 80 5025.2 120 80 6225.2 120 80 6125.5 120 80 6825.8 120 80 7325.9 120 80 6126.8 120 80 64
Pearson's product-moment correlation
data: Dataset$BMI and Dataset$sistol
t = 5.4491, df = 50, p-value = 1.55e-06
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.4049631 0.7571751
sample estimates:
cor
0.6104048
correlation coefficient = 0.61, 95% CI 0.405-0.757, p.value = 1.55e-06
2
Pearson's product-moment correlation
data: Dataset$BMI and Dataset$diastol
t = 5.437, df = 50, p-value = 1.617e-06
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.4038255 0.7565942
sample estimates:
cor
0.6095508
correlation coefficient = 0.61, 95% CI 0.404-0.757, p.value = 1.62e-06
3
Pearson's product-moment correlation
data: Dataset$berat.badan and Dataset$BMI
t = 3.6781, df = 50, p-value = 0.0005746
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.2157340 0.6522285
sample estimates:
cor
0.461466
correlation coefficient = 0.461, 95% CI 0.216-0.652, p.value = 0.000575
4
5
> #####Linear regression#####
Call:
lm(formula = berat.badan ~ BMI, data = Dataset)
Residuals:
Min 1Q Median 3Q Max
-18.9622 -7.0024 0.5209 7.6080 14.8094
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 34.0410 8.3061 4.098 0.000153 ***
BMI 1.3858 0.3768 3.678 0.000575 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 8.682 on 50 degrees of freedom
Multiple R-squared: 0.213, Adjusted R-squared: 0.1972
F-statistic: 13.53 on 1 and 50 DF, p-value: 0.0005746
> ###variance inflation factors
> colnames(res$coefficients) <- gettext(domain="R-RcmdrPlugin.EZR",
+ colnames(res$coefficients))
> res$coefficients
Estimate Std. Error t value Pr(>|t|)
(Intercept) 34.04101 8.3061422 4.098294 0.000152553
BMI 1.38576 0.3767594 3.678103 0.000574607
6
Call:
lm(formula = sistol ~ BMI, data = Dataset)
Residuals:
Min 1Q Median 3Q Max
-27.874 -3.030 1.084 4.384 18.059
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 81.9250 7.0262 11.660 7.15e-16 ***
7
BMI 1.7367 0.3187 5.449 1.55e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 7.344 on 50 degrees of freedom
Multiple R-squared: 0.3726, Adjusted R-squared: 0.36
F-statistic: 29.69 on 1 and 50 DF, p-value: 1.55e-06
Estimate Std. Error t value Pr(>|t|)
(Intercept) 81.925049 7.0262297 11.659888 7.152228e-16
BMI 1.736664 0.3187037 5.449148 1.549793e-06
8
Call:
lm(formula = diastol ~ BMI, data = Dataset)
Residuals:
Min 1Q Median 3Q Max
-17.860 -2.545 1.188 3.226 4.575
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 55.9436 4.2931 13.031 < 2e-16 ***
BMI 1.0587 0.1947 5.437 1.62e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 4.487 on 50 degrees of freedom
Multiple R-squared: 0.3716, Adjusted R-squared: 0.359
F-statistic: 29.56 on 1 and 50 DF, p-value: 1.617e-06
Estimate Std. Error t value Pr(>|t|)
(Intercept) 55.943566 4.2930541 13.031181 1.063847e-17
BMI 1.058745 0.1947292 5.437012 1.617487e-06
9
10