Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Problems getting out of sample estimates after streg

From   "Steinar Fossedal" <>
To   <>
Subject   st: Problems getting out of sample estimates after streg
Date   Wed, 18 Jan 2006 01:41:05 +0100

Hi, listers

I'm having trouble crating out of sample predictions using -csurv- after
fitting a parametric survival time model. To generate _t and _t0, which
are needed to calculate the predictions, I've -stset- the dataset to
include both the estimation sample as well as the out-of-sample data.
I'm not sure what more -csurv- needs, as it is calculated by multiplying
the predictions from -surv-. The dataset is -stset- as multiple record

Another peculiar thing I noticed is that if the variable _st is set to
0, predictions for neither hazards or csurv will calculate, even if _t
and _t0 have been specified manually. Replacing _st to missing or 1
fixes the problem though, enabling me to calculate the hazard
predictons. Why stata checks for _st not to be 0 puzzles me when the -if
e(sample)- option is available for such purposes.

With this in the back of my head and after a bit of trial and error, if
I was to guess on what the problem is with -csurv-, I'd say it only
works for in-sample observations based on e(sample) rather than _st as
seems to be the case with -hazard- and -surv-. In other words, the
e(sample) option/restriction seems to be active by default.

I hope you can help me out and forgive my potentially bewildering
speculations. Thanks for your time,
-Steinar Fossedal

*   For searches and help try:

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