In my particular case I am comparing damaged fruit in several treatment fields vs. several control fields

For simplicity:

Both treatment and control have 10 bushes each. a cluster of fruit is taken from each bush (clusters vary in size). The proportion of damaged fruit for each cluster is noted. (I do have access to the original # of fruit per cluster)

For each bush I have the proportion of damaged fruit.

When I perform a test I would like to compare

H0: "Proportion damaged fruit in" treatment <= Proportion damaged fruit in 
Ha: "" treatment > "" control 

(treatment is a lure which is supposed to attract damage)

I performed a t.test(propotion.damaged ~ treatment) because I am comparing mean(proportion.damaged in treatment) vs mean(proportion damaged in control)

However, it occurs to me that

mean(proportion.damaged) = 1/n*sum(proportion.damaged) = (total damaged fruit)/(all the fruit)

Does this mean I should perform a proportions test?

prop.test((damaged fruit treatment/total fruit treatment) vs. (damaged fruit control/total fruit control)

The difference here would be that my sampling unit in the t.test scenario is a bush. Whereas in the proportions test scenario my sampling unit would be a fruit.

Thank you very much for your help.


2 Answers 2


I think you have framed the question correctly. How you approach the analysis depends upon if you consider the unit of observation as a cluster or as an individual fruit. That is, if you are considering each fruit a countable unit or not.

Usually in horticulture, measurements like "percent diseased" or "percent control" are treated as an inherent proportion or percentage. That is, there is not necessarily a countable unit underlying the percentage. Imagine a turfgrass plot. You might say it has 50% dollar spot inspection --- and you might have some tools to make this measurement more precise --- but there's not a countable area that you can treat as an observation unit.

Likewise, in your case it might make sense to treat each cluster or each bush as the experimental unit.

My inclination in this case would be to not use each fruit as an experimental unit. To me, that wouldn't match up with how people or pests interact with clusters of fruit.

  • $\begingroup$ If I proceed with Prop.Damaged per bush would it make sense to use a t test? or would there be issues with variance homogeneity as was addressed by a_statistician? In which case I could do logarithmic regression on the proportion of damaged fruit per bush. $\endgroup$
    – NicoFish
    Commented Oct 31, 2018 at 17:06
  • $\begingroup$ I see people here did something similar and used a t.test. However, I opted against arcsine transformation because my data is skewed towards 0 infestation, and according to link arcsine transformation "does not work well if p is close to 0 or 1." $\endgroup$
    – NicoFish
    Commented Oct 31, 2018 at 17:06
  • $\begingroup$ A t-test may work well. It depends on the underlying distribution of the data. Or as you suggest, if there is a transformation that would work. Otherwise you might look at a nonparametric approach (Wilcox-Mann-Whitney) or a generalized linear model approach (Gamma regression). $\endgroup$ Commented Oct 31, 2018 at 17:32
  • $\begingroup$ Also note that Welch's t-test doesn't require equal variance between groups. $\endgroup$ Commented Oct 31, 2018 at 22:32

Should use mixed effect logistic regression.

Data format:

         Cluster  damaged  count treatment 
            1         1      2       1
            1         0      98      1
            2         1      15      1
            2         0      75      1

damaged = 1 means damaged and = 0 means not damaged. count = # of fruits. Treatment is code for two treatment (treatment and control).

The model would be $$\log\left (\frac {\Pr(Y_{ij}=1)}{\Pr(Y_{ij}=0)} \right) = \beta_0 +\beta_1 X_{i} + \gamma_i$$

Where $Y_{ij}$ = 1 if the j-th fruit in i-th cluster is damaged, = 0 otherwise. $X_i$ is the treatment received in i-th cluster. $\gamma_i \sim N(0,\sigma^2)$ is rnadom intercept for cluster $i$.

In the program, the information in column count should be used. the common statements are: weight, count, freq, ...

  • $\begingroup$ Perhaps I was unclear each cluster is a grouping of several fruits. so for example my data would be as follows cluster = 1 Prop.Damaged = .02 #damaged = 2 #Fruit = 100 $\endgroup$
    – NicoFish
    Commented Oct 31, 2018 at 2:42
  • $\begingroup$ "cluster = 1 Prop.Damaged = .02 #damaged = 2 #Fruit = 100". Do not need "Prop.Damaged = .02". This line will be convert to two lines in my data format: 1 1 2 trt, 1 0 98 trt. Need to know this cluster is treatment or control. The second line 98 means 98 fruits not damaged. $\endgroup$
    – user158565
    Commented Oct 31, 2018 at 2:49
  • $\begingroup$ hmmm, see what you mean for the data format. However, I do not understnad how this would work as a model in R. I would have glm("?? ", family = 'binomial). Could you point me towards something I could read? Is there a problem with my original approach? $\endgroup$
    – NicoFish
    Commented Oct 31, 2018 at 3:09
  • $\begingroup$ your original approach is not good. t test is special case of linear model. In the linear model, one assumptions is homogeneity, i.e., equal variance. In your situation, variance = p(1-p)/n. So each proportion has its unique variance. For R, basically, you are correct, but need to add random intercept and count information. I am not familiar with R. I can do it in SAS very easily. $\endgroup$
    – user158565
    Commented Oct 31, 2018 at 3:10
  • $\begingroup$ I used Welch's t.test to account for unequal variance. sorry I edited my question because the R formula I had written would not be correct. A resource would be greatly appreciated. I suspect that I will have to change the format to suit R. Thanks $\endgroup$
    – NicoFish
    Commented Oct 31, 2018 at 3:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.