Skip to content
Prev 173079 / 398503 Next

survreg help in R

Error in x$terms : $ operator is invalid for atomic vectors

 You need a right-hand side for the formula
 	survreg(Surv(times, censor) ~1, dist='weibull')
 	
 In your code the first argument was not recognized as a "formula", and the 
program subsequently got very confused.  The error message was not very helpful, 
unfortunately.  
 
  FYI: from an updated help page for survreg.distributions
Coefficients:
(Intercept) 
   1.607516 

Scale= 0.5187037 

 Survreg parameters are scale=1/shape, intercept=log(scale).  This is because 
the Weibull has been imbedded in a general location-scale framework.

	Terry Therneau