Sitelevel Analysis
In this section, the aim is not to provide the findings of each individual site but rather we provide the methods used in the site level analysis.
For highlights of results obtained in each individual sentinel site, see the report of AfSIS Objective 4 here.
Mixed effects models were implemented in R to analyze data from diagnostic trials. One of the following four standard models was used for all sites depending on whether there was one season or multiple seasons or whether a control factor was included:
lmer(response~ 1 + TrtDesc + (1Cluster) + (1clustfield),data=sitedata, REML=T)
lmer(response~ 1 + TrtDesc + (1Cluster) + (1clustfield)+ (1Season),data=sitedata, REML=T)
lmer(response~ 1 + control + TrtDesc + (1Cluster) + (1clustfield),data=sitedata, REML=T)
lmer(response~ 1 + control + TrtDesc + (1Cluster) + (1clustfield)+ (1Season),data=sitedata, REML=T)
The decision on whether or not to retain control term in the model was based on whether adjusting for control was significant (P<0.05). In Kiberashi for example, adjusting for the control was highly significant (p<0.001) and in general, the decrease in the difference between treatment and control yield for this site is estimated as 0.341 for every extra one tonne increase in control yield.
For each of the sites, variance contribution from the random factors was assessed. In many cases, the variance component associated with cluster has been very low suggesting that fields within the same cluster are not more similar than fields in differentclusters i.e., no cluster effect in many cases. The example of Koloko sentinel site in Mali is shown in Table 2.
Table 2. Variance components for random variables in Koloko sentinel site after running the first model above
Component  Variances  Std.Dev  Percent 
Field  0.060  0.245  28.9% 
Cluster  0.000  0.000  0% 
Residual  0.147  0.384  71.1% 
The R scripts are designed to dump ready to use figure of treatment effects (see Figure 7) in the same scale as that used in analysis and also ready to use tables such as table of treatment estimates and 95% confidence interval limits (back transformed onto Ratio Scale; Table 3), table of variance components, table of correlation of fixed effects among others, all in a word document. This Rcode is designed as an R function (see “SiteMixed_resent.r” available here) and includes scripts to format the data, run the mixed effects models adjusting for control where needed, calculating correlation matrix from covariance matrix (lmer does not give degrees of freedom or pvalues for the fixed effects so this is an extension to the capability), calculate variance components, set up the outputting of results  either PDF or to word and for making plots of the treatment estimates and confidence intervals. This is automatically called by the main R code referred to “Yield Analysis 112012.r” and available here.
Figure 7. Effect of nutrient omission and application of amendments on maize yield in Koloko, Mali, 2009 cropping season
The interpretation on the log ratio scale is similar to that on the difference scale: positive estimates indicate that the treatment effect (yield or plant growth) is estimated to be greater than the average control; negative estimates indicate that the average control estimate is greater than the treatment effect. Confidence intervals that span 0 indicate that there is no evidence (testing at the 5% level) of a difference between the treatment estimate and the average control estimate. In the Koloko example above, all treatments except PK resulted in significant yield increases over the control. Also, NK and PK have similar yields which are significantly lower than all the other treatments.
Table 3. Estimates of the treatment difference relative to control and 95% confidence interval limits for Koloko, Mali, 2009 cropping season
Estimate 
SE 
tval 
DF 
pval 
Lower 
Upper 

NPK+Manure 
0.863 
0.088 
9.850 
182 
<0.001 
0.690 
1.036 
NPK 
0.641 
0.071 
9.065 
182 
<0.001 
0.502 
0.781 
NPK+Lime 
0.624 
0.088 
7.130 
182 
<0.001 
0.452 
0.797 
NP 
0.587 
0.088 
6.707 
182 
<0.001 
0.415 
0.760 
NPK+MN 
0.579 
0.088 
6.611 
182 
<0.001 
0.406 
0.752 
NK 
0.221 
0.088 
2.523 
182 
0.0125 
0.048 
0.394 
PK 
0.094 
0.088 
1.075 
182 
0.2836 
0.079 
0.267 