s-news
[Top] [All Lists]

Storage of objects of class=survdiff

To: "'s-news@lists.biostat.wustl.edu'" <s-news@lists.biostat.wustl.edu>
Subject: Storage of objects of class=survdiff
From: "Paul, David A" <paulda@BATTELLE.ORG>
Date: Tue, 25 Jun 2002 13:42:59 -0400
I would like to program a for-loop to calculate a set of survdiff objects
and store these results in another Splus object, like a
vector/matrix/dataframe.  
For example:

survdiff.collection <- rep(NA,20)
rho.value <- rep(NA,20)
for(i in 1:21){
        rho.value[i] <- 1-.1*(i-1)
        survdiff.collection[i] <- survdiff(Surv(Time.of.Death,Event.Status)
                ~Dose.Group,data=Data.Frame,rho=rho.value[i])
}

This naive approach doesn't work because the members of the vector
survdiff.collection
cannot handle the structured objects that survdiff( ) generates.

Is there a way to create a vector/matrix/dataframe capable of storing
objects of 
class="survdiff"?

 David Paul, Ph.D.
  Battelle Memorial Institute
  505 King Avenue
  Columbus, OH  43201
  614.424.3176


<Prev in Thread] Current Thread [Next in Thread>
  • Storage of objects of class=survdiff, Paul, David A <=