Why would repeated measures random effects model values from polr() (in MASS package in R) be identical for all data points?

28 views Asked by At

I have survey data involving two categorical IVs (Prompt_Condition and Response_Condition) of three levels each and one ordinal DV (value, a Likert-type ranking 1-7). There are 31 subjects who rated 18 dialogues. Each dialogue exhibits one of the nine possible combinations of the IVs. The data look like this:

head(subset_data)

A tibble: 6 × 7

 ID   Age Dialogue Response value Prompt_Condition Response_Condition


1 1 28 Q17 1 7 generic null
2 1 28 Q17 2 7 generic overt
3 1 28 Q17 3 5 generic other
4 1 28 Q18 1 7 generic null
5 1 28 Q18 2 6 generic overt
6 1 28 Q18 3 1 generic other

The data are plotted in the image: data plotted

I am interested in examining the model values for the random effects of repeated measures that polr() fits. polr is in the MASS package in R.

# Fit a polr model with only random effects
random_effects_model_polr <- polr(value ~ (1 | ID), data = subset_data)

# Generate predicted values
predicted_values <- predict(random_effects_model_polr, type = "probs")

I expect the model values from predict (which are log-odds of each of the levels of 'value') to be different for each subject but they are all identical for all subjects and all data points. Here is a bit of the output of predict. The whole table is the same row of odds.

predicted_values 1 2 3 4 5 6 7 1 0.0878 0.0394 0.0789 0.0591 0.115 0.138 0.482 2 0.0878 0.0394 0.0789 0.0591 0.115 0.138 0.482 3 0.0878 0.0394 0.0789 0.0591 0.115 0.138 0.482 4 0.0878 0.0394 0.0789 0.0591 0.115 0.138 0.482 5 0.0878 0.0394 0.0789 0.0591 0.115 0.138 0.482

polr() doesn't seem to be correctly modeling the repeated measures effect or am I misunderstanding something? (I am new to R and Stackoverflow.)

0

There are 0 answers