Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > rcorr(as.matrix(dsCase[c("Age", "HrPWork", "CO2CompMax")]))
- Age HrPWork CO2CompMax
- Age 1.00 0.18 -0.03
- HrPWork 0.18 1.00 -0.04
- CO2CompMax -0.03 -0.04 1.00
- n= 693
- P
- Age HrPWork CO2CompMax
- Age 0.0000 0.5075
- HrPWork 0.0000 0.3517
- CO2CompMax 0.5075 0.3517
- > pcor(dsCase[c("Age", "HrPWork", "CO2CompMax")])
- $estimate
- Age HrPWork CO2CompMax
- Age 1.00000000 0.17808150 -0.01920447
- HrPWork 0.17808150 1.00000000 -0.03143962
- CO2CompMax -0.01920447 -0.03143962 1.00000000
- $p.value
- Age HrPWork CO2CompMax
- Age 0.000000e+00 2.430766e-06 0.6140339
- HrPWork 2.430766e-06 0.000000e+00 0.4089424
- CO2CompMax 6.140339e-01 4.089424e-01 0.0000000
- $statistic
- Age HrPWork CO2CompMax
- Age 0.0000000 4.7538043 -0.5045531
- HrPWork 4.7538043 0.0000000 -0.8262597
- CO2CompMax -0.5045531 -0.8262597 0.0000000
- $n
- [1] 693
- $gp
- [1] 1
- $method
- [1] "pearson"
- > ResultatenVoor <- aov(CO2CompMax~dGender, data = dsCase)
- > ResultatenNa <- aov(CO2CompMax~dGender + avgGuilt, data = dsCase)
- > Anova(ResultatenVoor, type = c("III"))
- Anova Table (Type III tests)
- Response: CO2CompMax
- Sum Sq Df F value Pr(>F)
- (Intercept) 1143 1 0.1847 0.66752
- dGender 18074 1 2.9215 0.08786 .
- Residuals 4274938 691
- ---
- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
- > Anova(ResultatenNa, type = c("III"))
- Anova Table (Type III tests)
- Response: CO2CompMax
- Sum Sq Df F value Pr(>F)
- (Intercept) 5715 1 0.9235 0.3369
- dGender 15201 1 2.4561 0.1175
- avgGuilt 4583 1 0.7405 0.3898
- Residuals 4270355 690
- > #eerst t-toets tussen dGender en CO2CompMax
- > t.test(CO2CompMax ~ dGender, data = dsCase)
- Welch Two Sample t-test
- data: CO2CompMax by dGender
- t = -1.4879, df = 330.99, p-value = 0.1377
- alternative hypothesis: true difference in means is not equal to 0
- 95 percent confidence interval:
- -24.075010 3.339171
- sample estimates:
- mean in group 1 mean in group 2
- 14.27145 24.63937
- > #dan t-toets opsplitsen in categorieen van cLocate
- > by(dsCase, as.factor(dsCase$fcLocate), function(x) t.test(CO2CompMax ~ dGender, data = x))
- as.factor(dsCase$fcLocate): City
- Welch Two Sample t-test
- data: CO2CompMax by dGender
- t = -0.43985, df = 168.95, p-value = 0.6606
- alternative hypothesis: true difference in means is not equal to 0
- 95 percent confidence interval:
- -28.38187 18.03878
- sample estimates:
- mean in group 1 mean in group 2
- 16.95809 22.12963
- ---------------------------------------------------------------------------------------
- as.factor(dsCase$fcLocate): Suburban
- Welch Two Sample t-test
- data: CO2CompMax by dGender
- t = -0.75398, df = 49.868, p-value = 0.4544
- alternative hypothesis: true difference in means is not equal to 0
- 95 percent confidence interval:
- -45.66782 20.74082
- sample estimates:
- mean in group 1 mean in group 2
- 15.12346 27.58696
- ---------------------------------------------------------------------------------------
- as.factor(dsCase$fcLocate): Town
- Welch Two Sample t-test
- data: CO2CompMax by dGender
- t = -0.62649, df = 93.175, p-value = 0.5325
- alternative hypothesis: true difference in means is not equal to 0
- 95 percent confidence interval:
- -11.795974 6.137965
- sample estimates:
- mean in group 1 mean in group 2
- 12.01948 14.84848
- ---------------------------------------------------------------------------------------
- as.factor(dsCase$fcLocate): Village
- Welch Two Sample t-test
- data: CO2CompMax by dGender
- t = -1.2501, df = 67.456, p-value = 0.2156
- alternative hypothesis: true difference in means is not equal to 0
- 95 percent confidence interval:
- -31.273974 7.184621
- sample estimates:
- mean in group 1 mean in group 2
- 10.68667 22.73134
- ---------------------------------------------------------------------------------------
- as.factor(dsCase$fcLocate): Rural
- Welch Two Sample t-test
- data: CO2CompMax by dGender
- t = -1.014, df = 5.0026, p-value = 0.3571
- alternative hypothesis: true difference in means is not equal to 0
- 95 percent confidence interval:
- -441.9456 191.8850
- sample estimates:
- mean in group 1 mean in group 2
- 8.636364 133.666667
- > anova(aov(CO2CompMax ~ cLocate * cLiving, data = dsCase))
- Analysis of Variance Table
- Response: CO2CompMax
- Df Sum Sq Mean Sq F value Pr(>F)
- cLocate 1 68 68.0 0.0109 0.9168
- cLiving 1 14 14.2 0.0023 0.9619
- cLocate:cLiving 1 2253 2252.7 0.3617 0.5477
- Residuals 689 4290677 6227.4
- > anova(aov(CO2CompMax ~ cLocate + cLiving, data = dsCase))
- Analysis of Variance Table
- Response: CO2CompMax
- Df Sum Sq Mean Sq F value Pr(>F)
- cLocate 1 68 68.0 0.0109 0.9167
- cLiving 1 14 14.2 0.0023 0.9619
- Residuals 690 4292930 6221.6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement