4
$\begingroup$

Is it appropriate to analyze the relationship between a proportional explanatory variable and a proportional response variable (as cbind(option 1, option 2), or as a proportion with weights) using logistic regression? If so, is there a way to weight the proportional explanatory variable to account for different sample sizes for each trial?

Here are the details of my study:

I would like to evaluate whether individual insect preferences for pairs of host plants are correlated. Insect preference was tested using three separate choice assays:

1: plant A vs. plant B, 2: plant A vs. plant C, and 3: plant A vs. plant D.

In each assay, we recorded the number of eggs laid on the two available plants. Each individual was tested on all three assays. Assay 1 was diagnostic, so all insects started on that assay, after which they were moved onto assays 2 and 3 in random order. A total of 79 individuals laid eggs in all three assays. The total number of eggs laid in assay 1 ranged from 2 to 126; in assays 2 and 3, from 2 eggs to 178.

My main questions are, is preference (proportion of eggs laid on plant A) in assay 1 correlated with preference in assay 2 and/or with preference in assay 3?

Possible solutions (and associated concerns):

  1. Use logistic regression with proportion of eggs laid on plant A in assay 1 as an explanatory variable, including only those females that meet a minimum threshold for total eggs laid in assay 1 (>15). This both reduces my total sample size (down to n = 53), and does not take into account the greater confidence I have in the preference of an insect that lays 30/75 eggs on plant A in assay 1 compared to an insect that lays 6/15 eggs on plant A in assay 1.

  2. Use a negative binomial mixed model (glmer.nb) with the rough form: plant A eggs ~ log(total eggs) * Assay + (1|insect ID). While this can tell me whether the eggs laid on plant A as a function of total eggs laid differs between the three assays, I don't believe it is informative about how similar the preferences are. I also looked at poisson and quasipoisson, but these models had worse fits than the negative binomial model.

$\endgroup$
  • $\begingroup$ Welcome to the site, @rstewa03. Please could you elaborate a little on your concern about the sample sizes - what were your sample sizes for each assay? Were different insects used for each assay? $\endgroup$ – Izy Jun 3 '19 at 22:38
  • $\begingroup$ Thank you! Each individual was tested on all three assays: assay 1 was diagnostic, so all insects started on that assay, after which they were moved onto assays 2 and 3 in random order. A total of 79 individuals laid eggs in all three assays. The total number of eggs laid in assay 1 ranged from 2 to 126; in assays 2 and 3, from 2 eggs to 178. $\endgroup$ – rstewa03 Jun 4 '19 at 14:09
  • $\begingroup$ Thanks, that's clearer. I think that structure should be reflected in your analysis, so suggest you edit your question to include that information. Hopefully someone will have a good suggestion for how to analyse this sort of data. $\endgroup$ – Izy Jun 4 '19 at 14:29
  • $\begingroup$ You could also search for previously published papers that had this kind of experimental structure and see what methods they used. If you find a good answer, please come back and explain it here (you are allowed to answer your own question). $\endgroup$ – Izy Jun 4 '19 at 14:34
  • $\begingroup$ Thanks @Izy, I will continue to look for similar experimental designs described in the literature and on different forums. $\endgroup$ – rstewa03 Jun 5 '19 at 20:16
1
+50
$\begingroup$

One approach could be to treat individual eggs, instead of entire "clutches", as your units of observation, with the dependent variable coding for whether an egg has been laid on plant A ("success" = 1) or not (0). Such data is appropriately modelled by Binomial logistic regression. In addition, it will reflect the fact that you have intuitively more confidence in data coming from bigger clutches, because there will be as many data points as eggs per insect and assay.

Regarding the correlation between insect preferences across assays, it is reflected by the variance of the random intercept for insects. The role of the random intercept is to model the lack of independence between observations (eggs in assays) in a level of the grouping factor (individual insects), i.e. their general idiosyncratic preference for, or reluctance towards, plant A across assays.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ +1, good suggestions. This (and @rstewa03 's suggestions too I believe) rely on the simplifying assumption that each egg-laying event is independent. Any thoughts on how/whether to reflect the ordering of the assays in the analysis? $\endgroup$ – Izy Jun 10 '19 at 11:34
  • 1
    $\begingroup$ I think it would be sensible to consider ordering either as a random or fixed effect - the fact that it has been included in the experimental design suggests that it is considered as something that may be an issue. I don't think the complete factorial of ordering was carried out though - it was either 1-2-3 or 1-3-2. As you note, individual is nested within order, so I think the random intercept would be (1|Ordering/Individual) in R (glm) parlance? $\endgroup$ – Izy Jun 10 '19 at 14:37
  • 1
    $\begingroup$ Order is of considerable interest, and I have included it in my models thus far as a fixed effect with two groups (as @Izy noted). $\endgroup$ – rstewa03 Jun 12 '19 at 15:55
  • 1
    $\begingroup$ @Izy To add Odering as a random effect with Individuals nested within, (1|Ordering/Individual) is correct indeed. It expands to (1|Ordering) + (1|Ordering:Individual). The latter implies that one variance of Individual intercepts will be estimated separately for each Ordering. $\endgroup$ – Ous Jun 13 '19 at 21:06
  • 1
    $\begingroup$ @rstewa03 The variance of the random intercept of ID is not directly link to variance explained, and I would not know how to get that. If you only need to convince yourself (or someone else) that preferences are correlated across assays, you can qualitatively compare the value of the variance to the estimate of the Assay fixed effect, just like Ben Bolker suggested in your second link. If you need numbers and a more rigorous criterion, Bayesian estimation of lmm provide credible intervals (the Bayesian equivalent of confidence intervals) for random parameters. $\endgroup$ – Ous Jun 13 '19 at 21:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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