statdivlab / corncob

Count Regression for Correlated Observations with the Beta-binomial
102 stars 22 forks source link

request for vignette for continuous covariate #146

Closed AustinLG closed 10 months ago

AustinLG commented 1 year ago

Please note that the current vignette on CRAN, linked here states that it includes examples for continuous covariates, but no such example is provided. I have yet to see an example of corncob used with continuous covariates and would very much like to see this. At present, it appears any numeric integer covariate provided to differentialTest() is considered as a factor and the many levels this introduces produces a convergence error.

adw96 commented 1 year ago

Hi @AustinLG - can you please provide a reproducible example of a continuous covariate producing an error as a result of being converted to a factor automatically by differentialTest()? This would help us to understand and troubleshoot your issue. Thanks!

AustinLG commented 1 year ago

I determined that with more than one continuous covariates and the test method set to "ward", corncob will throw a convergence error. I'm not in a position to share data but simulating two continuous variables and using them with the soil dataset shows it happening. Changing the test method to LRT resolves it.

The key issue here is that the vignette clearly mentions modeling microbial data with continuous covariates in the introduction, but provides no example of the package doing this. Every covariate shown in the vignette is categorical data.

adw96 commented 1 year ago

If you're able to share that simulated data, that would help us out. We maintain a lot of software and having specific issues to debug rather than constructing our own saves us time.

I would in general encourage folks to use "LRT" rather than "Wald" anyway. "Ward" probably throws an error anyway, as that's not a name of a test.

AustinLG commented 1 year ago

Sorry, typo on my part, I intended to say I was using "Wald". Please see my previous comment that the primary issue here is no example using a continuous covariate in the vignette. Adding this to the vignette would be helpful.

adw96 commented 10 months ago

Closing this as (1) this is not an issue and (2) I think this abstraction is not sufficiently complex as to warrant a new vignette