Corrected ROSALI scenario scripts

main
Corentin Choisy 8 months ago
parent b87f107009
commit 042a448656

Binary file not shown.

File diff suppressed because it is too large Load Diff

@ -40,12 +40,12 @@ local N = "50 100 200 300"
local nbitems=7
}
if (mod(`s',2)==0) {
if (mod(`s',2)==0) {
local nbmoda=3
}
else {
}
else {
local nbmoda=1
}
}
if (`s'<=4) {
local nbdif=0
@ -61,6 +61,9 @@ else {
}
* taillemat = Maximum J*M cases pour les items par et J*M cases pour les dif par + J cases pour les DIF detect + nbdif cases pour dif réel
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbdif'+2
if (mod(`s',2)==0) {
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbitems'+`nbdif'+2
}
local colna=""
forvalues i=1/`nbitems' {
forvalues z=1/`nbmoda' {
@ -69,13 +72,18 @@ else {
}
}
forvalues i=1/`nbitems' {
if (mod(`s',2)==1) {
local colna = "`colna'"+"dif_detect_`i' "
}
if (mod(`s',2)==0) {
local colna = "`colna'"+"dif_detect_`i' "+"dif_detect_unif_`i' "
}
}
forvalues i=1/`nbdif' {
local colna = "`colna'"+"real_dif_`i' "
}
local colna = "`colna'" + "beta " + "se_beta"
local colna = "`colna'" + "beta " + "se_beta"
mat outmat = J(1000,`taillemat',.)
@ -213,7 +221,7 @@ local colna = "`colna'" + "beta " + "se_beta"
local checker2: word 2 of `val'
local checker3: word 3 of `val'
local nummoda=r(r)
local nbmoda_`j'=`nummoda'
local nbmoda_`j'=`nummoda'-1
if (`nummoda'==2) {
qui recode item`j' (`checker'=0) (`checker2'=1)
}
@ -301,11 +309,14 @@ local colna = "`colna'" + "beta " + "se_beta"
local mod = "`mod'"+"(2.item`v'<-THETA@2 tt)"
}
local w= 100+`u'
local unif_`u'=0
if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==3) {
local conformula = "`conformula'" + "`u' " + "`w' "
local unif_`u'=1
}
else if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==2) {
local conformula = "`conformula'" + "`u' "
local unif_`u'=1
}
}
if ("`conformula'" != "") {
@ -330,7 +341,10 @@ local colna = "`colna'" + "beta " + "se_beta"
local j=`difitems`u''
forvalues z=1/`nbmoda_`j'' {
mat outmat[`k',colnumb(outmat,"dif_`u'_`z'")] = W[1,colnumb(W,"`z'.item`j':tt")]
}
mat outmat[`k',colnumb(outmat,"dif_detect_`u'")] = `j'
if (mod(`s',2)==0) {
mat outmat[`k',colnumb(outmat,"dif_detect_unif_`u'")] = `unif_`u''
}
}
@ -359,6 +373,6 @@ local colna = "`colna'" + "beta " + "se_beta"
}
putexcel set "`path_res'/`s'`scen'_`Nn'_original.xls", sheet("outmat") replace
putexcel A1=matrix(outmat), colnames
}
}
}
}
}
}

@ -40,12 +40,12 @@ local N = "50 100 200 300"
local nbitems=7
}
if (mod(`s',2)==0) {
if (mod(`s',2)==0) {
local nbmoda=3
}
else {
}
else {
local nbmoda=1
}
}
if (`s'<=4) {
local nbdif=0
@ -61,6 +61,9 @@ else {
}
* taillemat = Maximum J*M cases pour les items par et J*M cases pour les dif par + J cases pour les DIF detect + nbdif cases pour dif réel
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbdif'+2
if (mod(`s',2)==0) {
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbitems'+`nbdif'+2
}
local colna=""
forvalues i=1/`nbitems' {
forvalues z=1/`nbmoda' {
@ -69,13 +72,18 @@ else {
}
}
forvalues i=1/`nbitems' {
if (mod(`s',2)==1) {
local colna = "`colna'"+"dif_detect_`i' "
}
if (mod(`s',2)==0) {
local colna = "`colna'"+"dif_detect_`i' "+"dif_detect_unif_`i' "
}
}
forvalues i=1/`nbdif' {
local colna = "`colna'"+"real_dif_`i' "
}
local colna = "`colna'" + "beta " + "se_beta"
local colna = "`colna'" + "beta " + "se_beta"
mat outmat = J(1000,`taillemat',.)
@ -213,7 +221,7 @@ local colna = "`colna'" + "beta " + "se_beta"
local checker2: word 2 of `val'
local checker3: word 3 of `val'
local nummoda=r(r)
local nbmoda_`j'=`nummoda'
local nbmoda_`j'=`nummoda'-1
if (`nummoda'==2) {
qui recode item`j' (`checker'=0) (`checker2'=1)
}
@ -301,11 +309,14 @@ local colna = "`colna'" + "beta " + "se_beta"
local mod = "`mod'"+"(2.item`v'<-THETA@2 tt)"
}
local w= 100+`u'
local unif_`u'=0
if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==3) {
local conformula = "`conformula'" + "`u' " + "`w' "
local unif_`u'=1
}
else if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==2) {
local conformula = "`conformula'" + "`u' "
local unif_`u'=1
}
}
if ("`conformula'" != "") {
@ -330,7 +341,10 @@ local colna = "`colna'" + "beta " + "se_beta"
local j=`difitems`u''
forvalues z=1/`nbmoda_`j'' {
mat outmat[`k',colnumb(outmat,"dif_`u'_`z'")] = W[1,colnumb(W,"`z'.item`j':tt")]
}
mat outmat[`k',colnumb(outmat,"dif_detect_`u'")] = `j'
if (mod(`s',2)==0) {
mat outmat[`k',colnumb(outmat,"dif_detect_unif_`u'")] = `unif_`u''
}
}
@ -359,6 +373,6 @@ local colna = "`colna'" + "beta " + "se_beta"
}
putexcel set "`path_res'/`s'`scen'_`Nn'_original.xls", sheet("outmat") replace
putexcel A1=matrix(outmat), colnames
}
}
}
}
}
}

@ -40,12 +40,12 @@ local N = "50 100 200 300"
local nbitems=7
}
if (mod(`s',2)==0) {
if (mod(`s',2)==0) {
local nbmoda=3
}
else {
}
else {
local nbmoda=1
}
}
if (`s'<=4) {
local nbdif=0
@ -61,6 +61,9 @@ else {
}
* taillemat = Maximum J*M cases pour les items par et J*M cases pour les dif par + J cases pour les DIF detect + nbdif cases pour dif réel
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbdif'+2
if (mod(`s',2)==0) {
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbitems'+`nbdif'+2
}
local colna=""
forvalues i=1/`nbitems' {
forvalues z=1/`nbmoda' {
@ -69,13 +72,18 @@ else {
}
}
forvalues i=1/`nbitems' {
if (mod(`s',2)==1) {
local colna = "`colna'"+"dif_detect_`i' "
}
if (mod(`s',2)==0) {
local colna = "`colna'"+"dif_detect_`i' "+"dif_detect_unif_`i' "
}
}
forvalues i=1/`nbdif' {
local colna = "`colna'"+"real_dif_`i' "
}
local colna = "`colna'" + "beta " + "se_beta"
local colna = "`colna'" + "beta " + "se_beta"
mat outmat = J(1000,`taillemat',.)
@ -213,7 +221,7 @@ local colna = "`colna'" + "beta " + "se_beta"
local checker2: word 2 of `val'
local checker3: word 3 of `val'
local nummoda=r(r)
local nbmoda_`j'=`nummoda'
local nbmoda_`j'=`nummoda'-1
if (`nummoda'==2) {
qui recode item`j' (`checker'=0) (`checker2'=1)
}
@ -301,11 +309,14 @@ local colna = "`colna'" + "beta " + "se_beta"
local mod = "`mod'"+"(2.item`v'<-THETA@2 tt)"
}
local w= 100+`u'
local unif_`u'=0
if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==3) {
local conformula = "`conformula'" + "`u' " + "`w' "
local unif_`u'=1
}
else if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==2) {
local conformula = "`conformula'" + "`u' "
local unif_`u'=1
}
}
if ("`conformula'" != "") {
@ -330,7 +341,10 @@ local colna = "`colna'" + "beta " + "se_beta"
local j=`difitems`u''
forvalues z=1/`nbmoda_`j'' {
mat outmat[`k',colnumb(outmat,"dif_`u'_`z'")] = W[1,colnumb(W,"`z'.item`j':tt")]
}
mat outmat[`k',colnumb(outmat,"dif_detect_`u'")] = `j'
if (mod(`s',2)==0) {
mat outmat[`k',colnumb(outmat,"dif_detect_unif_`u'")] = `unif_`u''
}
}
@ -359,6 +373,6 @@ local colna = "`colna'" + "beta " + "se_beta"
}
putexcel set "`path_res'/`s'`scen'_`Nn'_original.xls", sheet("outmat") replace
putexcel A1=matrix(outmat), colnames
}
}
}
}
}
}

