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

item_cov and item_cov_miss #32

Open
michalovadek opened this issue Dec 16, 2024 · 3 comments
Open

item_cov and item_cov_miss #32

michalovadek opened this issue Dec 16, 2024 · 3 comments

Comments

@michalovadek
Copy link
Collaborator

if I understand it correctly, item_cov= and item_cov_miss= are used to specify the respective covariate adjustment for the regular and missing value models. But what happens if there is overlap among them in terms of some of the covariates?

On the implementation side there seems to be an issue. Specifically, if the same covariate appears in both formulas, the renaming functions try to create two copies of the same column which results in automatic renaming like so:

`decade_init2000s` -> `decade_init2000s...21`
`decade_init2010s` -> `decade_init2010s...22`

Downstream this prevents id_estimate to identify the columns.

Should the handling of columns in id_make be adjusted if both item_cov= and item_cov_miss= are specified?

@saudiwin
Copy link
Owner

this could be an issue, although my preferred way to deal with it for now would be to force people to only use one type of covariate at a time (e.g., person/item etc).

@michalovadek
Copy link
Collaborator Author

well in this specific example the covariate is at the item level only. The issue arises from it appearing in both formulas

@saudiwin
Copy link
Owner

Yes I see the problem, I meant having the user specify only one of person_cov, item_cov, or item_miss_cov would make the error go away for now.

It wouldn't be hard in a larger inference sense to have them use covariates for different types of parameters. The main trick is with coding, we would need to append some prefix like "person_" or "item_" to the covariate matrix and then remember with helping functions to convert it. So definitely doable, just not high on the to-do list atm.

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