Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: predict after Hakulinen-Tenkanen model


From   Enzo Coviello <[email protected]>
To   [email protected]
Subject   st: predict after Hakulinen-Tenkanen model
Date   Mon, 07 Nov 2005 13:32:02 +0100

Dear Stata Users

I tried to estimate a relative survival model using Hakulinen-Tenkanen model. To this aim an user defined link in glm command is available , i.e. relsurv.ado (thanks to Robert Gutierrez).

Data are grouped by intervals. Here ns means number of survivor in the interval, n_prime means effective number at risk and p_star expected survivor probability

use grouped, clear

xi: glm ns i.end i.sex i.year8594 i.agegrp , fam(bin n_prime) link(relsurv p_star)

i.end _Iend_1-5 (naturally coded; _Iend_1 omitted)
i.sex _Isex_1-2 (naturally coded; _Isex_1 omitted)
i.year8594 _Iyear8594_0-1 (naturally coded; _Iyear8594_0 omitted)
i.agegrp _Iagegrp_0-3 (naturally coded; _Iagegrp_0 omitted)
note: n_prime has non-integer values
note: ns has non-integer values

Iteration 0: log likelihood = -251.41742
Iteration 1: log likelihood = -235.65223
Iteration 2: log likelihood = -235.57195
Iteration 3: log likelihood = -235.57191
Iteration 4: log likelihood = -235.57191

Generalized linear models No. of obs = 80
Optimization : ML Residual df = 70
Scale parameter = 1
Deviance = 116.9152321 (1/df) Deviance = 1.670218
Pearson = 115.0068631 (1/df) Pearson = 1.642955

Variance function: V(u) = u*(1-u/n_prime) [Binomial]
Link function : g(u) = log(-log(u/ps)) [Hakulinen-Tenkanen]

AIC = 6.139298
Log likelihood = -235.5719096 BIC = -585.9934

------------------------------------------------------------------------------
| OIM
ns | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Iend_2 | -.178603 .0928487 -1.92 0.054 -.360583 .003377
_Iend_3 | -.4246247 .1084161 -3.92 0.000 -.6371162 -.2121331
_Iend_4 | -.656375 .1306922 -5.02 0.000 -.9125271 -.400223
_Iend_5 | -.7934491 .1507283 -5.26 0.000 -1.088871 -.4980271
_Isex_2 | -.0409842 .0770988 -0.53 0.595 -.1920951 .1101267
_Iyear8594_1 | -.3201563 .0746229 -4.29 0.000 -.4664145 -.1738981
_Iagegrp_1 | -.1510256 .1547811 -0.98 0.329 -.4543909 .1523397
_Iagegrp_2 | .0473305 .1418327 0.33 0.739 -.2306564 .3253174
_Iagegrp_3 | .2958798 .1497402 1.98 0.048 .0023945 .5893651
_cons | -2.490132 .1470346 -16.94 0.000 -2.778315 -2.20195
------------------------------------------------------------------------------


In the following predict fails to achieve the requested quantities:

. predict mu
(option mu assumed; predicted mean ns)

. tab mu

predicted |
mean ns | Freq. Percent Cum.
------------+-----------------------------------
0 | 80 100.00 100.00
------------+-----------------------------------
Total | 80 100.00




. predict r_sd, deviance standardized
no observations
r(2000);



Is there some problem in this user defined link or in glm command, or did I miss something in predict after glm?

Thanks for your attention.

Enzo



*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index