@ -40,12 +40,12 @@ local N = "50 100 200 300"
local nbitems=7
}
if (mod(`s',2)==0) {
if (mod(`s',2)==0) {
local nbmoda=3
}
else {
}
else {
local nbmoda=1
}
}
if (`s'<=4) {
local nbdif=0
@ -61,6 +61,9 @@ else {
}
* taillemat = Maximum J*M cases pour les items par et J*M cases pour les dif par + J cases pour les DIF detect + nbdif cases pour dif réel
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbdif'+2
if (mod(`s',2)==0) {
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbitems'+`nbdif'+2
}
local colna=""
forvalues i=1/`nbitems' {
forvalues z=1/`nbmoda' {
@ -69,13 +72,18 @@ else {
}
}
forvalues i=1/`nbitems' {
if (mod(`s',2)==1) {
local colna = "`colna'"+"dif_detect_`i' "
}
if (mod(`s',2)==0) {
local colna = "`colna'"+"dif_detect_`i' "+"dif_detect_unif_`i' "
}
}
forvalues i=1/`nbdif' {
local colna = "`colna'"+"real_dif_`i' "
}
local colna = "`colna'" + "beta " + "se_beta"
local colna = "`colna'" + "beta " + "se_beta"
mat outmat = J(1000,`taillemat',.)
@ -213,7 +221,7 @@ local colna = "`colna'" + "beta " + "se_beta"
local checker2: word 2 of `val'
local checker3: word 3 of `val'
local nummoda=r(r)
local nbmoda_`j'=`nummoda'
local nbmoda_`j'=`nummoda'-1
if (`nummoda'==2) {
qui recode item`j' (`checker'=0) (`checker2'=1)
}
@ -301,11 +309,14 @@ local colna = "`colna'" + "beta " + "se_beta"
local mod = "`mod'"+"(2.item`v'<-THETA@2 tt)"
}
local w= 100+`u'
local unif_`u'=0
if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==3) {
local conformula = "`conformula'" + "`u' " + "`w' "
local unif_`u'=1
}
else if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==2) {
local conformula = "`conformula'" + "`u' "
local unif_`u'=1
}
}
if ("`conformula'" != "") {
@ -330,7 +341,10 @@ local colna = "`colna'" + "beta " + "se_beta"
local j=`difitems`u''
forvalues z=1/`nbmoda_`j'' {
mat outmat[`k',colnumb(outmat,"dif_`u'_`z'")] = W[1,colnumb(W,"`z'.item`j':tt")]
}
mat outmat[`k',colnumb(outmat,"dif_detect_`u'")] = `j'
if (mod(`s',2)==0) {
mat outmat[`k',colnumb(outmat,"dif_detect_unif_`u'")] = `unif_`u''
}
}
@ -359,6 +373,6 @@ local colna = "`colna'" + "beta " + "se_beta"
}
putexcel set "`path_res'/`s'`scen'_`Nn'_original.xls", sheet("outmat") replace
putexcel A1=matrix(outmat), colnames
}
}
}
}
}
}

