Dear All user, Hello, I'm a student and I have some trouble with the experimental (columns-experiments) design of my project. I use a randomized block design with 4 treatments including a control. For each treatment, I use 3 replicates and 3 blocks. The treatments are: -T1 = COD (300 mg/Lit) COD=chemical oxygen demand -T2 = COD (200 mg/Lit) -T3 = COD (100 mg/Lit) -T4 = COD (0 mg/Lit) as a control The experiment is conducted during three months and a sample is taken each Week in every experimental unit. At the first, I irrigated all soil columns (12 columns) with demonize water for 1 week.
Then during 8 weeks, I irrigated all columns with waste water with different concentration. Then, gain, I irrigated all columns with demonize water for 4 weeks. Now I want to know how I can analyses the results in R. For example, I want to detect the Effect of waste water on some physical properties of soil, before, during use waste water and after use waste water (Is there any significant change in properties of soil.) Time is also important, so I want to know the interaction between time and some physical properties of soil, like water content .first comprises between Treatments and then comprise between weeks). Questions to be answered: 1) Theta (water content), before (1 week) and after the COD; is there a difference? 2) Theta, during, before and after the COD; is there a difference? 3) Is there a trend in Theta, during COD (8 weeks)? 4) Is there a difference in Theta, during COD between the treatments? I hope somebody can help me to find correct statistical analyses in R. I sepnt a lot of time, but still , i have problems. Kind regards, Alisia ---------------------------------------------------------------------------------------------------------- Week Date BTC timeexp column Block Treatment Condition ThetaV 0 22/jun/08 -4 1 1 T4 DW 0,0962 Irrigation with diminirize water 0 22/jun/08 -4 2 1 T4 DW 0,0935 Irrigation with diminirize water 0 22/jun/08 -4 3 1 T4 DW 0,1181 Irrigation with diminirize water 0 22/jun/08 -4 4 1 T4 DW 0,0752 Irrigation with diminirize water 0 22/jun/08 -4 5 2 T4 DW 0,0761 Irrigation with diminirize water 0 22/jun/08 -4 6 2 T4 DW 0,0729 Irrigation with diminirize water 0 25/jun/08 -1 7 2 T4 DW 0,076 Irrigation with diminirize water 0 25/jun/08 -1 8 2 T4 DW 0,0766 Irrigation with diminirize water 0 25/jun/08 -1 9 3 T4 DW 0,0981 Irrigation with diminirize water 0 25/jun/08 -1 10 3 T4 DW 0,0628 Irrigation with diminirize water 0 25/jun/08 -1 11 3 T4 DW 0,0867 Irrigation with diminirize water 0 25/jun/08 -1 12 3 T4 DW 0,0657 Irrigation with diminirize water 1 27/jun/08 1 1 1 T3 WW 0,0903 Irrigation with wastewater 1 27/jun/08 1 2 1 T2 WW 0,0864 Irrigation with wastewater 1 27/jun/08 1 3 1 T4 WW 0,1101 Irrigation with wastewater 1 27/jun/08 1 4 1 T1 WW 0,0665 Irrigation with wastewater 1 27/jun/08 1 5 2 T1 WW 0,0675 Irrigation with wastewater 1 27/jun/08 1 6 2 T2 WW 0,0668 Irrigation with wastewater 1 3/jul/08 7 7 2 T3 WW 0,0718 Irrigation with wastewater 1 3/jul/08 7 8 2 T4 WW 0,0777 Irrigation with wastewater 1 3/jul/08 7 9 3 T4 WW 0,0982 Irrigation with wastewater 1 3/jul/08 7 10 3 T1 WW 0,065 Irrigation with wastewater 1 3/jul/08 7 11 3 T2 WW 0,081 Irrigation with wastewater 1 3/jul/08 7 12 3 T3 WW 0,0661 Irrigation with wastewater 2 7/jul/08 11 1 1 T3 WW 0,0935 Irrigation with wastewater 2 7/jul/08 11 2 1 T2 WW 0,0874 Irrigation with wastewater 2 7/jul/08 11 3 1 T4 WW 0,1273 Irrigation with wastewater 2 7/jul/08 11 4 1 T1 WW 0,0688 Irrigation with wastewater 2 7/jul/08 11 5 2 T1 WW 0,07 Irrigation with wastewater 2 7/jul/08 11 6 2 T2 WW 0,0686 Irrigation with wastewater 2 10/jul/08 14 7 2 T3 WW 0,0743 Irrigation with wastewater 2 10/jul/08 14 8 2 T4 WW 0,0774 Irrigation with wastewater 2 10/jul/08 14 9 3 T4 WW 0,0996 Irrigation with wastewater 2 10/jul/08 14 10 3 T1 WW 0,0593 Irrigation with wastewater 2 10/jul/08 14 11 3 T2 WW 0,0818 Irrigation with wastewater 2 10/jul/08 14 12 3 T3 WW 0,0658 Irrigation with wastewater 3 12/jul/08 16 1 1 T3 WW 0,0939 Irrigation with wastewater 3 12/jul/08 16 2 1 T2 WW 0,0884 Irrigation with wastewater 3 12/jul/08 16 3 1 T4 WW 0,1077 Irrigation with wastewater 3 12/jul/08 16 4 1 T1 WW 0,068 Irrigation with wastewater 3 12/jul/08 16 5 2 T1 WW 0,0683 Irrigation with wastewater 3 12/jul/08 16 6 2 T2 WW 0,0666 Irrigation with wastewater 3 12/jul/08 16 7 2 T3 WW 0,068 Irrigation with wastewater 3 16/jul/08 20 8 2 T4 WW 0,0739 Irrigation with wastewater 3 16/jul/08 20 9 3 T4 WW 0,1033 Irrigation with wastewater 3 16/jul/08 20 10 3 T1 WW 0,0594 Irrigation with wastewater 3 16/jul/08 20 11 3 T2 WW 0,0799 Irrigation with wastewater 3 16/jul/08 20 12 3 T3 WW 0,0623 Irrigation with wastewater 3,5 18/jul/08 22 1 1 T3 WW 0,0961 Irrigation with wastewater 3,5 18/jul/08 22 2 1 T2 WW 0,0911 Irrigation with wastewater 3,5 18/jul/08 22 3 1 T4 WW 0,1066 Irrigation with wastewater 3,5 18/jul/08 22 4 1 T1 WW 0,0715 Irrigation with wastewater 3,5 18/jul/08 22 5 2 T1 WW 0,0704 Irrigation with wastewater 3,5 18/jul/08 22 6 2 T2 WW 0,0685 Irrigation with wastewater 3,5 20/jul/08 24 7 2 T3 WW 0,068 Irrigation with wastewater 3,5 20/jul/08 24 8 2 T4 WW 0,0739 Irrigation with wastewater 3,5 20/jul/08 24 9 3 T4 WW 0,1033 Irrigation with wastewater 3,5 20/jul/08 24 10 3 T1 WW 0,0594 Irrigation with wastewater 3,5 20/jul/08 24 11 3 T2 WW 0,0799 Irrigation with wastewater 3,5 20/jul/08 24 12 3 T3 WW 0,0623 Irrigation with wastewater 4 23/jul/08 27 1 1 T3 WW 0,0767 Irrigation with wastewater 4 23/jul/08 27 2 1 T2 WW 0,0877 Irrigation with wastewater 4 23/jul/08 27 3 1 T4 WW 0,104 Irrigation with wastewater 4 23/jul/08 27 4 1 T1 WW 0,0593 Irrigation with wastewater 4 23/jul/08 27 5 2 T1 WW 0,0646 Irrigation with wastewater 4 23/jul/08 27 6 2 T2 WW 0,0668 Irrigation with wastewater 4 26/jul/08 30 7 2 T3 WW 0,0645 Irrigation with wastewater 4 26/jul/08 30 8 2 T4 WW 0,0705 Irrigation with wastewater 4 26/jul/08 30 9 3 T4 WW 0,0942 Irrigation with wastewater 4 26/jul/08 30 10 3 T1 WW 0,0553 Irrigation with wastewater 4 26/jul/08 30 11 3 T2 WW 0,0744 Irrigation with wastewater 4 26/jul/08 30 12 3 T3 WW 0,06 Irrigation with wastewater 4,5 30/jul/08 34 1 1 T3 WW 0,0764 Irrigation with wastewater 4,5 30/jul/08 34 2 1 T2 WW 0,0812 Irrigation with wastewater 4,5 30/jul/08 34 3 1 T4 WW 0,1011 Irrigation with wastewater 4,5 30/jul/08 34 4 1 T1 WW 0,0643 Irrigation with wastewater 4,5 30/jul/08 34 5 2 T1 WW 0,0673 Irrigation with wastewater 4,5 30/jul/08 34 6 2 T2 WW 0,064 Irrigation with wastewater 4,5 1/aug/08 36 7 2 T3 WW 0,0623 Irrigation with wastewater 4,5 1/aug/08 36 8 2 T4 WW 0,0646 Irrigation with wastewater 4,5 1/aug/08 36 9 3 T4 WW 0,0702 Irrigation with wastewater 4,5 1/aug/08 36 10 3 T1 WW 0,0531 Irrigation with wastewater 4,5 1/aug/08 36 11 3 T2 WW 0,0707 Irrigation with wastewater 4,5 1/aug/08 36 12 3 T3 WW 0,0619 Irrigation with wastewater 5 6/aug/08 41 1 1 T3 WW 0,0766 Irrigation with wastewater 5 6/aug/08 41 2 1 T2 WW 0,077 Irrigation with wastewater 5 6/aug/08 41 3 1 T4 WW 0,1022 Irrigation with wastewater 5 6/aug/08 41 4 1 T1 WW 0,0624 Irrigation with wastewater 5 6/aug/08 41 5 2 T1 WW 0,0615 Irrigation with wastewater 5 6/aug/08 41 6 2 T2 WW 0,061 Irrigation with wastewater 5 9/aug/08 44 7 2 T3 WW 0,0594 Irrigation with wastewater 5 9/aug/08 44 8 2 T4 WW 0,0709 Irrigation with wastewater 5 9/aug/08 44 9 3 T4 WW 0,0787 Irrigation with wastewater 5 9/aug/08 44 10 3 T1 WW 0,0523 Irrigation with wastewater 5 9/aug/08 44 11 3 T2 WW 0,0778 Irrigation with wastewater 5 9/aug/08 44 12 3 T3 WW 0,0626 Irrigation with wastewater 6 11/aug/08 46 1 1 T3 WW 0,0702 Irrigation with wastewater 6 11/aug/08 46 2 1 T2 WW 0,0787 Irrigation with wastewater 6 11/aug/08 46 3 1 T4 WW 0,1035 Irrigation with wastewater 6 11/aug/08 46 4 1 T1 WW 0,0607 Irrigation with wastewater 6 11/aug/08 46 5 2 T1 WW 0,0617 Irrigation with wastewater 6 11/aug/08 46 6 2 T2 WW 0,0613 Irrigation with wastewater 6 13/aug/08 48 7 2 T3 WW 0,0616 Irrigation with wastewater 6 13/aug/08 48 8 2 T4 WW 0,0649 Irrigation with wastewater 6 13/aug/08 48 9 3 T4 WW 0,0737 Irrigation with wastewater 6 13/aug/08 48 10 3 T1 WW 0,0534 Irrigation with wastewater 6 13/aug/08 48 11 3 T2 WW 0,0777 Irrigation with wastewater 6 13/aug/08 48 12 3 T3 WW 0,0675 Irrigation with wastewater 6,5 15/aug/08 50 1 1 T3 WW 0,0728 Irrigation with wastewater 6,5 15/aug/08 50 2 1 T2 WW 0,074 Irrigation with wastewater 6,5 15/aug/08 50 3 1 T4 WW 0,0968 Irrigation with wastewater 6,5 15/aug/08 50 4 1 T1 WW 0,0629 Irrigation with wastewater 6,5 15/aug/08 50 5 2 T1 WW 0,0602 Irrigation with wastewater 6,5 15/aug/08 50 6 2 T2 WW 0,0596 Irrigation with wastewater 6,5 16/aug/08 51 7 2 T3 WW 0,0633 Irrigation with wastewater 6,5 16/aug/08 51 8 2 T4 WW 0,0678 Irrigation with wastewater 6,5 16/aug/08 51 9 3 T4 WW 0,09 Irrigation with wastewater 6,5 16/aug/08 51 10 3 T1 WW 0,0545 Irrigation with wastewater 6,5 16/aug/08 51 11 3 T2 WW 0,0745 Irrigation with wastewater 6,5 16/aug/08 51 12 3 T3 WW 0,0673 Irrigation with wastewater 7 20/aug/08 55 1 1 T3 WW 0,079 Irrigation with wastewater 7 20/aug/08 55 2 1 T2 WW 0,0802 Irrigation with wastewater 7 20/aug/08 55 3 1 T4 WW 0,0995 Irrigation with wastewater 7 20/aug/08 55 4 1 T1 WW 0,0596 Irrigation with wastewater 7 20/aug/08 55 5 2 T1 WW 0,0662 Irrigation with wastewater 7 20/aug/08 55 6 2 T2 WW 0,0606 Irrigation with wastewater 7 23/aug/08 58 7 2 T3 WW 0,0617 Irrigation with wastewater 7 23/aug/08 58 8 2 T4 WW 0,0684 Irrigation with wastewater 7 23/aug/08 58 9 3 T4 WW 0,09 Irrigation with wastewater 7 23/aug/08 58 10 3 T1 WW 0,054 Irrigation with wastewater 7 23/aug/08 58 11 3 T2 WW 0,0782 Irrigation with wastewater 7 23/aug/08 58 12 3 T3 WW 0,0548 Irrigation with wastewater 7,5 26/aug/08 61 1 1 T3 WW 0,0775 Irrigation with wastewater 7,5 26/aug/08 61 2 1 T2 WW 0,0767 Irrigation with wastewater 7,5 26/aug/08 61 3 1 T4 WW 0,1102 Irrigation with wastewater 7,5 26/aug/08 61 4 1 T1 WW 0,0691 Irrigation with wastewater 7,5 26/aug/08 61 5 2 T1 WW 0,0654 Irrigation with wastewater 7,5 26/aug/08 61 6 2 T2 WW 0,0662 Irrigation with wastewater 7,5 28/aug/08 63 7 2 T3 WW 0,0684 Irrigation with wastewater 7,5 28/aug/08 63 8 2 T4 WW 0,0674 Irrigation with wastewater 7,5 28/aug/08 63 9 3 T4 WW 0,0936 Irrigation with wastewater 7,5 28/aug/08 63 10 3 T1 WW 0,055 Irrigation with wastewater 7,5 28/aug/08 63 11 3 T2 WW 0,0751 Irrigation with wastewater 7,5 28/aug/08 63 12 3 T3 WW 0,0651 Irrigation with wastewater 8 4/sep/08 70 1 1 T3 WW 0,0839 Irrigation with wastewater 8 4/sep/08 70 2 1 T2 WW 0,0841 Irrigation with wastewater 8 4/sep/08 70 3 1 T4 WW 0,1073 Irrigation with wastewater 8 4/sep/08 70 4 1 T1 WW 0,0661 Irrigation with wastewater 8 4/sep/08 70 5 2 T1 WW 0,0668 Irrigation with wastewater 8 4/sep/08 70 6 2 T2 WW 0,0734 Irrigation with wastewater 8 9/sep/08 75 7 2 T3 WW 0,0699 Irrigation with wastewater 8 9/sep/08 75 8 2 T4 WW 0,0729 Irrigation with wastewater 8 9/sep/08 75 9 3 T4 WW 0,1004 Irrigation with wastewater 8 9/sep/08 75 10 3 T1 WW 0,0569 Irrigation with wastewater 8 9/sep/08 75 11 3 T2 WW 0,0748 Irrigation with wastewater 8 9/sep/08 75 12 3 T3 WW 0,0636 Irrigation with wastewater 9 15/sep/08 81 1 1 T3 DW 0,091 Irrigation with diminirize water 9 15/sep/08 81 2 1 T2 DW 0,0952 Irrigation with diminirize water 9 15/sep/08 81 3 1 T4 DW 0,1135 Irrigation with diminirize water 9 15/sep/08 81 4 1 T1 DW 0,0839 Irrigation with diminirize water 9 15/sep/08 81 5 2 T1 DW 0,0758 Irrigation with diminirize water 9 15/sep/08 81 6 2 T2 DW 0,0684 Irrigation with diminirize water 9 21/sep/08 87 7 2 T3 DW 0,0965 Irrigation with diminirize water 9 21/sep/08 87 8 2 T4 DW 0,0887 Irrigation with diminirize water 9 21/sep/08 87 9 3 T4 DW 0,1028 Irrigation with diminirize water 9 21/sep/08 87 10 3 T1 DW 0,071 Irrigation with diminirize water 9 21/sep/08 87 11 3 T2 DW 0,0712 Irrigation with diminirize water 9 21/sep/08 87 12 3 T3 DW 0,0639 Irrigation with diminirize water 10 2/okt/08 98 1 1 T3 DW 0,092 Irrigation with diminirize water 10 2/okt/08 98 2 1 T2 DW 0,0895 Irrigation with diminirize water 10 2/okt/08 98 3 1 T4 DW 0,1051 Irrigation with diminirize water 10 2/okt/08 98 4 1 T1 DW 0,0768 Irrigation with diminirize water 10 2/okt/08 98 5 2 T1 DW 0,0732 Irrigation with diminirize water 10 2/okt/08 98 6 2 T2 DW 0,072 Irrigation with diminirize water 10 7/okt/08 103 7 2 T3 DW 0,079 Irrigation with diminirize water 10 7/okt/08 103 8 2 T4 DW 0,0684 Irrigation with diminirize water 10 7/okt/08 103 9 3 T4 DW 0,1038 Irrigation with diminirize water 10 7/okt/08 103 10 3 T1 DW 0,074 Irrigation with diminirize water 10 7/okt/08 103 11 3 T2 DW 0,0699 Irrigation with diminirize water 10 7/okt/08 103 12 3 T3 DW 0,0659 Irrigation with diminirize water 11 10/okt/08 106 1 1 T3 DW 0,091 Irrigation with diminirize water 11 10/okt/08 106 2 1 T2 DW 0,087 Irrigation with diminirize water 11 10/okt/08 106 3 1 T4 DW 0,105 Irrigation with diminirize water 11 10/okt/08 106 4 1 T1 DW 0,0776 Irrigation with diminirize water 11 10/okt/08 106 5 2 T1 DW 0,071 Irrigation with diminirize water 11 10/okt/08 106 6 2 T2 DW 0,0692 Irrigation with diminirize water 11 14/okt/08 110 7 2 T3 DW 0,08 Irrigation with diminirize water 11 14/okt/08 110 8 2 T4 DW 0,0514 Irrigation with diminirize water 11 14/okt/08 110 9 3 T4 DW 0,1012 Irrigation with diminirize water 11 14/okt/08 110 10 3 T1 DW 0,0625 Irrigation with diminirize water 11 14/okt/08 110 11 3 T2 DW 0,0689 Irrigation with diminirize water 11 14/okt/08 110 12 3 T3 DW 0,0649 Irrigation with diminirize water 12 18/okt/08 114 1 1 T3 DW 0,096 Irrigation with diminirize water 12 18/okt/08 114 2 1 T2 DW 0,093 Irrigation with diminirize water 12 18/okt/08 114 3 1 T4 DW 0,1084 Irrigation with diminirize water 12 18/okt/08 114 4 1 T1 DW 0,0756 Irrigation with diminirize water 12 18/okt/08 114 5 2 T1 DW 0,0681 Irrigation with diminirize water 12 18/okt/08 114 6 2 T2 DW 0,0689 Irrigation with diminirize water 12 23/okt/08 119 7 2 T3 DW 0,077 Irrigation with diminirize water 12 23/okt/08 119 8 2 T4 DW 0,0614 Irrigation with diminirize water 12 23/okt/08 119 9 3 T4 DW 0,0999 Irrigation with diminirize water 12 23/okt/08 119 10 3 T1 DW 0,0585 Irrigation with diminirize water 12 23/okt/08 119 11 3 T2 DW 0,0681 Irrigation with diminirize water 12 23/okt/08 119 12 3 T3 DW 0,0629 Irrigation with diminirize water ---------------------------------------------------------------------------------------------- > mod <- aov(ThetaV ~ factor(Block) + Treatmen:factor(Week)) > anova(mod) Analysis of Variance Table Response: ThetaV Df Sum Sq Mean Sq F value Pr(>F) factor(Block) 2 0.0073713 0.0036856 49.4955 2.074e-15 *** Treatmen:factor(Week) 47 0.0168852 0.0003593 4.8246 4.606e-11 *** Residuals 94 0.0069996 0.0000745 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > mod <- aov(ThetaV ~ factor(Block) + Treatmen*factor(Week)) > anova(mod) Analysis of Variance Table Response: ThetaV Df Sum Sq Mean Sq F value Pr(>F) factor(Block) 2 0.0073713 0.0036856 49.4955 2.074e-15 *** Treatmen 3 0.0139313 0.0046438 62.3627 < 2.2e-16 *** factor(Week) 11 0.0024297 0.0002209 2.9663 0.002038 ** Treatmen:factor(Week) 33 0.0005242 0.0000159 0.2133 0.999998 Residuals 94 0.0069996 0.0000745 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > TukeyHSD(mod,"Treatmen") Tukey multiple comparisons of means 95% family-wise confidence level Fit: aov(formula = ThetaV ~ factor(Block) + Treatmen * factor(Week)) $Treatmen diff lwr upr p adj T2-T1 0.012650000 0.007330061 0.0179699388 0.0000001 T3-T1 0.008130556 0.002810617 0.0134504943 0.0007251 T4-T1 0.027086111 0.021766172 0.0324060499 0.0000000 T3-T2 -0.004519444 -0.009839383 0.0008004943 0.1247735 T4-T2 0.014436111 0.009116172 0.0197560499 0.0000000 T4-T3 0.018955556 0.013635617 0.0242754943 0.0000000 > tapply(ThetaV,Treatmen,mean) T1 T2 T3 T4 0.06240833 0.07505833 0.07053889 0.08949444 > tapply(NoThetaV,Week,mean) 1 2 3 4 5 6 7 0.07895000 0.08115000 0.07830833 0.07925000 0.07316667 0.06975833 0.07020000 8 9 10 11 12 0.06957500 0.07030833 0.07101667 0.07414167 0.07667500 > tapply(ThetaV,list(Week,Treatmen),mean) T1 T2 T3 T4 1 0.06633333 0.07806667 0.07606667 0.09533333 2 0.06603333 0.07926667 0.07786667 0.10143333 3 0.06523333 0.07830000 0.07473333 0.09496667 4 0.06710000 0.07983333 0.07546667 0.09460000 5 0.05973333 0.07630000 0.06706667 0.08956667 6 0.06156667 0.07196667 0.06686667 0.07863333 7 0.05873333 0.07193333 0.06620000 0.08393333 8 0.05860000 0.07256667 0.06643333 0.08070000 9 0.05920000 0.06936667 0.06780000 0.08486667 10 0.05993333 0.07300000 0.06516667 0.08596667 11 0.06316667 0.07266667 0.07033333 0.09040000 12 0.06326667 0.07743333 0.07246667 0.09353333 > _____________________________________________________________________________________________ > RBF <- aov(ThetaExpT$ThetaV ~ factor(ThetaExpT$Block) + > factor(ThetaExpT$Week):factor(ThetaExpT$Treatment) ) > anova(RBF) Analysis of Variance Table Response: ThetaExpT$ThetaV Df Sum Sq Mean Sq factor(ThetaExpT$Block) 2 0.0108151 0.0054075 factor(ThetaExpT$Week):factor(ThetaExpT$Treatment) 63 0.0215197 0.0003416 Residuals 126 0.0112558 0.0000893 F value Pr(>F) factor(ThetaExpT$Block) 60.5330 < 2.2e-16 *** factor(ThetaExpT$Week):factor(ThetaExpT$Treatment) 3.8237 7.783e-11 *** Residuals --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > RBF <- aov(ThetaExpT$ThetaV ~ factor(ThetaExpT$Block) + > factor(ThetaExpT$Week)*factor(ThetaExpT$Treatment) ) > anova(RBF) Analysis of Variance Table Response: ThetaExpT$ThetaV Df Sum Sq Mean Sq factor(ThetaExpT$Block) 2 0.0108151 0.0054075 factor(ThetaExpT$Week) 15 0.0041717 0.0002781 factor(ThetaExpT$Treatment) 3 0.0161244 0.0053748 factor(ThetaExpT$Week):factor(ThetaExpT$Treatment) 45 0.0012236 0.0000272 Residuals 126 0.0112558 0.0000893 F value Pr(>F) factor(ThetaExpT$Block) 60.5330 < 2.2e-16 *** factor(ThetaExpT$Week) 3.1133 0.0002501 *** factor(ThetaExpT$Treatment) 60.1665 < 2.2e-16 *** factor(ThetaExpT$Week):factor(ThetaExpT$Treatment) 0.3044 0.9999915 Residuals --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > TukeyHSD(RBF,"Treatment") Error in TukeyHSD.aov(RBF, "Treatment") : 'which' specified no factors > TukeyHSD(RBF,"factor(ThetaExpT$Treatment)") Tukey multiple comparisons of means 95% family-wise confidence level Fit: aov(formula = ThetaExpT$ThetaV ~ factor(ThetaExpT$Block) + factor(ThetaExpT$Week) * factor(ThetaExpT$Treatment)) $`factor(ThetaExpT$Treatment)` diff lwr upr p adj T2-T1 0.010597917 0.005574723 0.015621111 0.0000012 T3-T1 0.008016667 0.002993473 0.013039861 0.0003436 T4-T1 0.025347917 0.020324723 0.030371111 0.0000000 T3-T2 -0.002581250 -0.007604444 0.002441944 0.5406528 T4-T2 0.014750000 0.009726806 0.019773194 0.0000000 T4-T3 0.017331250 0.012308056 0.022354444 0.0000000 > TukeyHSD(RBF,"factor(ThetaExpT$Week)") Tukey multiple comparisons of means 95% family-wise confidence level Fit: aov(formula = ThetaExpT$ThetaV ~ factor(ThetaExpT$Block) + factor(ThetaExpT$Week) * factor(ThetaExpT$Treatment)) $`factor(ThetaExpT$Week)` diff lwr upr p adj 2-1 0.0022000000 -0.0112915964 0.015691596 0.9999999 3-1 -0.0006416667 -0.0141332631 0.012849930 1.0000000 3.5-1 0.0003000000 -0.0131915964 0.013791596 1.0000000 4-1 -0.0057833333 -0.0192749297 0.007708263 0.9807680 4.5-1 -0.0091916667 -0.0226832631 0.004299930 0.5643712 5-1 -0.0087500000 -0.0222415964 0.004741596 0.6477289 6-1 -0.0093750000 -0.0228665964 0.004116596 0.5295103 6.5-1 -0.0086416667 -0.0221332631 0.004849930 0.6677096 7-1 -0.0079333333 -0.0214249297 0.005558263 0.7884928 7.5-1 -0.0048083333 -0.0182999297 0.008683263 0.9969774 8-1 -0.0022750000 -0.0157665964 0.011216596 0.9999998 9-1 0.0062083333 -0.0072832631 0.019699930 0.9638857 10-1 0.0018500000 -0.0116415964 0.015341596 1.0000000 11-1 -0.0014750000 -0.0149665964 0.012016596 1.0000000 12-1 -0.0008000000 -0.0142915964 0.012691596 1.0000000 3-2 -0.0028416667 -0.0163332631 0.010649930 0.9999952 3.5-2 -0.0019000000 -0.0153915964 0.011591596 1.0000000 4-2 -0.0079833333 -0.0214749297 0.005508263 0.7806960 4.5-2 -0.0113916667 -0.0248832631 0.002099930 0.2052535 5-2 -0.0109500000 -0.0244415964 0.002541596 0.2621502 6-2 -0.0115750000 -0.0250665964 0.001916596 0.1843734 6.5-2 -0.0108416667 -0.0243332631 0.002649930 0.2775172 7-2 -0.0101333333 -0.0236249297 0.003358263 0.3905650 7.5-2 -0.0070083333 -0.0204999297 0.006483263 0.9058749 8-2 -0.0044750000 -0.0179665964 0.009016596 0.9986299 9-2 0.0040083333 -0.0094832631 0.017499930 0.9996182 10-2 -0.0003500000 -0.0138415964 0.013141596 1.0000000 11-2 -0.0036750000 -0.0171665964 0.009816596 0.9998671 12-2 -0.0030000000 -0.0164915964 0.010491596 0.9999901 3.5-3 0.0009416667 -0.0125499297 0.014433263 1.0000000 4-3 -0.0051416667 -0.0186332631 0.008349930 0.9938879 4.5-3 -0.0085500000 -0.0220415964 0.004941596 0.6843839 5-3 -0.0081083333 -0.0215999297 0.005383263 0.7606483 6-3 -0.0087333333 -0.0222249297 0.004758263 0.6508201 6.5-3 -0.0080000000 -0.0214915964 0.005491596 0.7780682 7-3 -0.0072916667 -0.0207832631 0.006199930 0.8756776 7.5-3 -0.0041666667 -0.0176582631 0.009324930 0.9993965 8-3 -0.0016333333 -0.0151249297 0.011858263 1.0000000 9-3 0.0068500000 -0.0066415964 0.020341596 0.9204690 10-3 0.0024916667 -0.0109999297 0.015983263 0.9999992 11-3 -0.0008333333 -0.0143249297 0.012658263 1.0000000 12-3 -0.0001583333 -0.0136499297 0.013333263 1.0000000 4-3.5 -0.0060833333 -0.0195749297 0.007408263 0.9697055 4.5-3.5 -0.0094916667 -0.0229832631 0.003999930 0.5074372 5-3.5 -0.0090500000 -0.0225415964 0.004441596 0.5913084 6-3.5 -0.0096750000 -0.0231665964 0.003816596 0.4731081 6.5-3.5 -0.0089416667 -0.0224332631 0.004549930 0.6118196 7-3.5 -0.0082333333 -0.0217249297 0.005258263 0.7398602 7.5-3.5 -0.0051083333 -0.0185999297 0.008383263 0.9942829 8-3.5 -0.0025750000 -0.0160665964 0.010916596 0.9999987 9-3.5 0.0059083333 -0.0075832631 0.019399930 0.9766245 10-3.5 0.0015500000 -0.0119415964 0.015041596 1.0000000 11-3.5 -0.0017750000 -0.0152665964 0.011716596 1.0000000 12-3.5 -0.0011000000 -0.0145915964 0.012391596 1.0000000 4.5-4 -0.0034083333 -0.0168999297 0.010083263 0.9999484 5-4 -0.0029666667 -0.0164582631 0.010524930 0.9999915 6-4 -0.0035916667 -0.0170832631 0.009899930 0.9999001 6.5-4 -0.0028583333 -0.0163499297 0.010633263 0.9999948 7-4 -0.0021500000 -0.0156415964 0.011341596 0.9999999 7.5-4 0.0009750000 -0.0125165964 0.014466596 1.0000000 8-4 0.0035083333 -0.0099832631 0.016999930 0.9999255 9-4 0.0119916667 -0.0014999297 0.025483263 0.1427516 10-4 0.0076333333 -0.0058582631 0.021124930 0.8323616 11-4 0.0043083333 -0.0091832631 0.017799930 0.9991104 12-4 0.0049833333 -0.0085082631 0.018474930 0.9955808 5-4.5 0.0004416667 -0.0130499297 0.013933263 1.0000000 6-4.5 -0.0001833333 -0.0136749297 0.013308263 1.0000000 6.5-4.5 0.0005500000 -0.0129415964 0.014041596 1.0000000 7-4.5 0.0012583333 -0.0122332631 0.014749930 1.0000000 7.5-4.5 0.0043833333 -0.0091082631 0.017874930 0.9989162 8-4.5 0.0069166667 -0.0065749297 0.020408263 0.9145216 9-4.5 0.0154000000 0.0019084036 0.028891596 0.0102437 10-4.5 0.0110416667 -0.0024499297 0.024533263 0.2495770 11-4.5 0.0077166667 -0.0057749297 0.021208263 0.8206976 12-4.5 0.0083916667 -0.0050999297 0.021883263 0.7125787 6-5 -0.0006250000 -0.0141165964 0.012866596 1.0000000 6.5-5 0.0001083333 -0.0133832631 0.013599930 1.0000000 7-5 0.0008166667 -0.0126749297 0.014308263 1.0000000 7.5-5 0.0039416667 -0.0095499297 0.017433263 0.9996876 8-5 0.0064750000 -0.0070165964 0.019966596 0.9487494 9-5 0.0149583333 0.0014667369 0.028449930 0.0151166 10-5 0.0106000000 -0.0028915964 0.024091596 0.3137269 11-5 0.0072750000 -0.0062165964 0.020766596 0.8775993 12-5 0.0079500000 -0.0055415964 0.021441596 0.7859085 6.5-6 0.0007333333 -0.0127582631 0.014224930 1.0000000 7-6 0.0014416667 -0.0120499297 0.014933263 1.0000000 7.5-6 0.0045666667 -0.0089249297 0.018058263 0.9982809 8-6 0.0071000000 -0.0063915964 0.020591596 0.8966805 9-6 0.0155833333 0.0020917369 0.029074930 0.0086842 10-6 0.0112250000 -0.0022665964 0.024716596 0.2256286 11-6 0.0079000000 -0.0055915964 0.021391596 0.7936171 12-6 0.0085750000 -0.0049165964 0.022066596 0.6798597 7-6.5 0.0007083333 -0.0127832631 0.014199930 1.0000000 7.5-6.5 0.0038333333 -0.0096582631 0.017324930 0.9997770 8-6.5 0.0063666667 -0.0071249297 0.019858263 0.9553666 9-6.5 0.0148500000 0.0013584036 0.028341596 0.0165983 10-6.5 0.0104916667 -0.0029999297 0.023983263 0.3307898 11-6.5 0.0071666667 -0.0063249297 0.020658263 0.8896480 12-6.5 0.0078416667 -0.0056499297 0.021333263 0.8024391 7.5-7 0.0031250000 -0.0103665964 0.016616596 0.9999831 8-7 0.0056583333 -0.0078332631 0.019149930 0.9843135 9-7 0.0141416667 0.0006500703 0.027633263 0.0299922 10-7 0.0097833333 -0.0037082631 0.023274930 0.4531110 11-7 0.0064583333 -0.0070332631 0.019949930 0.9498107 12-7 0.0071333333 -0.0063582631 0.020624930 0.8932006 8-7.5 0.0025333333 -0.0109582631 0.016024930 0.9999990 9-7.5 0.0110166667 -0.0024749297 0.024508263 0.2529667 10-7.5 0.0066583333 -0.0068332631 0.020149930 0.9359982 11-7.5 0.0033333333 -0.0101582631 0.016824930 0.9999611 12-7.5 0.0040083333 -0.0094832631 0.017499930 0.9996182 9-8 0.0084833333 -0.0050082631 0.021974930 0.6963560 10-8 0.0041250000 -0.0093665964 0.017616596 0.9994636 11-8 0.0008000000 -0.0126915964 0.014291596 1.0000000 12-8 0.0014750000 -0.0120165964 0.014966596 1.0000000 10-9 -0.0043583333 -0.0178499297 0.009133263 0.9989846 11-9 -0.0076833333 -0.0211749297 0.005808263 0.8254130 12-9 -0.0070083333 -0.0204999297 0.006483263 0.9058749 11-10 -0.0033250000 -0.0168165964 0.010166596 0.9999624 12-10 -0.0026500000 -0.0161415964 0.010841596 0.9999981 12-11 0.0006750000 -0.0128165964 0.014166596 1.0000000 > ___________________________________________________________________________________________ library(RODBC) canal <- odbcConnectExcel("final_results_Oxct08") A<- sqlFetch(canal,"A") odbcCloseAll() str(A) model <- lm(ThetaV ~ Block + Treatment + condition, data = A) residual<-residuals(model) # Only efect time model2 <- lm(residual ~ DateBTC, data=A) summary(model2) # Other case model3 <- lm(ThetaV ~ Treatment, data = A) summary(model3) model4 <- lm(ThetaV ~ condition+DateBTC, data = A) summary(model4) model5 <- lm(ThetaV ~ condition, data = A) summary(model5) -------------------------------------------------------------------------------------------------- In this particular case, the fixed-effect model and the RCB design will give the same p-values: bad.aov <- aov(ThetaV ~ Treatment + Block, data=table) summary(bad.aov) ------------------------------------------------------------------ library(nlme) m2 = lme(ThetaV ~ Treatment, random = ~1|Block, data=table) anova(m2) detach("package:nlme") library(lme4) m3 = lmer(ThetaV ~ Treatment+(1|Block), data=table) anova(m3) -------------------------------------------------------------------------------------------------- library(lme4) water<-read.csv("locationofattachedfile",header=T) attach(water) model<-lmer(ThetaV~trt+(block|trt)+week+condition,data=water) model anova(model) ------------------------------------------------------------------------------------------------ alis.lme=lme(fixed=response~treatment-1 + time + time*treatment,data=alis.grDat,random=~1|Block) summary(alis.lme) -------------------------------------------------------------------------------------------------------- -- View this message in context: http://www.nabble.com/randomized-block-design-analysis-PROBLEM-tp24734276p24734276.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.