-
Notifications
You must be signed in to change notification settings - Fork 12
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
GRM summary error finding item parameters + multiple difficulty parameters? #26
Comments
After some additional thought and internet searching on the second issue, I realized that the cutpoints are the response category-specific difficulty parameters. Is this true for the graded response models? If so, then that raises an additional question for you. Why do you use
In fact, I'm struggling to understand the role of the |
hi @PatrickJEdwards - thanks for all these Qs, and I'll do my best to help you understand the package. the GRM does add some complexity as there are varying intercepts/cutpoints for each item (difficulties). When I wrote the package, this was not easy to code because Stan did not have varying-length arrays. It does now, and I could refactor, but that's a project for the future. In any case, this model does work and it should have all the info you need. What would help me though is if you could share some subset of your data so I can see what you are doing and run it myself. Or perhaps you can generate/replace with fake data if you can't share it. In response to your second Q, the GRM is parameterized by having C cutpoints for J items, so there is an array/matrix of dimension C x J. Each item also has an intercept, which is essentially the difficulty mentioned above. The actual difficulty is the result of intercept - cutpoint c for level c, which the code above is inverting to get the midpoint. (of course if you find a bug in the code, am happy to fix, but it looks correct). |
Hi @saudiwin, thank you for the prompt reply! Thank you for answering my questions and clearing things up for me. Attached is an anonymized subset of my data: idealstan_GithubExampleData_subset.csv I believe the following code would reproduce the error:
|
Hello Robert Kubinec,
I'm using your package to run a dynamic ordinal ideal point model. Note that I'm using the development version of your package. I have two issues to discuss with you:
Can't find the following variable(s) in the output: steps_votes
.I'll first provide some background on my data and the
idealstan
code I'm using. Then I'll provide more details on the two aforementioned issues.My data consists of ordinal likert-type items over four time periods (2011, 2015, 2019, and 2022). Items from the 2011 & 2015 periods have 5 response categories, while items from the 2019 & 2022 periods have 4 response categories. For all items, I'm using
model_type = 5
, the ordinal IRT (graded response) ideal point model with no missing-data inflation.Here's my code:
I'll now provide more information about the aforementioned issues.
Issue 1: Unaccessible Item Parameters.
This is the code I use to access the item parameters:
That code produces the following error:
Error: Can't find the following variable(s) in the output: steps_votes
After looking through the code myself, I found that this line of code in the
.item_plot_ord_grm
function in theHelpers.R
file is causing the error:I tried to fix the issue myself by modifying that code line and an additional line with the following:
Did I identify the cause of the error? And do you think that my modifications adequately fixed the problem?
Issue 2: Too-Few Difficulty Parameters
Secondly, it seems like the command
summary(DAN_GALTAN_idealstan_output_PREFIX, pars = "items")
only produces estimates for one difficulty parameter per item. Yet graded response models have multiple difficulty parameters for each ordered response category in an item. Do you know why this is happening? How can I obtain the multiple unique difficulty parameters?The text was updated successfully, but these errors were encountered: