Re: [R] p-value from survreg

2007-07-12 Thread hadley wickham
On 7/12/07, Terry Therneau <[EMAIL PROTECTED]> wrote: > The question was how to get the p-value from the fit below, as an S object > > sr<-survreg(s~groups, dist="gaussian") > Coefficients: > (Intercept) groups > -0.02138485 0.03868351 > > Scale= 0.01789372 > > Loglik(model)= 31.1 Loglik(in

Re: [R] p-value from survreg

2007-07-12 Thread Terry Therneau
The question was how to get the p-value from the fit below, as an S object sr<-survreg(s~groups, dist="gaussian") Coefficients: (Intercept) groups -0.02138485 0.03868351 Scale= 0.01789372 Loglik(model)= 31.1 Loglik(intercept only)= 25.4 Chisq= 11.39 on 1 degrees of freedom, p= 0

Re: [R] p-value from survreg(), library(survival)

2007-07-11 Thread Marc Schwartz
On Wed, 2007-07-11 at 16:41 +0200, hadley wickham wrote: > On 7/11/07, Marc Schwartz <[EMAIL PROTECTED]> wrote: > > Actually, in this case, looking at the code for: > > > > survival:::print.survreg > > > > would be better, as the p value is calculate there, rather than being > > part of the survr

Re: [R] p-value from survreg(), library(survival)

2007-07-11 Thread hadley wickham
On 7/11/07, Marc Schwartz <[EMAIL PROTECTED]> wrote: > Actually, in this case, looking at the code for: > > survival:::print.survreg > > would be better, as the p value is calculate there, rather than being > part of the survreg object. As with many R functions, the p value is > calculated in the

Re: [R] p-value from survreg(), library(survival)

2007-07-11 Thread Marc Schwartz
Actually, in this case, looking at the code for: survival:::print.survreg would be better, as the p value is calculate there, rather than being part of the survreg object. As with many R functions, the p value is calculated in the print method for the object. In this case, it is a pretty strai

Re: [R] p-value from survreg(), library(survival)

2007-07-11 Thread Henrique Dallazuanna
Try also: pchisq(summary(sr)$chi, degrees_freedom, lower=FALSE) *You need know your degrees of freedom -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O On 11/07/07, Vlado Sremac <[EMAIL PROTECTED]> wrote: > dear r experts: > It seems my message got spam filtered, ano

Re: [R] p-value from survreg(), library(survival)

2007-07-11 Thread hadley wickham
str(survreg(s~groups, dist="gaussian")) is probably a good place to start. Hadley On 7/11/07, Vlado Sremac <[EMAIL PROTECTED]> wrote: > dear r experts: > It seems my message got spam filtered, another try: > i would appreciate advice on how to get the p-value from the object 'sr' > created with

[R] p-value from survreg(), library(survival)

2007-07-11 Thread Vlado Sremac
dear r experts: It seems my message got spam filtered, another try: i would appreciate advice on how to get the p-value from the object 'sr' created with the function survreg() as given below. vlad sr<-survreg(s~groups, dist="gaussian") Coefficients: (Intercept) groups -0.02138485 0.0386835

[R] p-value from survreg, library(survival)

2007-07-11 Thread vladosr
dear r experts: I would appreciate advice on how to get the p-value from the object 'sr' created with the function survreg() as given below. vlad sr<-survreg(s~groups, dist="gaussian") Coefficients: (Intercept) groups -0.02138485 0.03868351 Scale= 0.01789372 Loglik(model)= 31.1 Loglik(i