Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Models Support in cmest Function for Conditional Logistic Regression #48

Open
JaniceeeLi opened this issue Jan 16, 2024 · 0 comments

Comments

@JaniceeeLi
Copy link

Hello,

I'm currently using the CMAverse package for mediation analysis and have encountered a challenge with implementing conditional logistic regression in the cmest function. My understanding is that the cmest function supports the coxph function from the survival package, which can be used to implement stratified Cox models as a way to perform conditional logistic regression in yreg argument. However, I am unable to specify stratified variables through the strata() statement.

The CMAverse documentation mentions the possibility of using user-defined regression models, but I'm not clear on how to integrate such models with cmest. When I tried to define a custom model function and use its name as the yreg argument, I encountered an error stating that only specific character names of regressions are allowed.

Error in regrun() : Select character yreg from 'linear', 'logistic',
'loglinear', 'poisson', 'quasipoisson', 'negbin', 'multinomial', 'ordinal',
'coxph', 'aft_exp', 'aft_weibull'

Could you please provide guidance on how to properly implement a custom model, specifically for conditional logistic regression, within the cmest function? Is there a way to incorporate user-defined models that are not listed in the standard set of regression types?

Thank you for your assistance and for developing this valuable tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant