Hi all,
A project I'm working on is taking me into an area that I am very new to and on which I could use some advice.
I am trying to examine a zero-inflated poisson item response model and have found SAS code that does such a thing (posted below). The problem: I am very unfamiliar with SAS and am already pretty new to item response theory, making trying to figure out how to translate this to Stata challenging.
Here is the SAS code:
PROC NLMIXED data=Likelove;
Here is what my data look like:
Any help you can provide would be greatly appreciated - even if it's just pointing me in the right direction.
Aaron
A project I'm working on is taking me into an area that I am very new to and on which I could use some advice.
I am trying to examine a zero-inflated poisson item response model and have found SAS code that does such a thing (posted below). The problem: I am very unfamiliar with SAS and am already pretty new to item response theory, making trying to figure out how to translate this to Stata challenging.
Here is the SAS code:
PROC NLMIXED data=Likelove;
BOUNDS a1-a4>0;run;
PARMS a1=1 a2=1 a3=1 a4=1 beta11=0 beta12=0 beta21=0 beta22=0;
slope1 = a1*item1+a2*item2;
slope2 = a3*item1+a4*item2;
eta1 = slope1*(theta-beta11*item1-beta12*item2);
eta2 = slope2*(theta-beta21*item1-beta22*item2);
lambda = exp(eta1);
p = exp(eta2)/(1+exp(eta2));
IF (response=0) THEN pai=(1-p)+p*exp(-1*lambda);
ELSE pai=p*exp(-1*lambda)*(lambda**response)/gamma(response+1);
II=LOG(PAI);
MODEL response~GENERAL(II);
RANDOM theta~normal(0,1) subject=id;
PREDICT theta out=personparm;
PREDICT p out=pout;
PREDICT lambda out=lambdaout;
Here is what my data look like:
id : respondent ID numberDoes anyone in the community have a notion of how to go about recreating this in Stata?
item1/item2: dummy variables indicating which question (item) they are responding to (so item1=1 and item2=0 when responding to question #1 and opposite for question #2)
response: respondent's response to that question (this is a count variable with lots of zeros, thus why I'm trying to use ZIP with item response modeling)
Any help you can provide would be greatly appreciated - even if it's just pointing me in the right direction.
Aaron
Comment