[R] survreg's algorithm

Simon Blomberg s.blomberg1 at uq.edu.au
Tue Oct 16 07:23:08 CEST 2007


Did you look at the C source code? There are 4 different variants
(survregN.c, where N <- 2:5) , depending on whether the distribution is
built-in or not, and penalized likelihood is being used or not. They all
look like NR to me, but I confess I haven't read the code in extreme
detail. It is well commented, however.

Cheers,

Simon.

PS Try figuring out what <insert commercial statistical software here>
is actually doing by reading the source code. Take that, large software
corporations! The future belongs to R!

On Tue, 2007-10-16 at 13:12 +1000, Gad Abraham wrote:
> Gad Abraham wrote:
> > Hi,
> > 
> > I'm using survreg() from the survival package for parametric survival 
> > regression (modelling inter-arrival times of patients to a waiting list 
> > as exponentially distributed, with various regressors such as queue size 
> > and season).
> > 
> > Does anyone know which algorithm survreg() uses for this?
> > 
> > Thanks,
> > Gad
> > 
> 
> Due diligence:
> 
> I have actually looked at ?survreg and friends, and at the source code; 
> except for a brief mention of a "sparse Newton-Rapshon algorithm" in the 
> frailty model code, I couldn't find anything substantive.
> 
> 
-- 
Simon Blomberg, BSc (Hons), PhD, MAppStat. 
Lecturer and Consultant Statistician 
Faculty of Biological and Chemical Sciences 
The University of Queensland 
St. Lucia Queensland 4072 
Australia
Room 320 Goddard Building (8)
T: +61 7 3365 2506 
email: S.Blomberg1_at_uq.edu.au

Policies:
1.  I will NOT analyse your data for you.
2.  Your deadline is your problem.

The combination of some data and an aching desire for 
an answer does not ensure that a reasonable answer can 
be extracted from a given body of data. - John Tukey.



More information about the R-help mailing list