3
$\begingroup$

My colleagues observed in an experiment involving categorical and continuous independent variables, how the species composition changes. Approximately equal numbers of microbes were used in the experiments, and at the end of the trials, the surviving species were genetically determined. Only relative frequencies (not count data) of the individuals of each species could be estimated based on quantitative genetic measures.

However, this also means that my response variable is not binary coded (0/1), and probabilities for survival are already available.

Now my question: Can I still perform a multinomial logistic regression in this case? How should I do it in R? Or: Is there already an implementation for this in R? Thank you for suggestions, ideas, and assistance!

Additional background info

A community of bacteria has been grown together in medium. For every experiment, the community has been initialized with the same composition, i.e. every culture started had the same number of individuals belonging to one of the 12 species contained in the population.

Moreover, we tested whether the combination of the supernatants of all species together either increased or decreased the growth of any of these 12 species when cultured separately. This effect of supernatants has been expressed in either a positive or a negative continuous value.

Furthermore, it could be that the individuals belonging to the same species may build microcolonies/clusters inside the liquid medium. Thus, we either slowly shaked the medium with the bacteria composition or didn't shake it.

In the end we were interested which species surveyed finally in each experimental group. Thus, my colleagues performed qPCRs to quantitatively determine how many characteristic DNA sequences for every bacterium could be found. We used this as a proxy for the number of cells in the medium, and thus calculated relative frequencies as proxies for the species composition.

Since I have been asked to analyze this setup, I'd like to know how I can evaluate whether the final species composition is impacted by which explanatory variable (either numeric or categorical).

Thanks in advance for any suggestions on how to analyze such a kind of multinomial model (species composition = starting composition + supernatant effect + treatment).

$\endgroup$
3
  • 1
    $\begingroup$ Difficult to say without more details & context, please provide ... but without the counts maybe it is better to think about this as compositional-data, peruse that tag! $\endgroup$ Commented Jan 30 at 15:00
  • $\begingroup$ @kjetilbhalvorsen Thanks a lot for your suggestions. Updated the initial post. Hope the problem is more easy to understand right now ... $\endgroup$
    – Anti
    Commented Jan 30 at 19:17
  • $\begingroup$ Is supernatants a typo? If not, please explain! $\endgroup$ Commented Feb 7 at 19:16

1 Answer 1

7
+50
$\begingroup$

The regular multinomial regression model is usable as long as the model-fitting procedure accepts fractional responses and robust standard errors are used. This is known as the fractional multinomial regression model based on a quasi-likelihood function. See their tiny difference in likelihood function construction in "Relationship between the likelihood functions used in fmlogit and mlogit" https://maartenbuis.nl/software/likelihoodFmlogit.pdf.

Since qPCRs counted characteristic DNA sequences for every bacterium among 12 species, you do have count data. When the count is large enough, the process can be represented by a normal distribution instead of Poisson. The challenge here is that the counts of 12 species cultured in the same dish is correlated, positively if they thrive from the same nutrients or excrete activators and negatively if they compete for nutrients or excrete inhibitors. Here seemingly unrelated regression (SUR) is helpful in fitting cross-equation correlation of the error term. This is done in R by systemfit::systemfit() and will generate a 12-by-12 covariance matrix of the error term across species-specific equations. See Henningsen, A., & Hamann, J. D. (2007). systemfit: A package for estimating systems of simultaneous equations in R. Journal of Statistical Software, 23(4). https://doi.org/10.18637/jss.v023.i04.

We could also consider a generalized linear model with random intercepts and maybe also random slopes clustered by dish to represent the within-dish correlation across the 12 species. In R, we can use nlme::lme(count ~ supernatant * shake * species, random = ~ 1 | dish, weights = ~ varIdent(form = ~ 1 | species)), lme4::glmer(count ~ supernatant * shake * species + (1 | dish), family = poisson), and glmmTMB::glmmTMB(count ~ supernatant * shake * species + (1 | dish), family = poisson) and several families for generalized Poisson and negative binomial models.

If the response is better represented by proportions of 12 species in each dish, several options are outlined in slides by Buis (2010) "Analyzing Proportions" https://maartenbuis.nl/presentations/berlin10.pdf.

Controlling the starting composition as predictors is a good practice in causal inference, instead of taking the difference in composition as the response. How to represent the compositional predictors may need trials. Typical ways of incorporating 11 proportions may have severe multicollinearity that inflates the standard errors a lot. The book "Analyzing compositional data with R" instructs to use the ilr transformation, but this may be difficult to interpret. Using additive log-ratio transformation of compositional predictors seems okay.

$\endgroup$
3
  • 2
    $\begingroup$ I don't think it would be good to take the qPCR data as count data. There is not only the possible effect and correlation of the variable of interest (i.e. dish, nutrients), but also of the exponential amplification involved in qPCR. It is possible that tiny changes in the sample preparation procedure lead to orders-of-magnitude changes in the count data. I think it would be more useful to OP to write the formulas using the proportion-fitting functions you link to. $\endgroup$
    – dherrera
    Commented Feb 12 at 17:48
  • 1
    $\begingroup$ The documentation I linked to includes formulae. Relationship between the likelihood functions in fmlogit and mlogit maartenbuis.nl/software/likelihoodFmlogit.pdf $\endgroup$
    – DrJerryTAO
    Commented Feb 13 at 22:31
  • $\begingroup$ @dherrera, I am not expert at qPCR technology, but I understand that amplification proliferates all characteristic sequences proportionally by an unknown factor. Because of that, a random intercept by dish adjusts the common amplification effect for all 12 species developed in the same dish, while coefficients (fixed effects) of species represent ratios of counts among 12 species, just as I demonstrated in the sample scripts of mixed-effect count models. $\endgroup$
    – DrJerryTAO
    Commented Feb 16 at 11: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.