@ -40,12 +40,12 @@ local N = "50 100 200 300"
local nbitems=7
}
if (mod(`s',2)==0) {
if (mod(`s',2)==0) {
local nbmoda=3
}
else {
}
else {
local nbmoda=1
}
}
if (`s'<=4) {
local nbdif=0
@ -61,6 +61,9 @@ else {
}
* taillemat = Maximum J*M cases pour les items par et J*M cases pour les dif par + J cases pour les DIF detect + nbdif cases pour dif réel
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbdif'+2
if (mod(`s',2)==0) {
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbitems'+`nbdif'+2
}
local colna=""
forvalues i=1/`nbitems' {
forvalues z=1/`nbmoda' {
@ -69,13 +72,18 @@ else {
}
}
forvalues i=1/`nbitems' {
if (mod(`s',2)==1) {
local colna = "`colna'"+"dif_detect_`i' "
}
if (mod(`s',2)==0) {
local colna = "`colna'"+"dif_detect_`i' "+"dif_detect_unif_`i' "
}
}
forvalues i=1/`nbdif' {
local colna = "`colna'"+"real_dif_`i' "
}
local colna = "`colna'" + "beta " + "se_beta"
local colna = "`colna'" + "beta " + "se_beta"
mat outmat = J(1000,`taillemat',.)
@ -213,7 +221,7 @@ local colna = "`colna'" + "beta " + "se_beta"
local checker2: word 2 of `val'
local checker3: word 3 of `val'
local nummoda=r(r)
local nbmoda_`j'=`nummoda'
local nbmoda_`j'=`nummoda'-1
if (`nummoda'==2) {
qui recode item`j' (`checker'=0) (`checker2'=1)
}
@ -301,11 +309,14 @@ local colna = "`colna'" + "beta " + "se_beta"
local mod = "`mod'"+"(2.item`v'<-THETA@2 tt)"
}
local w= 100+`u'
local unif_`u'=0
if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==3) {
local conformula = "`conformula'" + "`u' " + "`w' "
local unif_`u'=1
}
else if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==2) {
local conformula = "`conformula'" + "`u' "
local unif_`u'=1
}
}
if ("`conformula'" != "") {
@ -330,7 +341,10 @@ local colna = "`colna'" + "beta " + "se_beta"
local j=`difitems`u''
forvalues z=1/`nbmoda_`j'' {
mat outmat[`k',colnumb(outmat,"dif_`u'_`z'")] = W[1,colnumb(W,"`z'.item`j':tt")]
}
mat outmat[`k',colnumb(outmat,"dif_detect_`u'")] = `j'
if (mod(`s',2)==0) {
mat outmat[`k',colnumb(outmat,"dif_detect_unif_`u'")] = `unif_`u''
}
}
@ -359,6 +373,6 @@ local colna = "`colna'" + "beta " + "se_beta"
}
putexcel set "`path_res'/`s'`scen'_`Nn'_original.xls", sheet("outmat") replace
putexcel A1=matrix(outmat), colnames
}
}
}
}
}
}

@ -40,12 +40,12 @@ local N = "50 100 200 300"
local nbitems=7
}
if (mod(`s',2)==0) {
if (mod(`s',2)==0) {
local nbmoda=3
}
else {
}
else {
local nbmoda=1
}
}
if (`s'<=4) {
local nbdif=0
@ -61,6 +61,9 @@ else {
}
* taillemat = Maximum J*M cases pour les items par et J*M cases pour les dif par + J cases pour les DIF detect + nbdif cases pour dif réel
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbdif'+2
if (mod(`s',2)==0) {
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbitems'+`nbdif'+2
}
local colna=""
forvalues i=1/`nbitems' {
forvalues z=1/`nbmoda' {
@ -69,13 +72,18 @@ else {
}
}
forvalues i=1/`nbitems' {
if (mod(`s',2)==1) {
local colna = "`colna'"+"dif_detect_`i' "
}
if (mod(`s',2)==0) {
local colna = "`colna'"+"dif_detect_`i' "+"dif_detect_unif_`i' "
}
}
forvalues i=1/`nbdif' {
local colna = "`colna'"+"real_dif_`i' "
}
local colna = "`colna'" + "beta " + "se_beta"
local colna = "`colna'" + "beta " + "se_beta"
mat outmat = J(1000,`taillemat',.)
@ -213,7 +221,7 @@ local colna = "`colna'" + "beta " + "se_beta"
local checker2: word 2 of `val'
local checker3: word 3 of `val'
local nummoda=r(r)
local nbmoda_`j'=`nummoda'
local nbmoda_`j'=`nummoda'-1
if (`nummoda'==2) {
qui recode item`j' (`checker'=0) (`checker2'=1)
}
@ -301,11 +309,14 @@ local colna = "`colna'" + "beta " + "se_beta"
local mod = "`mod'"+"(2.item`v'<-THETA@2 tt)"
}
local w= 100+`u'
local unif_`u'=0
if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==3) {
local conformula = "`conformula'" + "`u' " + "`w' "
local unif_`u'=1
}
else if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==2) {
local conformula = "`conformula'" + "`u' "
local unif_`u'=1
}
}
if ("`conformula'" != "") {
@ -330,7 +341,10 @@ local colna = "`colna'" + "beta " + "se_beta"
local j=`difitems`u''
forvalues z=1/`nbmoda_`j'' {
mat outmat[`k',colnumb(outmat,"dif_`u'_`z'")] = W[1,colnumb(W,"`z'.item`j':tt")]
}
mat outmat[`k',colnumb(outmat,"dif_detect_`u'")] = `j'
if (mod(`s',2)==0) {
mat outmat[`k',colnumb(outmat,"dif_detect_unif_`u'")] = `unif_`u''
}
}
@ -359,6 +373,6 @@ local colna = "`colna'" + "beta " + "se_beta"
}
putexcel set "`path_res'/`s'`scen'_`Nn'_original.xls", sheet("outmat") replace
putexcel A1=matrix(outmat), colnames
}
}
}
}
}
}

