Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.09 KB | None | 0 0
  1. > rcorr(as.matrix(dsCase[c("Age", "HrPWork", "CO2CompMax")]))
  2. Age HrPWork CO2CompMax
  3. Age 1.00 0.18 -0.03
  4. HrPWork 0.18 1.00 -0.04
  5. CO2CompMax -0.03 -0.04 1.00
  6.  
  7. n= 693
  8.  
  9.  
  10. P
  11. Age HrPWork CO2CompMax
  12. Age 0.0000 0.5075
  13. HrPWork 0.0000 0.3517
  14. CO2CompMax 0.5075 0.3517
  15. > pcor(dsCase[c("Age", "HrPWork", "CO2CompMax")])
  16. $estimate
  17. Age HrPWork CO2CompMax
  18. Age 1.00000000 0.17808150 -0.01920447
  19. HrPWork 0.17808150 1.00000000 -0.03143962
  20. CO2CompMax -0.01920447 -0.03143962 1.00000000
  21.  
  22. $p.value
  23. Age HrPWork CO2CompMax
  24. Age 0.000000e+00 2.430766e-06 0.6140339
  25. HrPWork 2.430766e-06 0.000000e+00 0.4089424
  26. CO2CompMax 6.140339e-01 4.089424e-01 0.0000000
  27.  
  28. $statistic
  29. Age HrPWork CO2CompMax
  30. Age 0.0000000 4.7538043 -0.5045531
  31. HrPWork 4.7538043 0.0000000 -0.8262597
  32. CO2CompMax -0.5045531 -0.8262597 0.0000000
  33.  
  34. $n
  35. [1] 693
  36.  
  37. $gp
  38. [1] 1
  39.  
  40. $method
  41. [1] "pearson"
  42.  
  43. > ResultatenVoor <- aov(CO2CompMax~dGender, data = dsCase)
  44. > ResultatenNa <- aov(CO2CompMax~dGender + avgGuilt, data = dsCase)
  45. > Anova(ResultatenVoor, type = c("III"))
  46. Anova Table (Type III tests)
  47.  
  48. Response: CO2CompMax
  49. Sum Sq Df F value Pr(>F)
  50. (Intercept) 1143 1 0.1847 0.66752
  51. dGender 18074 1 2.9215 0.08786 .
  52. Residuals 4274938 691
  53. ---
  54. Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
  55. > Anova(ResultatenNa, type = c("III"))
  56. Anova Table (Type III tests)
  57.  
  58. Response: CO2CompMax
  59. Sum Sq Df F value Pr(>F)
  60. (Intercept) 5715 1 0.9235 0.3369
  61. dGender 15201 1 2.4561 0.1175
  62. avgGuilt 4583 1 0.7405 0.3898
  63. Residuals 4270355 690
  64. > #eerst t-toets tussen dGender en CO2CompMax
  65. > t.test(CO2CompMax ~ dGender, data = dsCase)
  66.  
  67. Welch Two Sample t-test
  68.  
  69. data: CO2CompMax by dGender
  70. t = -1.4879, df = 330.99, p-value = 0.1377
  71. alternative hypothesis: true difference in means is not equal to 0
  72. 95 percent confidence interval:
  73. -24.075010 3.339171
  74. sample estimates:
  75. mean in group 1 mean in group 2
  76. 14.27145 24.63937
  77.  
  78. > #dan t-toets opsplitsen in categorieen van cLocate
  79. > by(dsCase, as.factor(dsCase$fcLocate), function(x) t.test(CO2CompMax ~ dGender, data = x))
  80. as.factor(dsCase$fcLocate): City
  81.  
  82. Welch Two Sample t-test
  83.  
  84. data: CO2CompMax by dGender
  85. t = -0.43985, df = 168.95, p-value = 0.6606
  86. alternative hypothesis: true difference in means is not equal to 0
  87. 95 percent confidence interval:
  88. -28.38187 18.03878
  89. sample estimates:
  90. mean in group 1 mean in group 2
  91. 16.95809 22.12963
  92.  
  93. ---------------------------------------------------------------------------------------
  94. as.factor(dsCase$fcLocate): Suburban
  95.  
  96. Welch Two Sample t-test
  97.  
  98. data: CO2CompMax by dGender
  99. t = -0.75398, df = 49.868, p-value = 0.4544
  100. alternative hypothesis: true difference in means is not equal to 0
  101. 95 percent confidence interval:
  102. -45.66782 20.74082
  103. sample estimates:
  104. mean in group 1 mean in group 2
  105. 15.12346 27.58696
  106.  
  107. ---------------------------------------------------------------------------------------
  108. as.factor(dsCase$fcLocate): Town
  109.  
  110. Welch Two Sample t-test
  111.  
  112. data: CO2CompMax by dGender
  113. t = -0.62649, df = 93.175, p-value = 0.5325
  114. alternative hypothesis: true difference in means is not equal to 0
  115. 95 percent confidence interval:
  116. -11.795974 6.137965
  117. sample estimates:
  118. mean in group 1 mean in group 2
  119. 12.01948 14.84848
  120.  
  121. ---------------------------------------------------------------------------------------
  122. as.factor(dsCase$fcLocate): Village
  123.  
  124. Welch Two Sample t-test
  125.  
  126. data: CO2CompMax by dGender
  127. t = -1.2501, df = 67.456, p-value = 0.2156
  128. alternative hypothesis: true difference in means is not equal to 0
  129. 95 percent confidence interval:
  130. -31.273974 7.184621
  131. sample estimates:
  132. mean in group 1 mean in group 2
  133. 10.68667 22.73134
  134.  
  135. ---------------------------------------------------------------------------------------
  136. as.factor(dsCase$fcLocate): Rural
  137.  
  138. Welch Two Sample t-test
  139.  
  140. data: CO2CompMax by dGender
  141. t = -1.014, df = 5.0026, p-value = 0.3571
  142. alternative hypothesis: true difference in means is not equal to 0
  143. 95 percent confidence interval:
  144. -441.9456 191.8850
  145. sample estimates:
  146. mean in group 1 mean in group 2
  147. 8.636364 133.666667
  148.  
  149. > anova(aov(CO2CompMax ~ cLocate * cLiving, data = dsCase))
  150. Analysis of Variance Table
  151.  
  152. Response: CO2CompMax
  153. Df Sum Sq Mean Sq F value Pr(>F)
  154. cLocate 1 68 68.0 0.0109 0.9168
  155. cLiving 1 14 14.2 0.0023 0.9619
  156. cLocate:cLiving 1 2253 2252.7 0.3617 0.5477
  157. Residuals 689 4290677 6227.4
  158. > anova(aov(CO2CompMax ~ cLocate + cLiving, data = dsCase))
  159. Analysis of Variance Table
  160.  
  161. Response: CO2CompMax
  162. Df Sum Sq Mean Sq F value Pr(>F)
  163. cLocate 1 68 68.0 0.0109 0.9167
  164. cLiving 1 14 14.2 0.0023 0.9619
  165. Residuals 690 4292930 6221.6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement