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

predict.ictreg does not support multiple sensitive item design with y_i(0) included as a covariate #23

Open
brianleungkp opened this issue Jun 27, 2022 · 2 comments

Comments

@brianleungkp
Copy link

brianleungkp commented Jun 27, 2022

Hi,

When running a multiple sensitive item design with ictreg(..., multi.condition = "level"), it is not currently supported by predict.ictreg() to make prediction:

require(list)

## multi.condition = none 
results_no_level <- ictreg(y ~ male + college + age + south + age:south, treat = "treat", 
                           J = 3, data = multi, method = "ml")

## prediction succeeds
predict.ictreg(results_no_level, sensitive.item = 1, avg = TRUE)

## multi.condition = level
results_w_level <- ictreg(y ~ male + college + age + south + age:south, treat = "treat", 
                          J = 3, data = multi, multi.condition = "level", method = "ml")

## prediction fails
predict.ictreg(results_w_level, sensitive.item = 1, avg = TRUE)

which gives an error message:
Error in xvar %*% beta : non-conformable arguments

It seems like the reason is that y_i(0) and the extra associated parameter are not taken into account in predict.ictreg().

In general, I manually simulated the expected probabilities of respondents choosing the sensitive items taking y_i(0) and the extra parameter into account (following the replication file PA_Replication.R -- Replication R command file for: Graeme Blair and Kosuke Imai, "Statistical Analysis of List Experiments," Political Analysis, In Press. Created 27 October 2011). It seems like the inclusion of y_i(0) and the associated parameter drastically changes the expected probabilities vis-a-vis the difference-in-means estimate. Will there be any implementation of robust NLS/ML models (i.e.ictreg(...robust = TRUE)) for multiple sensitive item design to ensure their correspondence?

Thank you!

@graemeblair
Copy link
Member

Thanks for your report. I believe this is fixed in version 9.2.4 which is just now on CRAN. Could you please reinstall and confirm 9.2.4 is installed and try again?

We don't have any plans for implementing more models at this time.

@brianleungkp
Copy link
Author

Thanks so much for the reply. Unfortunately, the Error in xvar %*% beta : non-conformable arguments error persists in version 9.2.4:

> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.3.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] list_9.2.4     sandwich_3.0-2

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.8.3      mvtnorm_1.1-3     quadprog_1.5-8    lattice_0.20-45   corpcor_1.6.10    zoo_1.8-10        MASS_7.3-57       grid_4.2.1       
 [9] magic_1.6-0       arm_1.12-2        nlme_3.1-157      stats4_4.2.1      coda_0.19-4       minqa_1.2.4       nloptr_2.0.3      Matrix_1.4-1     
[17] boot_1.3-28       splines_4.2.1     lme4_1.1-29       tools_4.2.1       abind_1.4-5       compiler_4.2.1    gamlss.dist_6.0-3 VGAM_1.1-6  

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