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

Covariates specific to one person #8

Closed
michalovadek opened this issue Mar 25, 2020 · 3 comments
Closed

Covariates specific to one person #8

michalovadek opened this issue Mar 25, 2020 · 3 comments
Assignees

Comments

@michalovadek
Copy link
Collaborator

Thanks for making this great package. I am using it in my PhD thanks to its superior performance over methods like NOMINATE. I think the package was taken off CRAN for some reason but I hope you continue to develop it, because it's a fantastic contribution to the R ecosystem.

My question concerns the use of covariates in the estimation. In your working paper you show an example when covariates affect all legislators in the Congress. I was wondering whether you would have any advice for a situation where I need to include covariates just for one of the "persons" in the data (binary response). A set of independent variables - some binary, some continuous, including interactions - affects the "votes" of only this one person, while the rest are unaffected by any variables.

Would you recommend to add a dummy variable for the person of interest and interact it with every covariate? Or perhaps is it better to set the variables of all unaffected persons to the mean? I am new to Bayesian inference and am not 100% sure whether there is a recommended way of doing this. Additionally, can I still meaningfully use id_plot_cov when I only want to see the marginal effects on one person's ideal point (in which case the liberal/conservative distinction is irrelevant)?

Thanks again for all your great work on this package.

@saudiwin
Copy link
Owner

saudiwin commented Apr 5, 2020

Hi michael -

Sorry I just saw this. Don't worry, development on the project is very active. I will have a major release (v. 1.0) within the next two months. It will have the ability to do within-chain parallelization to fit much bigger models.

Because the data are entered in long-form, you can code the covariates however you want - they can vary by person, by bill (item), by time point, etc. In your case, I would probably add a dummy variable for that one person and then interact the covariates with that dummy variable. You would then have a baseline (all of the legislators) plus an interaction effect specific to that person.

I'll also have better covariate plotting in the next version. Unfortunately, a lot of my time is currently taken up with a coronavirus-related project :(, but getting this out is a top priority.

@saudiwin saudiwin self-assigned this Apr 5, 2020
@saudiwin saudiwin closed this as completed Apr 5, 2020
@michalovadek
Copy link
Collaborator Author

That's great to hear! And thanks for the recommendation, I will try out the dummy interaction. I might open a few other issues to suggest some features that I thought would benefit the package, although you may have already had these in mind for the next release.

@saudiwin
Copy link
Owner

saudiwin commented Apr 5, 2020

Sure thing! I'm happy to hear your suggestions.

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