Here you will find daily news and tutorials about R, contributed by over 750 bloggers.
There are many ways to follow us - By e-mail:On Facebook: If you are an R blogger yourself you are invited to add your own R content feed to this site (Non-English R bloggers should add themselves- here)

As a follow up on the previous about integrating the TAM and WrightMap packages, we received a message from one of the TAM developers, Alexander Robitzsch, suggesting that it is possible to generate the Wright Map directly from the MML estimated distribution (instead of using the WLE estimates used in the previous post).

Let’s start with the same setup:

library(TAM)
library(WrightMap)
data( sim.rasch )
str( sim.rasch )
dat <- sim.rasch
# Run Rasch Model
mod1 <- tam.mml( dat )
summary( mod1 )

After estimating the Rasch model in our data, we can get the item parameters directly from our model object:

difficulties <- tam.threshold( mod1 )

Now, for the new part, Alexander has sent us this snippet to recover the estimated person distribution:

This extracts the ability distribution node locations and weights, and uses them to generate a vector of abilities that can be used to plot that distribution on wrightMap:

This final Wright Map shows the distribution based on the nodes and weights estimated directly as part of the marginal maximum likelihood estimation, without needing to resort to generating person estimates on a separate step.

Related

To leave a comment for the author, please follow the link and comment on their blog: R Snippets for IRT.