@ -40,12 +40,12 @@ local N = "50 100 200 300"
local nbitems=7
}
if (mod(`s',2)==0) {
if (mod(`s',2)==0) {
local nbmoda=3
}
else {
}
else {
local nbmoda=1
}
}
if (`s'<=4) {
local nbdif=0
@ -61,6 +61,9 @@ else {
}
* taillemat = Maximum J*M cases pour les items par et J*M cases pour les dif par + J cases pour les DIF detect + nbdif cases pour dif réel
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbdif'+2
if (mod(`s',2)==0) {
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbitems'+`nbdif'+2
}
local colna=""
forvalues i=1/`nbitems' {
forvalues z=1/`nbmoda' {
@ -69,13 +72,18 @@ else {
}
}
forvalues i=1/`nbitems' {
if (mod(`s',2)==1) {
local colna = "`colna'"+"dif_detect_`i' "
}
if (mod(`s',2)==0) {
local colna = "`colna'"+"dif_detect_`i' "+"dif_detect_unif_`i' "
}
}
forvalues i=1/`nbdif' {
local colna = "`colna'"+"real_dif_`i' "
}
local colna = "`colna'" + "beta " + "se_beta"
local colna = "`colna'" + "beta " + "se_beta"
mat outmat = J(1000,`taillemat',.)
@ -213,7 +221,7 @@ local colna = "`colna'" + "beta " + "se_beta"
local checker2: word 2 of `val'
local checker3: word 3 of `val'
local nummoda=r(r)
local nbmoda_`j'=`nummoda'
local nbmoda_`j'=`nummoda'-1
if (`nummoda'==2) {
qui recode item`j' (`checker'=0) (`checker2'=1)
}
@ -301,11 +309,14 @@ local colna = "`colna'" + "beta " + "se_beta"
local mod = "`mod'"+"(2.item`v'<-THETA@2 tt)"
}
local w= 100+`u'
local unif_`u'=0
if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==3) {
local conformula = "`conformula'" + "`u' " + "`w' "
local unif_`u'=1
}
else if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==2) {
local conformula = "`conformula'" + "`u' "
local unif_`u'=1
}
}
if ("`conformula'" != "") {
@ -330,7 +341,10 @@ local colna = "`colna'" + "beta " + "se_beta"
local j=`difitems`u''
forvalues z=1/`nbmoda_`j'' {
mat outmat[`k',colnumb(outmat,"dif_`u'_`z'")] = W[1,colnumb(W,"`z'.item`j':tt")]
}
mat outmat[`k',colnumb(outmat,"dif_detect_`u'")] = `j'
if (mod(`s',2)==0) {
mat outmat[`k',colnumb(outmat,"dif_detect_unif_`u'")] = `unif_`u''
}
}
@ -359,6 +373,6 @@ local colna = "`colna'" + "beta " + "se_beta"
}
putexcel set "`path_res'/`s'`scen'_`Nn'_original.xls", sheet("outmat") replace
putexcel A1=matrix(outmat), colnames
}
}
}
}
}
}

