saudiwin / idealstan

idealstan offers item-response theory (IRT) ideal-point estimation for binary, ordinal, counts and continuous responses with time-varying and missing-data inference. Latent space model also included. Full and approximate Bayesian sampling with 'Stan' (www.mc-stan.org).
https://cran.r-project.org/web/packages/idealstan/index.html
GNU General Public License v2.0
51 stars 12 forks source link

Multivariate mixed response feature? #3

Closed spinkney closed 2 years ago

spinkney commented 5 years ago

First, thank you taking the time and effort into making this package. This is going to be an amazing addition to the survey analysis my company performs.

Second, our data is often composed of many different response types, is it on the roadmap to combine different response types into one model? (For example, say there was another outcome variable for the senate data where there were a number of Likert scale questions the senators answered regarding how import a number of issues are. Will it be possible, in the future, to include this into one model as:

senate_data <- id_make(senate114,
                       outcome = c('cast_code', 'some_ordinal_response'),
                       person_id = 'bioname',
                       item_id = 'rollnumber',
                       group_id= 'party_code',
                       time_id='date',
                       miss_val='Absent')
id_estimate(senate_data,
                model_type = c(1, 3),
                 use_vb = T,
                fixtype='vb_partial',
                 restrict_ind_high = "WARREN, Elizabeth",
                 restrict_ind_low="BARRASSO, John A.",
            seed=84520)

Also, please let me know if this would be better posted on Stan discourse.

saudiwin commented 5 years ago

You can post also on discourse if you want as I have an account there, but it doesn't much matter.

You are actually in luck! The next feature that I am going to implement is exactly what you are talking about. So your issue request is only further motivation! I am going to implement index creation to enable people with survey and other types of data to use all the outcomes available in the package (discrete, counts, continuous) in the same model. The data will still be fed into the program in long format but it will include a column that indicates the distribution for each row.

I'm probably going to cap ordinal responses at a max of 10 as I have to hard-code each one. Let me know if that would be a problem.

spinkney commented 5 years ago

That's great to hear! 10 will handle almost all my use cases. I look forward to testing!

saudiwin commented 2 years ago

this is now implemented in the new beta release (you need to pass a column model_id to id_make with an integer number for each model type per item_id (see id_estimate help files for the full list of models.