Transcription of R による順序ロジットモデルの推定
1 1 R (ordered logit ) R 1. ordinal R ordinal R R R 600 R .. ( ) ordinal R Console > library(ordinal) ordinal 2. ( ) R > flabordata = (" ",header=T,skip=12) 3382 6 1 R R clm() clm()
2 R 2 > = (flabordata$ ) > head( ,10) [1] 5 2 5 1 6 1 1 3 5 1 Levels: 1 < 2 < 3 < 4 < 5 < 6 flabordata$ flabordata 3 clm > result= clm( ~income+age+edu+n1+n2+n3+race+home+lur, + data=flabordata) ..+lur, Enter (R 1 Enter ) + data=flabordata income age ( data= ) ( ) ( ) income, age, edu.
3 , lur > summary(result) formula: ~ income + age + edu + n1 + n2 + n3 + race + home + lur data: flabordata link threshold nobs logLik AIC niter logit flexible 3382 6(0) +07 Coefficients: Estimate Std. Error z value Pr(>|z|) income ** age < 2e-16 ** edu < 2e-16 ** n1 < 2e-16 ** n2 ** n3 race ** home ** lur ** --- Signif. codes: 0 ** ** * . 1 Threshold coefficients: Estimate Std. Error z value 3 1|2 2|3 3|4 4|5 5|6 Coefficients Threshold coefficients 1|2 1 2 z ( / ) z P income (fitted value) > fitted(result) clm > result = clm( ( )~income+age+edu+n1+n2+n3+race+home+ + lur,data=flabordata) : (2) Model is nearly unidentifiable.
4 Very large eigenvalue - Rescale variables? ( 10000 1 ) income income rescale 100 1 ( ) > income2= *flabordata$income 4 > result = clm( ~income2+age+edu+n1+n2+n3+race+home+ + lur,data=flabordata) > summary(result) formula: ( ) ~ income2 + age + edu + n1 + n2 + n3 + race + home + lur data: flabordata link threshold nobs logLik AIC niter logit flexible 3382 6(0) +05 Coefficients: Estimate Std. Error z value Pr(>|z|) income2 ** age < 2e-16 ** edu < 2e-16 ** n1 < 2e-16 ** n2 ** n3 race ** home ** lur ** --- Signif.
5 Codes: 0 ** ** * . 1 Threshold coefficients: Estimate Std. Error z value 1|2 2|3 3|4 4|5 5|6 ( ?) income2 ( income )100 3 3 clm link = " probit " > result = clm( ~income2+age+edu+n1+n2+n3+race+home+ + lur,data=flabordata,link=" probit ") 5 3/ logitprobit ( ) probit logit 1. flabordata ( presult lresult > (pi/sqrt(3))*presult$coefficients lresult$coefficients )