@ -40,12 +40,12 @@ local N = "50 100 200 300"
local nbitems=7
}
if (mod(`s',2)==0) {
if (mod(`s',2)==0) {
local nbmoda=3
}
else {
}
else {
local nbmoda=1
}
}
if (`s'<=4) {
local nbdif=0
@ -61,6 +61,9 @@ else {
}
* taillemat = Maximum J*M cases pour les items par et J*M cases pour les dif par + J cases pour les DIF detect + nbdif cases pour dif réel
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbdif'+2
if (mod(`s',2)==0) {
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbitems'+`nbdif'+2
}
local colna=""
forvalues i=1/`nbitems' {
forvalues z=1/`nbmoda' {
@ -69,13 +72,18 @@ else {
}
}
forvalues i=1/`nbitems' {
if (mod(`s',2)==1) {
local colna = "`colna'"+"dif_detect_`i' "
}
if (mod(`s',2)==0) {
local colna = "`colna'"+"dif_detect_`i' "+"dif_detect_unif_`i' "
}
}
forvalues i=1/`nbdif' {
local colna = "`colna'"+"real_dif_`i' "
}
local colna = "`colna'" + "beta " + "se_beta"
local colna = "`colna'" + "beta " + "se_beta"
mat outmat = J(1000,`taillemat',.)
@ -213,7 +221,7 @@ local colna = "`colna'" + "beta " + "se_beta"
local checker2: word 2 of `val'
local checker3: word 3 of `val'
local nummoda=r(r)
local nbmoda_`j'=`nummoda'
local nbmoda_`j'=`nummoda'-1
if (`nummoda'==2) {
qui recode item`j' (`checker'=0) (`checker2'=1)
}
@ -301,11 +309,14 @@ local colna = "`colna'" + "beta " + "se_beta"
local mod = "`mod'"+"(2.item`v'<-THETA@2 tt)"
}
local w= 100+`u'
local unif_`u'=0
if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==3) {
local conformula = "`conformula'" + "`u' " + "`w' "
local unif_`u'=1
}
else if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==2) {
local conformula = "`conformula'" + "`u' "
local unif_`u'=1
}
}
if ("`conformula'" != "") {
@ -330,7 +341,10 @@ local colna = "`colna'" + "beta " + "se_beta"
local j=`difitems`u''
forvalues z=1/`nbmoda_`j'' {
mat outmat[`k',colnumb(outmat,"dif_`u'_`z'")] = W[1,colnumb(W,"`z'.item`j':tt")]
}
mat outmat[`k',colnumb(outmat,"dif_detect_`u'")] = `j'
if (mod(`s',2)==0) {
mat outmat[`k',colnumb(outmat,"dif_detect_unif_`u'")] = `unif_`u''
}
}
@ -359,6 +373,6 @@ local colna = "`colna'" + "beta " + "se_beta"
}
putexcel set "`path_res'/`s'`scen'_`Nn'_original.xls", sheet("outmat") replace
putexcel A1=matrix(outmat), colnames
}
}
}
}
}
}

@ -40,12 +40,12 @@ local N = "50 100 200 300"
local nbitems=7
}
if (mod(`s',2)==0) {
if (mod(`s',2)==0) {
local nbmoda=3
}
else {
}
else {
local nbmoda=1
}
}
if (`s'<=4) {
local nbdif=0
@ -61,6 +61,9 @@ else {
}
* taillemat = Maximum J*M cases pour les items par et J*M cases pour les dif par + J cases pour les DIF detect + nbdif cases pour dif réel
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbdif'+2
if (mod(`s',2)==0) {
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbitems'+`nbdif'+2
}
local colna=""
forvalues i=1/`nbitems' {
forvalues z=1/`nbmoda' {
@ -69,13 +72,18 @@ else {
}
}
forvalues i=1/`nbitems' {
if (mod(`s',2)==1) {
local colna = "`colna'"+"dif_detect_`i' "
}
if (mod(`s',2)==0) {
local colna = "`colna'"+"dif_detect_`i' "+"dif_detect_unif_`i' "
}
}
forvalues i=1/`nbdif' {
local colna = "`colna'"+"real_dif_`i' "
}
local colna = "`colna'" + "beta " + "se_beta"
local colna = "`colna'" + "beta " + "se_beta"
mat outmat = J(1000,`taillemat',.)
@ -213,7 +221,7 @@ local colna = "`colna'" + "beta " + "se_beta"
local checker2: word 2 of `val'
local checker3: word 3 of `val'
local nummoda=r(r)
local nbmoda_`j'=`nummoda'
local nbmoda_`j'=`nummoda'-1
if (`nummoda'==2) {
qui recode item`j' (`checker'=0) (`checker2'=1)
}
@ -301,11 +309,14 @@ local colna = "`colna'" + "beta " + "se_beta"
local mod = "`mod'"+"(2.item`v'<-THETA@2 tt)"
}
local w= 100+`u'
local unif_`u'=0
if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==3) {
local conformula = "`conformula'" + "`u' " + "`w' "
local unif_`u'=1
}
else if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==2) {
local conformula = "`conformula'" + "`u' "
local unif_`u'=1
}
}
if ("`conformula'" != "") {
@ -330,7 +341,10 @@ local colna = "`colna'" + "beta " + "se_beta"
local j=`difitems`u''
forvalues z=1/`nbmoda_`j'' {
mat outmat[`k',colnumb(outmat,"dif_`u'_`z'")] = W[1,colnumb(W,"`z'.item`j':tt")]
}
mat outmat[`k',colnumb(outmat,"dif_detect_`u'")] = `j'
if (mod(`s',2)==0) {
mat outmat[`k',colnumb(outmat,"dif_detect_unif_`u'")] = `unif_`u''
}
}
@ -359,6 +373,6 @@ local colna = "`colna'" + "beta " + "se_beta"
}
putexcel set "`path_res'/`s'`scen'_`Nn'_original.xls", sheet("outmat") replace
putexcel A1=matrix(outmat), colnames
}
}
}
}
}
}

