0
$\begingroup$

I've been reading several questions asked in this website but I couldn't quite find the answer that I'm looking for.

It seems that my experimental design it's not that typical. It goes like this: I work with plant's genetics, and the idea is to compare seed viability among different plant genotypes (plant's genotype would be my predictor variable). The way I obtain my data is by taking some plant's fruits (from each genotype) and counting collapsed seeds vs normal seeds (we consider only these two categories). The fruits are taken from each plant in a random way, so it's not a repeated mesures kind of desing.

If I understand correctly, I may need to use a mixed effects model, since I count normal vs collapsed on ~ 5 fruits from 10 plants for each genotype, and I would like to include "plant" as a random effect in the model (since I would like to report that the 5 fruits are from the same plant).

Also, since I have only two categories for my response variable, I understand I could use a logistic regression model, from all the reading I've been doing. As I've coded it, my response variable would be a two column matrix with the number of "collapsed" on the left and the number of "normal" on the right, and each row would represent a fruit (from each plant and from each genotype). As you can see, I want to compare genotypes, but the thing is I don't take information DIRECTLY from them, since I analyze seeds which are nested whithin plants which are nested between genotypes. That's why I didn't built my data set with 0s and 1s in my response variable, and I don't know if this is correct.

Regarding this last comment, my question (finally): is it correct to apply mixed logistic regression (glmm) for this kind of experimental design? Is the way I entered my response variable correct?

The model I would implement (in Rstudio) is the following

model<- glmer(binomial_response ~ genotype + (1|plant), 
                family = binomial(link = "logit"), data = dataset)

I look forward to your replies, and sorry in advance for the extent of my explanation!

$\endgroup$
1
  • $\begingroup$ You make a good point that seeds are nested within plants, which are nested within genotypes. I think your approach is how I would approach the problem. I'm not super familiar with lme4, but if I were to write this as a Bayesian hierarchical model, I it would look very close to your proposed model. $\endgroup$ Commented Feb 15, 2019 at 14:24

1 Answer 1

1
$\begingroup$

You seem to be on the right track. You might want to think a bit more about how you want to handle the random effects, based on your knowledge of the subject matter.

Logistic regression for a dichotomous outcome is a standard choice. Your structuring of outcome data for logistic regression in R is one of 3 that is allowed. From the manual page for family() in the stats package, one choice for outcome data in logistic regression is the one you made:

As a two-column integer matrix: the first column gives the number of successes and the second the number of failures.

So in your case "collapsed" would be counted as "success."

Your formula only includes random intercepts (deviations of log-odds from the global log-odds of "collapsed" ) for the plants. It would not account for random effects related to the influence of genotype among plants (slopes). If that's what you intend based on your understanding of the subject matter, then your formula is fine. Otherwise, look at this site's lmer cheat sheet for how to specify mixed-effects models with random intercepts and random slopes.

$\endgroup$
4
  • $\begingroup$ Dear @EdM thanks for your input. The idea is to count "collapsed" as a "success" since I want to obtain probabilities for collapsed seeds in each genotype, and also compare if these probabilities are significant between them. Do you think this model could allow me to do so? I'm looking into the link you've sent me. I think I don't quite understand. How would I inform about the influence of genotype among plants? I don't quite understand how could inform that plants are nested within genotype if genotype is a fixed effec itself. $\endgroup$ Commented Feb 15, 2019 at 19:02
  • $\begingroup$ @NicolásSetzes in a mixed model it's possible to allow a fixed factor (like genotype) to have both an overall effect and differences of effects among the random factors (in your case, among plants). Output from such a model would report not only a main effect for genotype but also random effects for plants representing the variability among plants in terms of the genotype effect. If that possibility is not of importance to you, then your proposed model (which only allows for random intercepts) should be fine. $\endgroup$
    – EdM
    Commented Feb 15, 2019 at 20:01
  • $\begingroup$ Dear @EdM thanks for your kind advice. I didn't know that you could include a factor both as a random and a fixed effect. I'll try it, since I'm interested in doing so. In your opinion, is it correct to perform tukey to inform differences between the different levels of my fixed effect (Genotype)? I know that performing tukey on an ANOVA model is standard, but I couldn't find examples of tukey when dealing with Logistic Regression. Thanks in advance! $\endgroup$ Commented Feb 19, 2019 at 18:21
  • $\begingroup$ @NicolásSetzes you do not include your fixed factor as a random effect. Rather you allow for differences among plants in the effect of genotype as a random effect, with a term like (genotype|plant) in your model. Look carefully at the cheat sheet I linked in my answer, to understand which analyses will be performed depending on how other terms are entered; this requires some care. See this page for post-hoc tests of mixed models; evaluating differences among coefficients shouldn't depend on ordinary vs generalized linear models. $\endgroup$
    – EdM
    Commented Feb 19, 2019 at 18:43

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.