[R] Survival dummy variables and some questions

Frank E Harrell Jr f.harrell at vanderbilt.edu
Mon Jul 18 18:13:50 CEST 2005


Stephen wrote:
> Hi 1. Right perhaps this should clarify. I would like to extract 
> coefficeints for different levels of the IVs (covariate). So for 
> instance, age of onset I would want Hazards etc for every 5 years and so 
> on... The approach I took was to categorize the variables (e.g., age of 
> onset) and then turn the resultant categorical variable into a factor as 
> opposed to a variable... that is when the problems began.... An 
> alternative approach to pulling out different values at different levels 
> of the variable is what I seek. 2. I looked for the link, but can't 

Your needs don't require categorization.  You can request predicted 
values at any sequence of ages.  If you want hazard ratios you can take 
differences in predicted log hazards and antilog them.

Frank


-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University




More information about the R-help mailing list