Achim Zeileis wrote: >> On Wed, 15 Oct 2008, Peter Dalgaard wrote: >> >> > jpl wrote: >> > Hello, >> > >> > I would like to extract the standard error for the coefficients > >> returned when using survreg. Does anyone know how to do this? >> >> Apparently, it is >> >> summary(mymodel)$table[,2] > > In order not to compute on the internal structure but to use extractor > methods, you could use > vcov(mymodel) > and > sqrt(diag(vcov(mymodel))) > for the covariance matrix and the standard errors respectively. > >> (Why, oh why, can't Terry allow coef(summary(...)) like we have in >> lm/glm??? Oh well...) > > Is that desired or just a by-product? From the description of the > coef() generic, it seems that coef() should only extract coefficients > (not their standard errors, Wald statistics, and p values). Good question. It's likely mostly coincidental, but it wouldn't hurt to use the construction idiomatically.
-- O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.