tristanz / OpenIRT (http://people.fas.harvard.edu/~tzajonc/openirt.html)
Bayesian and Maximum Likelihood Estimation of Item Response Theory (IRT) Models
Clone this repository (size: 589.9 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/tristanz/openirt
| commit 23: | eaff035c689f |
| parent 22: | 6882771a4c14 |
| branch: | default |
Better help
Changed (Δ700 bytes):
raw changeset »
Stata/naep.do (1 lines added, 4 lines removed)
Stata/openirt.pkg (4 lines added, 2 lines removed)
Stata/openirt.sthlp (14 lines added, 12 lines removed)
Up to file-list Stata/naep.do:
1 |
1 |
* Example with simulated NAEP data. |
2 |
2 |
cap program drop openirt |
3 |
net install http:// |
|
3 |
net install http://www.people.fas.harvard.edu/~tzajonc/stata/openirt/openirt, force |
|
4 |
4 |
|
5 |
5 |
clear |
6 |
6 |
set mem 50m |
| … | … | @@ -25,9 +25,6 @@ corr percent_correct item* |
25 |
25 |
* Estimate both item parameters and ability |
26 |
26 |
openirt, id(id) item_prefix(item) save_item_parameters("items.dta") save_trait_parameters("traits.dta") |
27 |
27 |
|
28 |
*openirt, id(id) item_prefix(item) save_item_parameters(items) save_trait_parameters(traits) /// |
|
29 |
* samplesize(100) burnin(0) thin(1) model("2PL") fixed_item_file(naep_items.dta) |
|
30 |
||
31 |
28 |
* Merge in ability estimates |
32 |
29 |
merge id using traits, sort |
33 |
30 |
Up to file-list Stata/openirt.pkg:
1 |
1 |
v 1.0 |
2 |
2 |
d openirt. Bayesian and Maximum Likelihood Estimation of Item Response Theory (IRT) models. |
3 |
d Tristan Zajonc (t |
|
3 |
d Tristan Zajonc (tzajonc@fas.harvard.edu). |
|
4 |
4 |
d |
5 |
5 |
d OpenIRT estimates 2PL and 3PL Item Response Theory (IRT) models for dichotomous data. |
6 |
6 |
d It includes Bayesian MCMC estimation of item parameters and abilities, and maximum |
| … | … | @@ -11,7 +11,9 @@ d OpenIRT is designed to be flexible. It |
11 |
11 |
d and responses to be missing. For instance, fixed anchor items can be used to place |
12 |
12 |
d children and items on a known scale; missing responses can be used to link multiple |
13 |
13 |
d overlapping test forms; and known abilities can be used to calibrate new items |
14 |
d and abilit |
|
14 |
d and ability parameters. |
|
15 |
d |
|
16 |
d OpenIRT relies on compiled code that works on Windows, Mac, and Linux. |
|
15 |
17 |
|
16 |
18 |
f openirt.ado |
17 |
19 |
f openirt.sthlp |
Up to file-list Stata/openirt.sthlp:
18 |
18 |
{synopthdr} |
19 |
19 |
{synoptline} |
20 |
20 |
{syntab:Required options} |
21 |
{synopt :{opt id(varname)}}unique respondent ID{p_end} |
|
22 |
{synopt :{opt item_prefix(name)}}prefix of item variables{p_end} |
|
21 |
{synopt :{opt id(varname)}}unique integer respondent ID{p_end} |
|
22 |
{synopt :{opt item_prefix("prefix")}}prefix of item variables, e.g. "item"{p_end} |
|
23 |
23 |
{synopt :{opt save_item_parameters("filename")}}filename to save item parameter estimates{p_end} |
24 |
24 |
{synopt :{opt save_trait_parameters("filename")}}filename to save trait/ability parameter estimates{p_end} |
25 |
25 |
|
62 |
62 |
{opt theta(varname)} specifies variable name holding fixed trait or ability parameters. Any missing entries will be treated as free parameters. |
63 |
63 |
|
64 |
64 |
{phang} |
65 |
{opt fixed_item_file("filename")} specifies filename holding fixed item types and parameters. The file must include at least four variables: {it:id}, {it:type}, {it:a}, {it:b}, {it:c}. {it:id} gives the unique |
|
65 |
{opt fixed_item_file("filename")} specifies filename holding fixed item types and parameters. The file must include at least four variables: {it:id}, {it:type}, {it:a}, {it:b}, {it:c}. {it:id} gives the unique numeric item identifier that matches the {opt item_prefix("prefix")} postfix. {it:type} should equal 1 for 2PL items and 2 for 3PL items. {it:a} is the item discrimination parameter, {it:b} is the item difficulty parameter, and {it:c} is the item guessing parameter. Note: {cmd: openirt} assumes all items use the normal ogive metric ({it:D = 1.7}). |
|
66 |
66 |
|
67 |
67 |
{dlgtab:MCMC Options} |
68 |
68 |
|
70 |
70 |
{opt samplesize(2000)} specifies the number of post burn in MCMC iterations (default = 2000). Plausible values are drawn at evenly spaced intervals from this sample, and EAP estimates are based on the mean of the entire sample. Larger sample sizes will reduce the monte carlo standard error. In most applications the standard error of measurement dominates the monte carlo standard error after several thousand iterations. |
71 |
71 |
|
72 |
72 |
{phang} |
73 |
{opt burnin(1000)} specifies the number of burn in MCMC iterations (default = 1000). MCMC estimates rely on the chain converging to a stationary |
|
73 |
{opt burnin(1000)} specifies the number of burn in MCMC iterations (default = 1000). MCMC estimates rely on the chain converging to a stationary distribution. In most IRT applications this occurs quite quickly -- within several hundred iterations. If estimates do not appear to be converging, increase the burn in period. |
|
74 |
74 |
|
75 |
75 |
{title:Discussion} |
76 |
76 |
|
77 |
77 |
{pstd}OpenIRT estimates 2PL and 3PL Item Response Theory (IRT) models for dichotomous (correct / incorrect) data using both Bayesian and Maximum Likelihood methods.{p_end} |
78 |
78 |
|
79 |
{pstd}The software allows for missing (free) and fixed item parameters, abilities, and responses. This allows, for instance, equating of multiple overlapping test forms; equating test forms using a known reference population; and placing students on known ability metric using fixed item parameters from an item data bank such as TIMSS or NAEP (see, e.g |
|
79 |
{pstd}The software allows for missing (free) and fixed item parameters, abilities, and responses. This allows, for instance, equating of multiple overlapping test forms; equating test forms using a known reference population; and placing students on known ability metric using fixed item parameters from an item data bank such as TIMSS or NAEP (see, e.g., Das and Zajonc(2009)).{p_end} |
|
80 |
80 |
|
81 |
81 |
{pstd}Unlike some other IRT software, OpenIRT includes both Bayesian MCMC and Maximum Likelihood estimates. The software estimates expected posterior (EAP), plausible value (PV), and maximum likelihood (MLE) estimates of the underlying latent trait -- often called theta or ability.{p_end} |
82 |
82 |
|
83 |
83 |
{pstd}Plausible values, or multiple imputations, are draws from the posterior of each respondent's ability parameter. While potentially poor measures of each respondent's ability, plausible values allow accurate estimation of distributional quantities, such as the upper and lower quartiles, or fraction of students passing a particular threshold. If the number of items is small, EAP and MLE estimates will generally yield very poor estimates of such quantities, with EAP understanding the standard deviation and MLE estimates overestimating the standard deviation. See Das and Zajonc (2009) and Mislevy et al (1992).{p_end} |
84 |
84 |
|
85 |
{pstd} |
|
85 |
{pstd}The exact priors used can be seen and changed by examining openirt.ini in the usersite directory. The priors where calibrated using the NAEP item bank and should perform well under a broad range of scenarios. |
|
86 |
||
87 |
{pstd}{it:Note on speed}: Estimation can be slow due to the large number of free parameters estimated using MCMC simulation. Users with large data sets may wish to use small subsamples of data before running an analysis on the full sample. On many systems a built in progress bar does not currently display in Stata.{p_end} |
|
86 |
88 |
|
87 |
89 |
{title:Examples: Scoring single form.} |
88 |
90 |
|
89 |
91 |
{phang2}{cmd:. sysuse naep_children, clear}{p_end} |
90 |
{phang2}{cmd:. openirt, id(id) save_item_parameters("items.dta") save_trait_parameters("traits.dta")} |
|
92 |
{phang2}{cmd:. openirt, id(id) save_item_parameters("items.dta") save_trait_parameters("traits.dta")} item_prefix("item")}{p_end} |
|
91 |
93 |
|
92 |
94 |
{title:Examples: Scoring multiple overlapping forms.} |
93 |
95 |
|
97 |
99 |
{phang2}{cmd:. recode item3 item4 (0/1 = .) if _n > 250}{p_end} |
98 |
100 |
|
99 |
101 |
{phang}Score overlapping exams:{p_end} |
100 |
{phang2}{cmd:. openirt, id(id) save_item_parameters("items.dta") save_trait_parameters("traits.dta") |
|
102 |
{phang2}{cmd:. openirt, id(id) save_item_parameters("items.dta") save_trait_parameters("traits.dta") item_prefix("item")}{p_end} |
|
101 |
103 |
|
102 |
{title:Examples: Linking to fixed item parameters |
|
104 |
{title:Examples: Linking to fixed item parameters, such as TIMSS or NAEP.} |
|
103 |
105 |
|
104 |
106 |
{phang}Create 10 fixed items:{p_end} |
105 |
107 |
{phang2}{cmd:. sysuse naep_items, clear}{p_end} |
108 |
110 |
|
109 |
111 |
{phang}Score exam using mixed fixed and free items:{p_end} |
110 |
112 |
{phang2}{cmd:. sysuse naep_children, clear}{p_end} |
111 |
{phang2}{cmd:. openirt, id(id) save_item_parameters("items.dta") save_trait_parameters("traits.dta") fixed_item_file("fixed_items.dta") |
|
113 |
{phang2}{cmd:. openirt, id(id) save_item_parameters("items.dta") save_trait_parameters("traits.dta") fixed_item_file("fixed_items.dta") item_prefix("item")}{p_end} |
|
112 |
114 |
|
113 |
115 |
|
114 |
116 |
{title:References} |
| … | … | @@ -131,8 +133,8 @@ Van der Linden, W.J. and Hambleton, R.K. |
131 |
133 |
{pstd}Tristan Zajonc{p_end} |
132 |
134 |
{pstd}John F. Kennedy School of Government{p_end} |
133 |
135 |
{pstd}Harvard University, Cambridge, MA 02138.{p_end} |
134 |
{pstd}Email: tristanz@gmail.com{p_end} |
|
135 |
{pstd}Web: http://ksghome.harvard.edu/~zajonct/{p_end} |
|
136 |
{pstd}Email: tzajonc@fas.harvard.edu{p_end} |
|
137 |
{pstd}Web: http://www.people.fas.harvard.edu/~tzajonc/{p_end} |
|
136 |
138 |
|
137 |
139 |
|
138 |
140 |
