$c********************************************************** This command file can be run in GLIM 4 using the directive input 'ch11.glm' This command file reproduces the sample analyses shown in Chapter 11 of the software manual for the relative survival analysis program, plus some additional analyses. The data file is included in the command file. Paul Dickman (paul.dickman@mep.ki.se) October 1998 $c********************************************************** $echo on$ $tran i o f h $ $warn $ $unit 80 ! number of observations $data fu nd ld ps SEX AGE v3 DGNyear nAGE $ $factor fu 5 SEX 2 AGE 4 v3 1 DGNyear 2 $ $c $echo off$ $read 1 3 270.5 0.99719 1 2 1 1 40.00 2 13 267.0 0.99703 1 2 1 1 40.00 3 18 254.0 0.99681 1 2 1 1 40.00 4 9 236.0 0.99657 1 2 1 1 40.00 5 9 227.0 0.99630 1 2 1 1 40.00 1 5 342.0 0.99733 1 2 1 2 40.00 2 10 324.5 0.99714 1 2 1 2 40.00 3 6 287.0 0.99697 1 2 1 2 40.00 4 13 254.0 0.99684 1 2 1 2 40.00 5 3 216.0 0.99669 1 2 1 2 40.00 1 5 291.0 0.98779 1 3 1 1 52.00 2 23 286.0 0.98701 1 3 1 1 52.00 3 21 263.0 0.98615 1 3 1 1 52.00 4 12 242.0 0.98523 1 3 1 1 52.00 5 14 230.0 0.98430 1 3 1 1 52.00 1 7 503.0 0.99090 1 3 1 2 52.00 2 19 471.5 0.99028 1 3 1 2 52.00 3 23 406.0 0.98944 1 3 1 2 52.00 4 11 337.0 0.98872 1 3 1 2 52.00 5 13 283.0 0.98783 1 3 1 2 52.00 1 17 275.0 0.96019 1 1 1 1 67.00 2 34 258.0 0.95771 1 1 1 1 67.00 3 32 224.0 0.95489 1 1 1 1 67.00 4 15 192.0 0.95241 1 1 1 1 67.00 5 13 177.0 0.94929 1 1 1 1 67.00 1 10 449.0 0.96772 1 1 1 2 67.00 2 34 415.0 0.96542 1 1 1 2 67.00 3 22 332.5 0.96191 1 1 1 2 67.00 4 27 267.0 0.95884 1 1 1 2 67.00 5 20 203.5 0.95541 1 1 1 2 67.00 1 11 74.0 0.87852 1 4 1 1 80.00 2 10 63.0 0.87421 1 4 1 1 80.00 3 16 53.0 0.87480 1 4 1 1 80.00 4 6 37.0 0.87256 1 4 1 1 80.00 5 7 31.0 0.86427 1 4 1 1 80.00 1 24 200.0 0.88740 1 4 1 2 80.00 2 37 165.0 0.88223 1 4 1 2 80.00 3 20 110.5 0.87558 1 4 1 2 80.00 4 11 76.5 0.86933 1 4 1 2 80.00 5 9 54.0 0.86593 1 4 1 2 80.00 1 1 381.0 0.99912 2 2 1 1 40.00 2 6 379.0 0.99907 2 2 1 1 40.00 3 8 372.0 0.99900 2 2 1 1 40.00 4 3 364.0 0.99891 2 2 1 1 40.00 5 10 361.0 0.99884 2 2 1 1 40.00 1 0 469.0 0.99912 2 2 1 2 40.00 2 6 450.0 0.99905 2 2 1 2 40.00 3 6 401.5 0.99897 2 2 1 2 40.00 4 5 354.0 0.99887 2 2 1 2 40.00 5 6 305.5 0.99877 2 2 1 2 40.00 1 7 343.0 0.99603 2 3 1 1 52.00 2 13 336.0 0.99572 2 3 1 1 52.00 3 16 323.0 0.99537 2 3 1 1 52.00 4 13 307.0 0.99498 2 3 1 1 52.00 5 5 294.0 0.99455 2 3 1 1 52.00 1 2 438.0 0.99664 2 3 1 2 52.00 2 11 414.5 0.99637 2 3 1 2 52.00 3 6 360.0 0.99607 2 3 1 2 52.00 4 8 307.5 0.99576 2 3 1 2 52.00 5 5 256.0 0.99551 2 3 1 2 52.00 1 8 353.0 0.98141 2 1 1 1 67.00 2 24 345.0 0.97982 2 1 1 1 67.00 3 29 321.0 0.97772 2 1 1 1 67.00 4 21 292.0 0.97568 2 1 1 1 67.00 5 9 271.0 0.97354 2 1 1 1 67.00 1 12 459.0 0.98370 2 1 1 2 67.00 2 22 425.0 0.98208 2 1 1 2 67.00 3 18 357.5 0.98018 2 1 1 2 67.00 4 13 295.5 0.97809 2 1 1 2 67.00 5 12 246.5 0.97608 2 1 1 2 67.00 1 11 157.0 0.92082 2 4 1 1 80.00 2 26 146.0 0.91458 2 4 1 1 80.00 3 16 120.0 0.90651 2 4 1 1 80.00 4 13 104.0 0.90065 2 4 1 1 80.00 5 15 91.0 0.89525 2 4 1 1 80.00 1 27 312.5 0.91563 2 4 1 2 80.00 2 39 270.0 0.90888 2 4 1 2 80.00 3 30 205.0 0.90208 2 4 1 2 80.00 4 31 154.0 0.89941 2 4 1 2 80.00 5 15 103.0 0.89554 2 4 1 2 80.00 $ $macro m1 $calc exlp = -%exp(%lp) $calc %fv = %exp(exlp)*ld*ps $calc %dr = 1/(%fv*exlp) $endmac $ $macro m2 $calc %lp = 0.8$ $endmac $ $macro m3 $calc %va = %fv*(1-%fv/ld) $calc %di = 2*(%yv*%log(%yv/%fv) + (ld - %yv)*%log((1 - %yv/ld)/(1 - %fv/ld))) $endmac $ $calc ns = ld - nd $yvar ns $ $err o m3 $ $link o m1 $ $init m2 $ $ $mac rira $var %pl vari expe loli upli ein cuni ccun $extr %pe %vc $calc expe = %exp(%pe) $var %ml hilf $calc hilf = %vc $calc ein = 1 $calc cuni = %cu(ein) $calc ccun = %cu(cuni) $calc vari = hilf(ccun) $calc loli = expe*%exp(-1.96*%sqrt(vari)) $calc upli = expe*%exp(1.96*%sqrt(vari)) $print 'risk ratios with 95% ci' $look expe loli upli $del vari expe loli upli ein cuni ccun hilf $endmac $echo on$ $c************************************************************* Fit the model using the default settings. This is the analysis reported in Chapter 11 of the manual. The covariance matrix is scaled by the scale parameter, but the likelihood is not. $c************************************************************* $fit fu+age+sex+dgnyear$ $fit -sex$ $fit fu+age+sex+dgnyear$ $fit -age$ $fit fu+age+sex+dgnyear$ $fit -dgnyear$ $fit fu+age+sex+dgnyear$ $fit -fu$ $fit fu+age+sex+dgnyear$ $dis e$ $use rira$ $ $c************************************************************* Now repeat the analysis with the scale parameter fixed at one. This is the default setup used by SAS, and these results should be identical to the SAS results reported in Chapter 12. There are slight differences in the estimated standard errors, however, which I cannot explain. The scale parameter is fixed at one and neither the covariance matrix of the likelihood is scaled. $c************************************************************* $scale 1$ $fit fu+age+sex+dgnyear$ $fit -sex$ $fit fu+age+sex+dgnyear$ $fit -age$ $fit fu+age+sex+dgnyear$ $fit -dgnyear$ $fit fu+age+sex+dgnyear$ $fit -fu$ $fit fu+age+sex+dgnyear$ $dis e$ $use rira$ $ $c************************************************************** Now repeat the analysis with the scale parameter fixed at 1.072. This is identical to when the DSCALE option is used in SAS. Both the the covariance matrix and the likelihood are scaled by the specified scale parameter. $c************************************************************** $scale 1.0719142$ $fit fu+age+sex+dgnyear$ $fit -sex$ $fit fu+age+sex+dgnyear$ $fit -age$ $fit fu+age+sex+dgnyear$ $fit -dgnyear$ $fit fu+age+sex+dgnyear$ $fit -fu$ $fit fu+age+sex+dgnyear$ $dis e$ $use rira$ $ $ $return$ $finish$