some fixed effects are missing

122 views
Skip to first unread message

heidi Tang

unread,
May 16, 2020, 2:22:59 PM5/16/20
to mirt-package


Dear all,

My data has three groups: A, B, C. I put it in mixedmirt, but the fixed effects only include  groupB and groupC, why there is no groupA? if change the data, groupA dispaly, I am very confused, hope for your help!

the script as follows:
Y <- DATA[,7:12]
group <- DATA[,5]
covdata <- data.frame(group)
rmod0 <- mirt(Y, 1, itemtype = 'graded')
summary(rmod0)
Theta <- fscores(rmod0, full.scores=TRUE, scores.only=TRUE) 
model<-mirt.model('Theta=1:6')
rmod1 <- mixedmirt(Y, covdata, model, fixed = ~ 0 + group)
summary(rmod1)

the result:
--------------
FIXED EFFECTS:
       Estimate Std.Error z.value
groupB   -0.154     0.124  -1.241
groupC    0.164     0.111   1.486

--------------

thanks,
Heidi

Felix Fischer

unread,
May 17, 2020, 4:54:58 AM5/17/20
to mirt-p...@googlegroups.com
hi heidi,

groupA is the reference standard (it is fixed to 0). you can change the standard by relevel the factor levels of your grouping variable.


best, felix
Message has been deleted

heidi Tang

unread,
May 17, 2020, 10:37:40 AM5/17/20
to mirt-package
 
hi, felix, thanks very much for your reply!  But when I changed Y only, didn't change the group variables, the fixed effects include groupA, how to explain this? which is  reference standard?

--------------
FIXED EFFECTS:
       Estimate Std.Error z.value
groupA    0.248     0.112   2.217
groupB   -0.083     0.129  -0.645
groupC   -0.028     0.118  -0.236

--------------

Phil Chalmers

unread,
May 17, 2020, 1:45:24 PM5/17/20
to heidi Tang, mirt-package
Felix is correct here, but I don't follow what you mean in your reply. What syntax did you use to add groupA B and C in the output? Also, something a little more reproducible would be helpful (i.e., some generated data for your DATA object). 

Phil


--
You received this message because you are subscribed to the Google Groups "mirt-package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mirt-package/f32a797a-713b-41f3-bd7e-1de2d84d4ae2%40googlegroups.com.

heidi Tang

unread,
May 17, 2020, 2:40:45 PM5/17/20
to mirt-package
dear Phil, thanks for your reply very much, I use the same script, just change Y(numerical data matrix), before changing the value of Y, the output of fixed effects have no groupA, but after chaging the value of Y,  the output of fixed effects contain  groupA,  I don't understand why the value of Y(data) affects the display of  groupA in fixed effects?

the script:
setwd("F:/AD")
DATA<-read.csv(file="HEIDI AD datset GTE.csv")
Y <- DATA[,7:12]
group <- DATA[,5]
covdata <- data.frame(group)
rmod0 <- mirt(Y, 1, itemtype = 'graded')
summary(rmod0)
Theta <- fscores(rmod0, full.scores=TRUE, scores.only=TRUE) 
model<-mirt.model('Theta=1:6')
rmod1 <- mixedmirt(Y, covdata, model, fixed = ~ 0 + group)
summary(rmod1)
  

the output  before changing Y(data matrix):
--------------
FIXED EFFECTS:
       Estimate Std.Error z.value
groupB   -0.154     0.124  -1.241
groupC    0.164     0.111   1.486
--------------


the output after changing Y(data matrix):
--------------
FIXED EFFECTS:
       Estimate Std.Error z.value
groupA    0.248     0.112   2.217
groupB   -0.083     0.129  -0.645
groupC   -0.028     0.118  -0.236
-------------- 

To unsubscribe from this group and stop receiving emails from it, send an email to mirt-p...@googlegroups.com.

Phil Chalmers

unread,
May 17, 2020, 7:44:28 PM5/17/20
to heidi Tang, mirt-package
I think I'm going to have to see some working code + data to reproduce this. In your code I see no indication of Y changing at all. It's possible some level is being omitted or something, but without data at hand I can only speculate. 

Phil


To unsubscribe from this group and stop receiving emails from it, send an email to mirt-package...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mirt-package/b96c68bb-4c25-4368-b3ea-f8bd264073ff%40googlegroups.com.

Phil Chalmers

unread,
May 18, 2020, 9:19:48 PM5/18/20
to heidi Tang, mirt-package
I see the issue here. When dealing with strictly dichotomous items the keyword 'items' should be included into the fixed syntax to include the respective item intercepts sans the first item, who's intercept is fixed to 0 to allow the overall intercept to be estimated. This is to allow for the inclusion of an itemdesign effect if one so chooses to include these in dichotomous item tests. For tests containing polytomous items there is no such keyword items, and so all the intercepts of the items are estimated (the standard method) and instead the (Intercept) variable is removed from the fixed effect model matrix to allow for identification. The reason you saw both behaviours is that one dataset had only dichotomous items, and the other had at least one polytomous item. Changing your dichotomous only test to "fixed = ~ 0 + group + items" will give you what you're after, while just using "fixed = ~ 0 + group" in the polytomous test will do the trick (though again, not the different paramerizations). HTH.

Phil

Reply all
Reply to author
Forward
0 new messages