Setup initial file structure

This commit is contained in:
2024-03-05 11:20:30 +01:00
parent 6183a6391b
commit 70e53e7760
708 changed files with 277486 additions and 0 deletions

View File

@ -0,0 +1,36 @@
program define raschres,rclass
syntax varlist [, resname(string)]
tempname diff theta
matrix `diff'=r(beta)
matrix `theta'=r(theta)
if "`resname'"=="" {
local resname=res
}
tokenize `varlist'
local nbitems: word count `varlist'
tempname score lt
genscore `varlist',score(`score')
gen `lt'=.
forvalues i=0/`nbitems' {
replace `lt'=`theta'[1,`i'] if `score'==`i'
}
forvalues i=1/`nbitems'{
tempname p`i' res`i'
gen `p`i''=exp(`lt'-`diff'[1,`i'])/(1+exp(`lt'-`diff'[1,`i'])
gen `resname'`i'=(1-`p`i'')/sqrt(`p`i''*(1-`p`i''))
}
pca `resname'*
end