Estimate fscores for new dataset

736 views
Skip to first unread message

bea...@gmx.de

unread,
Jul 24, 2013, 8:31:47 AM7/24/13
to mirt-p...@googlegroups.com
Hi,

what would be the most convenient way to calculate EAP scores from a mirt-model, but a new dataset with responses? in particualr, i want to have EAP-estimates for different subsets of items answered from the same persons.

I can think of making a new mirt-model with the new data and fixed item parameters or applying the fscores-function over the new dataset row by row and the response-vector argument.

Both seems a bit tedious for me - is there a simpler way that i am missing?

best, felix

Phil Chalmers

unread,
Jul 24, 2013, 11:50:32 AM7/24/13
to Dr. Hans Hansen, mirt-package
If you used a calibration dataset to obtain your estimates (as is
sounds like you did) you can quickly convert your converged model into
a data.frame of starting values for a new dataset using mod2values().
Then, change all the $est values to FALSE so that the same model
parameters are used in the new data object through that pars = ...
argument, and use fscores() to your hearts content.

You could also just rbind() the datasets together making note of which
group is which. That's probably safer since mirt will drop intercept
categories that are represented in the data, but if your new dataset
is large and full then it won't matter. Make sense?
> --
> 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/groups/opt_out.
>
>

Phil Chalmers

unread,
Jul 24, 2013, 1:31:06 PM7/24/13
to Dr. Hans Hansen, mirt-package
On second thought, this was kind of awkward and completely avoidable
internally. I've pushed a new option to github to allow custom
category lengths to be specified through the use of technical =
list(customk=c(2,3,4,....)). Here's an example of how it works:

###
> library(mirt)
>
> calib <- mirt(Science, 1)
Iteration: 51, Log-Lik: -1608.870, Max-Change: 0.00009
> vals <- mod2values(calib)
> vals$est <- FALSE
>
> newdat <- Science[1:2,] #must be a matrix or data.frame
> customK <- calib@K
> newmod <- mirt(newdat, 1, pars=vals, technical = list(customK=customK))
> fscores(newmod, full.scores = TRUE)
Comfort Work Future Benefit F1
1 4 4 3 2 -2.187395
2 3 3 3 3 -2.396060

##

I think this is a little nicer and can be automated much better. Cheers.

Phil

Phil Chalmers

unread,
Jul 24, 2013, 2:08:50 PM7/24/13
to Dr. Hans Hansen, mirt-package
One other thing, in order to make this work all categories should have
a theoretical lowest value of 0, so in the above example I should have
included a Science <- Science - 1 call. The output should read:

> fscores(newmod, full.scores = TRUE)
Comfort Work Future Benefit F1
1 3 3 2 1 0.40115946
2 2 2 2 2 0.05193847

bea...@gmx.de

unread,
Jul 27, 2013, 7:17:19 AM7/27/13
to mirt-p...@googlegroups.com
thanks!

however, may i suggest to allow multiple response-patterns (e.g. in a data.frame) to the fscores-function in a future version of mirt?

Phil Chalmers

unread,
Jul 27, 2013, 1:42:07 PM7/27/13
to Dr. Hans Hansen, mirt-package
Great idea. On github (see NEWS), and if you use fscores directly you
can use the original format of the items (lowest theoretical category
doesn't have to be 0 since I can find the lowest from the original
object). Cheers.

On Sat, Jul 27, 2013 at 7:17 AM, <bea...@gmx.de> wrote:
> thanks!
>
> however, may i suggest to allow multiple response-patterns (e.g. in a data.frame) to the fscores-function in a future version of mirt?
>

bea...@gmx.de

unread,
Jul 31, 2013, 11:13:41 AM7/31/13
to mirt-p...@googlegroups.com, Dr. Hans Hansen
great, thanks!

Merve Sarac

unread,
Apr 26, 2019, 12:17:59 PM4/26/19
to mirt-package
How can I get theta with fscores() for a subset of items using fixed parameters from the full length test? For instance, having a 200 item test, I want to estimate two thetas for each person using two mutually exclusive subset of 200 items by using the fixed parameters estimated from the full length test?

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

Felix Fischer

unread,
Apr 27, 2019, 3:40:13 PM4/27/19
to mirt-package
you can use the fscores(..., response.pattern = ...) option to submit a dataframe with the item responses. the df should contain all items in the model, so you want to set those not administered to NA.


Merve Sarac

unread,
Apr 27, 2019, 4:11:37 PM4/27/19
to mirt-package
thanks a lot
Reply all
Reply to author
Forward
0 new messages