@ -40,12 +40,12 @@ local N = "50 100 200 300"
local nbitems=7
}
if (mod(`s',2)==0) {
if (mod(`s',2)==0) {
local nbmoda=3
}
else {
}
else {
local nbmoda=1
}
}
if (`s'<=4) {
local nbdif=0
@ -61,6 +61,9 @@ else {
}
* taillemat = Maximum J*M cases pour les items par et J*M cases pour les dif par + J cases pour les DIF detect + nbdif cases pour dif réel
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbdif'+2
if (mod(`s',2)==0) {
local taillemat=2*`nbitems'*`nbmoda'+`nbitems'+`nbitems'+`nbdif'+2
}
local colna=""
forvalues i=1/`nbitems' {
forvalues z=1/`nbmoda' {
@ -69,13 +72,18 @@ else {
}
}
forvalues i=1/`nbitems' {
if (mod(`s',2)==1) {
local colna = "`colna'"+"dif_detect_`i' "
}
if (mod(`s',2)==0) {
local colna = "`colna'"+"dif_detect_`i' "+"dif_detect_unif_`i' "
}
}
forvalues i=1/`nbdif' {
local colna = "`colna'"+"real_dif_`i' "
}
local colna = "`colna'" + "beta " + "se_beta"
local colna = "`colna'" + "beta " + "se_beta"
mat outmat = J(1000,`taillemat',.)
@ -213,7 +221,7 @@ local colna = "`colna'" + "beta " + "se_beta"
local checker2: word 2 of `val'
local checker3: word 3 of `val'
local nummoda=r(r)
local nbmoda_`j'=`nummoda'
local nbmoda_`j'=`nummoda'-1
if (`nummoda'==2) {
qui recode item`j' (`checker'=0) (`checker2'=1)
}
@ -301,11 +309,14 @@ local colna = "`colna'" + "beta " + "se_beta"
local mod = "`mod'"+"(2.item`v'<-THETA@2 tt)"
}
local w= 100+`u'
local unif_`u'=0
if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==3) {
local conformula = "`conformula'" + "`u' " + "`w' "
local unif_`u'=1
}
else if (resmat[1,`nbitems'+`v']!=testm[1,1] & `nbmoda_`v''==2) {
local conformula = "`conformula'" + "`u' "
local unif_`u'=1
}
}
if ("`conformula'" != "") {
@ -330,7 +341,10 @@ local colna = "`colna'" + "beta " + "se_beta"
local j=`difitems`u''
forvalues z=1/`nbmoda_`j'' {
mat outmat[`k',colnumb(outmat,"dif_`u'_`z'")] = W[1,colnumb(W,"`z'.item`j':tt")]
}
mat outmat[`k',colnumb(outmat,"dif_detect_`u'")] = `j'
if (mod(`s',2)==0) {
mat outmat[`k',colnumb(outmat,"dif_detect_unif_`u'")] = `unif_`u''
}
}
@ -359,6 +373,6 @@ local colna = "`colna'" + "beta " + "se_beta"
}
putexcel set "`path_res'/`s'`scen'_`Nn'_original.xls", sheet("outmat") replace
putexcel A1=matrix(outmat), colnames
}
}
}
}
}
}

Loading…
Cancel
Save