[R] how ot get covariance matrix from survreg

Doran, Harold HDoran at air.org
Fri Feb 11 21:18:16 CET 2005


vcov(f) will work 

-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of mingan
Sent: Friday, February 11, 2005 2:54 PM
To: r-help at stat.math.ethz.ch
Subject: [R] how ot get covariance matrix from survreg 


 I have a question,  I generated some data and tried survreg to analyze
them, but here, I want to get the covariance matrix of the coefficients.


I know how to get corr from survreg, say,  summary(f,corr=T), but how to

get covariance matrix of the coefficient ?
can I put them in a matrix and output ?


thanks


below is what I did


<mailto:r-help at stat.math.ethz.ch>
n=100; beta=1.0

z=runif(n)
u=runif(n)
epi=log(u/(1-u))
d=rep(1,n)
t=z*beta+epi
f<-survreg(Surv(t,d)~z+epi, dist="logistic")

summary(f, corr=T)


below is the result

 > summary(f, corr=T)

.......
........

Correlation of Coefficients:
           (Intercept) z      epi  
z          -0.882                  
epi         0.167      -0.168      
Log(scale)  0.000       0.000  0.000



here I want covariance matrix

 thanks for your help

pls reply to me directly if you can


mingan yang











	[[alternative HTML version deleted]]

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html




More information about the R-help mailing list