kaz-yos / regmedint

R implementation of effect measure modification-extended regression-based closed-formula causal mediation analysis
https://kaz-yos.github.io/regmedint/
28 stars 5 forks source link

weights #7

Open Ali777927 opened 2 years ago

Ali777927 commented 2 years ago

Dear regmedint team,

First of all, thank you very much for this valuable package.

I wonder if there is any possibility to add "weights" as an argument in the function of regmedint. If that is not possible at this moment, is there is any indirect way to add them? I did my best to get the function "calc_myreg_mreg_linear_yreg_linear" working (because I know how to add weights in lm or survreg), but unfortunately, even after adding all the relevant functions related to the package (ie, here from the documentation in github), I was not able to see results (I was able to run it, but I was not able to see the outcomes. I hope that you can help me out.

Thanks in advance. Kind regards, Ali Al Mubarak

kaz-yos commented 2 years ago

Hi Ali, It is not currently implemented. You may be able to fit unweighted versions of both models, get the result object, and inject separately fit weighted fits. I haven't tried it though.

Ali777927 commented 2 years ago

Thanks Kaz-yos for the reply. I'll try to get it working. Hopefully future updates will include that option. Best, Ali