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 31: 2aa89fb729f4
parent 30: fd5052119a16
branch: default
Fixed line feed issue.
Tristan Zajonc / tristanz
7 months ago

Changed (Δ330 bytes):

raw changeset »

Stata/openirt.ado (11 lines added, 13 lines removed)

Stata/openirt.pkg (1 lines added, 4 lines removed)

Stata/stata.toc (1 lines added, 1 lines removed)

docs/Open IRT Slides.lyx (24 lines added, 3 lines removed)

Up to file-list Stata/openirt.ado:

2
2
*
3
3
capture program drop openirt
4
4
program  openirt
5
  version 10.1
5
6
	preserve
6
7
	set more off
7
	set eolchar unix
8
	local seed = round(runiform()*10000000)
8
	* set eolchar unix
9
	local seed = round(uniform()*10000000)
9
10
	syntax, id(varname) item_prefix(name) save_item_parameters(string) save_trait_parameters(string) ///
10
11
		[samplesize(integer 2000) burnin(integer 1000) theta(varname) model(string) ///
11
12
		fixed_item_file(string)]
@@ -51,12 +52,10 @@ program openirt
51
52
	}
52
53
	qui recode _all (.=-9999)
53
54
	qui gen `group' = 1
54
	qui outsheet id `group' `theta' `item_prefix'* using `response_file', replace delim(" ") noquote nolabel nonames
55
	* type `response_file'
56
	if("`c(os)'"=="Windows") {
57
		qui findfile DOS2UNIX.EXE
58
		! `r(fn)' `response_file'
59
	}
55
	qui outsheet `id' `group' `theta' `item_prefix'* using openirt_tmp.txt, replace delim(" ") noquote nolabel nonames
56
	filefilter openirt_tmp.txt `response_file', from("\r\n") to("\n")
57
	erase openirt_tmp.txt
58
	
60
59
	* Write out parameter data
61
60
	display as text "Setting up parameter data..."
62
61
	clear
@@ -111,11 +110,10 @@ program openirt
111
110
	qui compress
112
111
	sort id
113
112
	isid id
114
	qui outsheet id type numcat a b c d1 d2 d3 d4 using `item_file', replace delim(" ") noquote nolabel nonames
115
	if("`c(os)'"=="Windows") {
116
		qui findfile DOS2UNIX.EXE
117
		! `r(fn)' `item_file'
118
	}
113
	qui outsheet id type numcat a b c d1 d2 d3 d4 using openirt_tmp.txt, replace delim(" ") noquote nolabel nonames
114
	filefilter openirt_tmp.txt `item_file', from("\r\n") to("\n")
115
	erase openirt_tmp.txt
116
	
119
117
	* Run estimation routine from shell
120
118
	qui findfile openirt.exe
121
119
	local execfile `r(fn)'

Up to file-list Stata/openirt.pkg:

1
v 1.0
1
v 1.1
2
2
d openirt. Bayesian and Maximum Likelihood Estimation of Item Response Theory (IRT) models.
3
3
d Tristan Zajonc (tzajonc@fas.harvard.edu).
4
4
d
@@ -20,9 +20,6 @@ f openirt.sthlp
20
20
G WIN	OpenIRT.exe	openirt.exe
21
21
G WIN64A	OpenIRT.exe	openirt.exe
22
22
G WIN64I	OpenIRT.exe	openirt.exe
23
G WIN	DOS2UNIX.EXE	DOS2UNIX.EXE
24
G WIN64A	DOS2UNIX.EXE	DOS2UNIX.EXE
25
G WIN64I	DOS2UNIX.EXE	DOS2UNIX.EXE
26
23
G MAC	openirt_osx	openirt.exe
27
24
G MACINTEL	openirt_osx	openirt.exe
28
25
G MACINTEL64	openirt_osx	openirt.exe

Up to file-list Stata/stata.toc:

1
v 1.0
1
v 1.1
2
2
d Stata programs by Tristan Zajonc
3
3
4
4
d Here are some potentially useful things I have written:

Up to file-list docs/Open IRT Slides.lyx:

@@ -342,7 +342,14 @@ I focus on common goals of development e
342
342
\end_inset
343
343
344
344
, motivated by the difficulties we faced for LEAPS Project (Andrabi et al.,
345
 2009) and India benchmarking exercises (Das and Zajonc, 2009).
345
 2009) and India benchmarking exercises 
346
\begin_inset CommandInset citation
347
LatexCommand citep
348
key "das.wp2008"
349
350
\end_inset
351
352
.
346
353
\end_layout
347
354
348
355
\begin_layout Standard
@@ -1247,11 +1254,25 @@ Bayesian estimation is done via Markov C
1247
1254
\end_layout
1248
1255
1249
1256
\begin_layout Itemize
1250
See Patz and Junker (1999a,b) for details on MCMC methods applied to IRT.
1257
See 
1258
\begin_inset CommandInset citation
1259
LatexCommand citet
1260
key "patz.jebs1999a,patz.jebs1999b"
1261
1262
\end_inset
1263
1264
 for details on MCMC methods applied to IRT.
1251
1265
\end_layout
1252
1266
1253
1267
\begin_layout Itemize
1254
OpenIRT uses slice sampling (Neal, 2003) rather than Metropolis-Hastings.
1268
OpenIRT uses slice sampling 
1269
\begin_inset CommandInset citation
1270
LatexCommand citep
1271
key "neal.aos2003"
1272
1273
\end_inset
1274
1275
 rather than Metropolis-Hastings.
1255
1276
\end_layout
1256
1277
1257
1278
\begin_layout BeginFrame