Skip to content
Prev 140664 / 398506 Next

Defining reference category for a cph model summary inside of a "for" loop

Wells, Brian wrote:
That's good, because the default in summary is to compare the outer 
quartiles for a continuous variable.  And as I said before the string 
'1st Quartile' has no special meaning for R or Design.

Get what you are trying to do to work without parse (and you'll need 
eval() with parse) first.  When you want total control over a setting, 
say getting a hazard ratio for the .2 to the .8 quantile, do something like

summary(f, age=quantile(age,c(.2,.8),na.rm=TRUE))

Frank