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

Variable type of the treatment variable #3

Open
SusuXiong opened this issue Feb 23, 2023 · 1 comment
Open

Variable type of the treatment variable #3

SusuXiong opened this issue Feb 23, 2023 · 1 comment

Comments

@SusuXiong
Copy link

Hello! I am using Remiod for my dissertation project. The data I have got has continuous outcomes with missing values, the aim is to model the data as MAR and MNAR (Delta, J2R and CR). When I include the treatment variable as numeric (coded as 0 for placebo and 1 for treatment), the algorithm works. However, when I include the treatment variable as factor (reference level 0 and treatment level 1), the algorithm said 'Error in MCMC_CR[, mc_imp_col_nam] <- predc : replacement has length zero' when J2R and CR were chosen and the trace plots of the parameters of the treatment variable did not work.

I can see that in the simple example of the 'schizow' data, 'tx' is coded as an integer. Is this an in-built requirement of the package such that categorical treatment variables are not allowed?

@xsswang
Copy link
Owner

xsswang commented Mar 2, 2023

Yes. It is a requirement to have the treatment variable coded as interger, which facilitates subsequent manipulations for MNAR imputation. Will consider to allow categorical treatment variable in the future update.

By the way, hope the package can provide the help you need. Please share with me if you have any comment or idea to improve it.
Thanks in advance!

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

2 participants