[R] P-values from survreg (survival package) using a clusterterm

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Mar 6 14:17:53 CET 2006


"Ladelund, Steen" <STELAD01 at glostruphosp.kbhamt.dk> writes:

> Hi all.
> 
> Belove is the example from the cluster-help page wtih the output.
> 
> I simply cannot figure out how to relate the estimate and robust Std. Err to
> the p-value. I am aware this a marginal model applying the sandwich
> estimator using (here I guess) an emperical (unstructered/exchangeable?)
> ICC. Shouldent it be, at least to some extend, comparable to the robust
> z-test, for rx : 2*pnorm(-0.239/0.0816)=0.0034 ?
> 
> Any help/hints  are appreciated.


It's a bug. I predict that the maintainer of survival will turn
red as a boiled lobster when he sees it:

summary.survreg has

    else {
        table <- matrix(rep(coef, 5), ncol = 5)
        dimnames(table) <- list(cname, c("Value", "Std. Err",
            "(Naive SE)", "z", "p"))
        stds <- sqrt(diag(object$var))
        table[, 2] <- stds
        table[, 3] <- sqrt(diag(object$naive.var))
        table[, 4] <- table[, 1]/stds
        table[, 5] <- 2 * pnorm(-abs(table[, 3]))
    }

The last line should work better with table[, 4] since that is the z
statistic; table[, 3] is the naive SE ...
 
> Steen and R 2.2.1, survival 2.21 on win XP.
> 
> library(survival)
> data(rats)
> marginal.model <- survreg(Surv(time, status) ~ rx +  cluster(litter), rats )
> summary(marginal.model)
> 
> > library(survival)
> > data(rats)
> > marginal.model <- survreg(Surv(time, status) ~ rx +  cluster(litter), rats
> )
> > summary(marginal.model)
> 
> Call:
> survreg(formula = Surv(time, status) ~ rx + cluster(litter), 
>     data = rats)
>              Value Std. Err (Naive SE)     z     p
> (Intercept)  4.983   0.0886     0.0833 56.25 0.934
> rx          -0.239   0.0816     0.0891 -2.92 0.929
> Log(scale)  -1.333   0.1688     0.1439 -7.89 0.886
> 
> Scale= 0.264 
> 
> Weibull distribution
> Loglik(model)= -242.3   Loglik(intercept only)= -246.3
> 	Chisq= 8 on 1 degrees of freedom, p= 0.0047 
> (Loglikelihood assumes independent observations)
> Number of Newton-Raphson Iterations: 7 
> n= 150 
> 
> > 
> 
> Steen Ladelund, statistician
> +4543233275 stelad01CURLYAglostruphospDOTkbhamt.dk
> Research Center for Prevention and Health
> Glostrup University Hospital, Denmark
> www.fcfs.kbhamt.dk
> 
> ______________________________________________
> 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
> 

-- 
   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
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list