* v 3.1.3 PR 12-Dec-94. (sg26.3: STB-25) program define _jprfprp version 3.1 if "$S_E_fprp"=="no" { di in bl "no further output available" exit } local options "Summary Comparison Estimates" parse "`*'" if "$S_E_fp"!="fp" { error 301 } local search = $S_E_srch & !$S_E_lin if !`search' { if "`compari'"!="" { di in red "model comparisons not available" exit 198 } $S_E_cmd di in gr "Deviance =" in ye %10.3f $S_E_dev0 /* */ in gr ". Fractional power(s) used: " /* */ in ye "$S_E_pwrs" in gr "." _jprfpmm if $S_E_bloc { /* blogit */ di in bl _n "[Dataset length doubled. Type" /* */ in wh " drop if _y_eq_1 " /* */ in bl "to restore to original length.]" } exit } if "$S_E_base"=="" { local base "[none]" } else local base "$S_E_base" local df3 = $S_E_DF==3 local df4 = $S_E_DF==4 * local df1 = 2+`df4'+$S_E_nxp * local df2 = 4-`df3'+$S_E_nxp local df1m=1+$S_E_dfm*(1+`df4'+$S_E_nxp) local df2m=2-`df3'+$S_E_dfm*(2+$S_E_nxp) if $S_E_nxp>0 { local plus "+" } else local plus " " if `df4' { local pm1 "1, $S_E_pm1" } local pm1 = substr("$S_E_pm1 ",1,7) if "`estimat'"=="" & "`compari'"=="" { local summary "summary" } if "`summary'"!="" { #delimit ; di _n in gr "MODELS, POWERS (p), DEVIANCES (D) and GAINS (G)" " for Y = " in ye "${S_E_depv}" in gr ", X = " in ye "${S_E_rhs}" in gr "." ; di in gr _n "(*) Base model Linear Quadratic Cubic BoxTid" _skip(6) "df(" in ye %1.0f `df1m' in gr ")`plus'" _cont ; if $S_E_meq2 { di in gr _skip(5) "df(" in ye %1.0f `df2m' in gr ")`plus'" _cont } ; local d = 66+11*$S_E_meq2+($S_E_nxp>0) ; di in gr _n _dup(`d') "-" ; di in gr "p" in ye " -- 1 1, 2 1, 2, 3 1, 1" _skip(6) "`pm1'`plus'" _cont ; if $S_E_meq2 { di %4.0g $S_E_pm21 "," %4.0g $S_E_pm22 "`plus'" _cont ; } ; di in gr _n "D" in ye %10.3f $S_E_dev0 %11.3f $S_E_devl %11.3f $S_E_devq %11.3f $S_E_devc %11.3f $S_E_devb %11.3f $S_E_dev1 _cont ; if $S_E_meq2 { di in ye %11.3f $S_E_dev2 _cont } ; di in gr _n "G" _skip(10) in ye %11.3f 0 %11.3f $S_E_devl-$S_E_devq %11.3f $S_E_devl-$S_E_devc %11.3f $S_E_devl-$S_E_devb %11.3f $S_E_devl-$S_E_dev1 _cont ; if $S_E_meq2 { di in ye %11.3f $S_E_devl-$S_E_dev2 _cont } ; di ; #delimit cr _jprfpmm } if "`compari'"!="" { #delimit ; di _n in gr "MODEL COMPARISONS" _cont ; if "$S_E_wa1"!="" { di in red " [warning: GLM deviances are unscaled---ignore P-values]"; } ; else { di in gr " (Note: P-values for df(" in ye `df1m' in gr ") and df(" in ye `df2m' in gr ") are conservative.)" ; } di in gr _n "Model comparison DF Dev. diff. P | " "Model comparison DF Dev. diff. P" ; di in gr _dup(38) "-" "+" _dup(38) "-" ; di in gr "Linear vs base" in ye _col(20) "$S_E_dfm " %9.3f $S_E_d0l %7.3f $S_E_P0l in gr " | Quad vs linear" in ye _col(60) "$S_E_dfm " %9.3f $S_E_d1q %7.3f $S_E_P1q ; di in gr "Cubic vs quad" in ye _col(20) "$S_E_dfm " %9.3f $S_E_d2c %7.3f $S_E_P2c in gr " | BoxTid vs linear" in ye _col(60) "$S_E_dfm " %9.3f $S_E_dlBT %7.3f $S_E_PlBT ; di in gr _col(39) "|" ; di in gr "df(" in ye %1.0f `df1m' in gr ")`plus' vs base" in ye _col(19) %2.0f `df1m' " " %9.3f $S_E_d0m1 %7.3f $S_E_P0m1 in gr " | df(" in ye %1.0f `df1m' in gr ")`plus' vs linear" in ye _col(59) %2.0f `df1m'-$S_E_dfm " " %9.3f $S_E_dlm1 %7.3f $S_E_Plm1 ; if $S_E_meq2 { di in gr _col(39) "|" ; di in gr "df(" in ye %1.0f `df2m' in gr ")`plus' vs base" in ye _col(19) %2.0f `df2m' " " %9.3f $S_E_d0m2 %7.3f $S_E_P0m2 in gr " | df(" in ye %1.0f `df2m' in gr ")`plus' vs linear" in ye _col(59) %2.0f `df2m'-$S_E_dfm " " %9.3f $S_E_dlm2 %7.3f $S_E_Plm2 ; di in gr "df(" in ye %1.0f `df2m' in gr ")`plus' vs quad" in ye _col(19) %2.0f `df2m'-2*$S_E_dfm " " %9.3f $S_E_dqm2 %7.3f $S_E_Pqm2 in gr " | df(" in ye %1.0f `df2m' in gr ")`plus' vs df(" in ye %1.0f `df1m' in gr ")`plus'" in ye _col(59) %2.0f `df2m'-`df1m' " " %9.3f $S_E_dm12 %7.3f $S_E_Pm12 ; } ; #delimit cr } di _n in gr "(*) Base model = " in ye "`base'" /* */ in gr " (" in ye $S_E_nobs in gr " obs.)" if $S_E_nxp>0 { di in gr "`plus' Fixed powers included in all FP models: " /* */ in ye "$S_E_fixp" } if "$S_E_zeta"!="" { version 2.1 local zeta = $S_E_zeta /* round */ version 3.1 if $S_E_shft { if `zeta'<0 { local z "-" local zeta = -`zeta' } else local z "+" di in gr _n "X transformed to X`z'`zeta'." } else { if `zeta'>0 { local z "-" } else { local zeta = -`zeta' local z "+" } di in gr _n /* */ "X transformed to (X`z'`zeta')/(Xmax`z'`zeta')." } } if "`estimat'"!="" { $S_E_cmd if $S_E_meq2 { local dev $S_E_dev2 } else local dev $S_E_dev1 di in gr "Deviance =" in ye %10.3f `dev' /* */ in gr ". Fractional power(s) used: " /* */ in ye "$S_E_pwrs" in gr "." } if $S_E_bloc { /* blogit */ di in bl _n "[Dataset length doubled. Type" /* */ in wh " drop if _y_eq_1 " /* */ in bl "to restore to original length.]" } end