SHARE
TWEET

Untitled

a guest Jun 17th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. > dat
  2.    num_bloc F      E      y
  3. 1     bloc1 T      B 0.0695
  4. 2     bloc2 T      B 0.1540
  5. 3     bloc3 T      B 0.0634
  6. 4     bloc1 C      B 0.0770
  7. 5     bloc2 C      B 0.0746
  8. 6     bloc3 C      B 0.1020
  9. 7     bloc1 P      B 0.0825
  10. 8     bloc2 P      B 0.0559
  11. 9     bloc3 P      B 0.0832
  12. 10    bloc1 T   B.Br 0.0891
  13. 11    bloc2 T   B.Br 0.1050
  14. 12    bloc3 T   B.Br 0.1150
  15. 13    bloc1 C   B.Br 0.1580
  16. 14    bloc2 C   B.Br 0.0989
  17. 15    bloc3 C   B.Br 0.1510
  18. 16    bloc1 P   B.Br 0.1020
  19. 17    bloc2 P   B.Br 0.0751
  20. 18    bloc3 P   B.Br 0.0655
  21. 19    bloc1 T    B.S 0.1020
  22. 20    bloc2 T    B.S 0.0755
  23. 21    bloc3 T    B.S 0.0631
  24. 22    bloc1 C    B.S 0.0705
  25. 23    bloc2 C    B.S 0.0782
  26. 24    bloc3 C    B.S 0.0751
  27. 25    bloc1 P    B.S 0.0826
  28. 26    bloc2 P    B.S 0.0800
  29. 27    bloc3 P    B.S 0.0996
  30. 28    bloc1 T B.S.Br 0.0850
  31. 29    bloc2 T B.S.Br 0.0688
  32. 30    bloc3 T B.S.Br 0.0727
  33. 31    bloc1 C B.S.Br 0.0762
  34. 32    bloc2 C B.S.Br 0.0880
  35. 33    bloc3 C B.S.Br 0.0751
  36. 34    bloc1 P B.S.Br 0.0694
  37. 35    bloc2 P B.S.Br 0.0619
  38. 36    bloc3 P B.S.Br 0.0627
  39. >
  40.  
  41. full0 <- lme(y~F*E,control=lmeControl(opt = "optim"),
  42.                                 random=~1|num_bloc/E,data=dat,method='ML',
  43.                                 contrasts = list(F='contr.treatment'),na.action="na.exclude")
  44.      
  45. full <- update(full0,weight=varIdent(form = ~ 1 | E*F))
  46.      
  47. main0 <- lme(y~F+E,control=lmeControl(opt = "optim"),
  48.                                 random=~1|num_bloc/E,data=dat,method='ML',
  49.                                 contrasts = list(F='contr.treatment'),na.action="na.exclude")
  50. main <- update(main0,weight=varIdent(form = ~ 1 | E*F))
  51.  
  52. anova(full,main)
  53.      Model df       AIC       BIC   logLik   Test  L.Ratio p-value
  54. full     1 26 -174.1895 -133.0180 113.0948                        
  55. main     2 20 -175.5688 -143.8985 107.7844 1 vs 2 10.62064  0.1008
  56.      
  57. > contrast(emmeans(full0,~F),method="trt.vs.ctrl")
  58. NOTE: Results may be misleading due to involvement in interactions
  59.  contrast estimate      SE df t.ratio p.value
  60.  C - T     0.00513 0.00856 16  0.599  0.7690
  61.  P - T    -0.01189 0.00856 16 -1.390  0.3123
  62.  
  63. Results are averaged over the levels of: E
  64. P value adjustment: dunnettx method for 2 tests
  65.  
  66. > contrast(emmeans(full,~F),method="trt.vs.ctrl")
  67. NOTE: Results may be misleading due to involvement in interactions
  68.  contrast estimate      SE df t.ratio p.value
  69.  C - T     0.00513 0.00973 16  0.527  0.8110
  70.  P - T    -0.01189 0.00905 16 -1.314  0.3482
  71.  
  72. Results are averaged over the levels of: E
  73. P value adjustment: dunnettx method for 2 tests
  74.  
  75. > contrast(emmeans(main0,~F),method="trt.vs.ctrl")
  76.  contrast estimate      SE df t.ratio p.value
  77.  C - T     0.00513 0.00902 22  0.568  0.7857
  78.  P - T    -0.01189 0.00902 22 -1.318  0.3392
  79.  
  80. Results are averaged over the levels of: E
  81. P value adjustment: dunnettx method for 2 tests
  82.  
  83. > contrast(emmeans(main,~F),method="trt.vs.ctrl")
  84.  contrast  estimate      SE df t.ratio p.value
  85.  C - T     0.000686 0.00469 22  0.146  0.9773
  86.  P - T    -0.011254 0.00222 22 -5.072  0.0001
  87.  
  88. Results are averaged over the levels of: E
  89. P value adjustment: dunnettx method for 2 tests
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top