Question about the function of "iteminfo"

332 views
Skip to first unread message

daten...@gmail.com

unread,
Jun 21, 2015, 2:16:26 AM6/21/15
to mirt-p...@googlegroups.com
Dear Phil,

Could you please provide an example of how to use the function "iteminfo" to obtain item information with 2-dimension model?

In your manual(pp38-40), only unidimension example is given. Now I am running an analysis of 2-dimension model(4 items each dimension). I want to know how can I define the function, especially the "Theta" and "degrees".

Thank you ery much!

Garett Howardson

unread,
Jun 21, 2015, 9:05:50 AM6/21/15
to mirt-p...@googlegroups.com
I'm sure Phil will correct me if I'm wrong, but I believe you can only get iteminfo plots for unidimensional models (at least I recall reading that somewhere). You can test information though from multidimensional models using the testinfo() method. 

Phil Chalmers

unread,
Jun 21, 2015, 10:47:04 AM6/21/15
to Garett Howardson, mirt-package
You're not technically wrong, information functions are definitely better defined in unidimensional models, but you can still get at their essence with a method that Mark Reckase has discussed (section 5.2 of his MIRT book, or see Reckase and Mckinley, 1991). Essentially, you need to specify a viewing angle to collapse the multiple dimensions to a single dimension by applying a directional derivative. So that can be done like so:

library(mirt)
mod <- mirt(Science, 2)
extr.2 <- extract.item(mod, 2)
Theta <- matrix(seq(-4,4, by = .1))
Theta2 <- as.matrix(expand.grid(Theta, Theta))
info.2 <- iteminfo(extr.2, Theta2, degrees = c(45,45))
head(data.frame(Theta2, info=info.2))

I would only use these for plots though as they really don't include the covariance between the traits for other numerical routines (the package actually does only use these for plotting). 

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.
For more options, visit https://groups.google.com/d/optout.

Brenton Wiernik

unread,
Jun 22, 2015, 12:05:19 PM6/22/15
to mirt-p...@googlegroups.com, garett.h...@gmail.com
Could you clarify how to specify the angle? The documentation says that it should be a vector of degrees summing to 90. This seems correct for two-dimensional models (per Reckase's MIRT book, the constraint is that the cosines of the angles need to sum to 1). For higher dimensional models, it doesn't seem right, though. If I want to plot the information parallel to Dimension 1 in a three-dimensional model, shouldn't the vector of angles be c(0, 90, 90)? Am I misunderstanding how the function works?

(On a side note, the itemplot(..., type="info", degrees=c() ) function seems to work a bit counter-intuintuitively. When there are 3 or more dimensions, one specifies a vector of angles with length equal to the number of dimensions, which is passed to the iteminfo function. For 2-dimensional models, however, the function concatenates the supplied vector with an additional value (presumably to allow specifying just 1 angle, which is easier). If one supplies a vector of length 2 (i.e., gives both angles), then the function still appends the additional angle to the vector, which changes the results (and seems to be incorrect). )

Thanks,
Brenton

Phil Chalmers

unread,
Jun 23, 2015, 1:04:55 AM6/23/15
to Brenton Wiernik, mirt-package, Garett Howardson
On Mon, Jun 22, 2015 at 12:05 PM, Brenton Wiernik <quill...@gmail.com> wrote:
Could you clarify how to specify the angle? The documentation says that it should be a vector of degrees summing to 90. This seems correct for two-dimensional models (per Reckase's MIRT book, the constraint is that the cosines of the angles need to sum to 1). For higher dimensional models, it doesn't seem right, though. If I want to plot the information parallel to Dimension 1 in a three-dimensional model, shouldn't the vector of angles be c(0, 90, 90)? Am I misunderstanding how the function works?

You're right, that's sum of the squared cosines is the correct restriction. I've typically only used this function for two-dimensional models (because plotting information for 3+ is difficult), so I never really noticed this. I'll update the documentation and push it to the dev version. Thanks for picking this up.
 

(On a side note, the itemplot(..., type="info", degrees=c() ) function seems to work a bit counter-intuintuitively. When there are 3 or more dimensions, one specifies a vector of angles with length equal to the number of dimensions, which is passed to the iteminfo function. For 2-dimensional models, however, the function concatenates the supplied vector with an additional value (presumably to allow specifying just 1 angle, which is easier). If one supplies a vector of length 2 (i.e., gives both angles), then the function still appends the additional angle to the vector, which changes the results (and seems to be incorrect). )

This should be more clear on the dev version now, where errors will be thrown if something has gone awry. I think that strange hack disappeared, but I'm not quite sure. Let me know if the problem still persists or something should be updated. Cheers.

Phil

daten...@gmail.com

unread,
Jun 29, 2015, 10:42:48 AM6/29/15
to mirt-p...@googlegroups.com
Thank you very much.
another question is how do I select the angle.

在 2015年6月21日星期日 UTC+8下午2:16:26,daten...@gmail.com写道:

Susanne Frick

unread,
Sep 9, 2016, 12:21:50 PM9/9/16
to mirt-package, quill...@gmail.com, garett.h...@gmail.com
Hello,

I have a three-dimensional model where all items just load on one trait (and the information is actually independent of the traitlevels of traits 2 and 3).
Calculating the information in the direction of trait 1 works pretty well. Though, when I specifiy degrees=c(90, 0, 90), it still returns the information in the direction of trait 1 (which equals a line).
How should I specifiy the angels to calculate the information in the direction of traits 2 and 3 only?

Thank you!

Phil Chalmers

unread,
Sep 11, 2016, 1:46:16 PM9/11/16
to Susanne Frick, mirt-package
I think you want degrees = c(90, 0, 0). That will drop the first dimension and include all of the 2nd and 3rd.

Phil

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

einkoen...@gmail.com

unread,
Sep 13, 2016, 12:32:18 PM9/13/16
to mirt-package, einkoen...@gmail.com
Thank you!
Sorry, probably my question was a bit unclear.
Meanwhile I figured out that to gain the information in the direction of just one trait independent of the other two
I can specify theta to be 0 in the other two directions (e.g. as.matrix(expand.grid(theta,0,0)) for trait 1).
Degrees does not seem to matter in my case as long as it is 0 in the direction evaluated.
Reply all
Reply to author
Forward
0 new messages