Displaying 8 results from an estimated 8 matches for "survobj".
2006 Mar 15
5
Surv object in data.frame
...he
class attribute to let "Surv" appeare first, again it works.
Is this known? Should I have found information on it?
Any comments?
Thanks
Heinz T?chler
## example data
starttime <- rep(0,5)
stoptime <- 1:5
event <- c(1,0,1,1,1)
group <- c(1,1,1,2,2)
## Surv object
survobj <- Surv(starttime, stoptime, event)
## Cox-regression
coxph(survobj~group) # this works
## put Surv object in data.frame
df.test <- data.frame(survobj=I(survobj), group)
## Cox-regression on data.frame
coxph(survobj~group, data=df.test) # this does not work
attr(df.test$survobj, 'class&...
2006 Dec 05
0
How to join data.frames containing Surv objects?
...ject retains it's class, but I would wish it did.
Thanks
Heinz T?chler
R version 2.4.0 Patched (2006-11-03 r39792)
Windows XP
library(survival)
## create example data
starttime <- rep(0,5)
stoptime <- 1:5
event <- c(1,0,1,1,1)
group <- c(1,1,1,2,2)
## build Surv object
survobj <- Surv(starttime, stoptime, event)
## build data.frame with Surv object
df.test <- data.frame(survobj, group); df.test; str(df.test)
## split in two data frames
dft1 <- df.test[1:3,]; dft1; str(dft1); class(dft1$survobj) # class is Surv
dft2 <- df.test[4:5,]; dft2; str(dft2); class(d...
2006 Mar 16
2
Surv object in data.frame and Design package
...he problem.
Is it wrong to expect that R works after detaching a package as before
loading it?
Comments?
Thanks
Heinz T?chler
## example
starttime <- c(0, 0, 1.5, 0, 2.5)
stoptime <- c(1, 1.5, 2, 2.5, 3)
event <- c(1, 0, 1, 0, 0)
ie.status <- c(0, 0, 1, 0, 1)
library(survival)
survobj <- Surv(starttime, stoptime, event)
df.nodesign <- data.frame(survobj, ie.status) # build df without loading
Design
df.nodesign
library(Design)
df.design <- data.frame(survobj, ie.status) # build df after loading Design
df.design
all.equal(df.nodesign, df.design)
detach(package:Design)
de...
2013 Feb 13
2
NA/NaN/Inf in foreign function call (arg 6) error from coxph function
Dear R-helpers:
I am trying to fit a multivariate Cox proportional hazards model,
modelling survival outcome as a function of treatment and receptor
status. The data look like below:
# structure of the data
str(sample.data)
List of 4
$ survobj : Surv [1:129, 1:2] 0.8925+ 1.8836+ 2.1191+ 5.3744+
1.6099+ 5.2567 0.2081+ 0.2108+ 0.2683+ 0.4873+ ...
..- attr(*, "dimnames")=List of 2
.. ..$ : NULL
.. ..$ : chr [1:2] "time" "status"
..- attr(*, "type")= chr "right"
$ therapy : Factor...
2012 Apr 13
3
Kaplan Meier analysis: 95% CI wider in R than in SAS
...S. For example, in SAS I have a median of 3.29 with a 95% CI of [1.15, 5.29]. In R, I get a median of 3.29 with a 95% CI of [1.35,?13.35].
?
Can anyone tell me why I get this difference?
?
My R code looks like:
?
survfrm <- Surv(progression_months_landmark_14,progression==1) ~ pr_rg_landmark_14
survobj <- survfit(survfrm, data=Survival)
survlrk <- survdiff(survfrm, data=Survival)
summary(survobj)
print(survobj)
print(survlrk)
?
My SAS code looks like:
?
proc lifetest data=survival;
strata pr_rg_landmark_14;
time progression_months_landmark_14 * progression(0);
run;
Thought maybe the differ...
2012 May 04
1
Correct Interpretation of survreg() coeffs
...hat the output below essentially translates to
"Males have a mean time that is significantly lower than Females"? Is this
the correct way to interpret the fact that the coefficient is negative?
Assume the variale sex is treated as a factor with Female =0 and Male=1.
survmodel<-survreg(survobj~sex,data=data1, dist="weibull")
survsum<-summary(survmodel)
survsum
Value Std. Error z p
SexMale -0.47830 0.3745 -1.2770 2.02e-01
--
View this message in context: http://r.789695.n4.nabble.com/Correct-Interpretation-of-survreg...
2013 Feb 12
0
NA/NaN/Inf in foreign function call (arg 6) error from coxph
Dear R-helpers:
I am trying to fit a multivariate Cox proportional hazards model,
modelling survival outcome as a function of treatment and receptor
status. The data look like below:
# structure of the data
str(sample.data)
List of 4
$ survobj : Surv [1:129, 1:2] 0.8925+ 1.8836+ 2.1191+ 5.3744+
1.6099+ 5.2567 0.2081+ 0.2108+ 0.2683+ 0.4873+ ...
..- attr(*, "dimnames")=List of 2
.. ..$ : NULL
.. ..$ : chr [1:2] "time" "status"
..- attr(*, "type")= chr "right"
$ therapy : Factor...
2013 Jul 23
0
Coxme Package Error Message Help
...6) error
from coxph function
The NaN/Inf message is almost certainly from a singular fit. I would be
interested in a copy of the data set to test it: data sets that cause this are
rare, and help me to tune the convergence/signularity criteria in the
program. Note: it is much easier to use coxph(survobj ~ therapy +
ReceptorA + ReceptorB, data=sample.data) than to put "sample.data$" in
front of every variable name; and easier to read as well.
Terry Therneau (author of coxph function)
Thank you,
--
Michel Kohl
<><><><><><><><><><...