Displaying 20 results from an estimated 1072 matches for "surve".
Did you mean:
sure
2006 Mar 15
5
Surv object in data.frame
Dear All,
a Surv object I put in a data frame behaves somehow unexpected (see example).
If I do a Cox regression on the original Surv object it works. If I put it
in a data.frame and do the regression on the data frame it does not work.
Seemingly it has to do with the class attribute, because if I change the
class attribute to let "Surv" appeare first, again it works.
Is this known?
2013 Jan 14
1
Does psm::Surv handle interval2 data?
Does Surv in psm handle interval2 data? The argument list seems to indicate it does but I get an error.
Thanks,
Chris
# code
library('survival')
left <- c(1, 3, 5, NA)
right <-c(2, 3, NA, 4)
Surv(left, right, type='interval2')
survreg(Surv(left, right, type='interval2') ~ 1)
library('rms')
Surv(left, right, type='interval2') # error
args(Surv)
2011 Jun 24
1
UnoC function in survAUC for censoring-adjusted C-index
Hello,
I am having some trouble with the 'censoring-adjusted C-index' by Uno et al, in the package survAUC. The relevant function is UnoC.
The question has to do with what happens when I specify a time point t for the upper limit of the time range under consideration (we want to avoid using the right-end tail of the KM curve).
Copying from the example in the help file:
TR <-
2010 Sep 10
2
survfit question
Hi,
I am attempting to graph a Kaplan Meier estimate for some claims using the survfit function. However, I was wondering if it is possible to plot a cdf of the kaplan meier rather than the survival function. Here is some of my code:
library(survival)
Surv(claimj,censorj==0)
survfit(Surv(claimj,censorj==0)~1)
surv.all<-survfit(Surv(claimj,censorj==0)~1)
summary(surv.all)
plot(surv.all)
2009 Apr 25
3
Nomogram with stratified cph in Design package
Hello,
I am using Dr. Harrell's design package to make a nomogram. I was able to
make a beautiful one without stratifying, however, I will need to stratify
to meet PH assumptions. This is where I go wrong, but I'm not sure where.
Non-Stratified Nomogram:
2005 Oct 11
1
summary of Surv object crashes R 2.2.0 (PR#8203)
Full_Name: Victor Moreno
Version: 2.2.0
OS: windows
Submission from: (NULL) (213.151.99.160)
summary of an object class Surv (package survival) hangs and closes R 2.2.0
I would like to have Surv objects in a data frame to build models easier:
t<-rexp(100)
s<-rbinom(100,1,.3)
surv<-Surv(t,s)
x1<-rnorm(100,10,2)
x2<-rnorm(100,10,2)
dat<-data.frame(surv,x1,x2)
2007 Oct 19
0
calculating power of log rank test
hie
Im trying to calculate the power of the logrank test for different values of rho .I was just wandering whether the following programme would do it. any suggestions are welcome
s=50
number=1
count1=0;count2=0;count3=0;count4=0;count5=0;count6=0;count7=0;count7=0;
count8=0;count9=0
while(s!=0){
n=20
n1=n/2
2007 May 02
3
the Surv function
Hi,
I'm trying to do a simple survival analysis on some data, and I'm having the
following problem (here's my code and the error message):
out <- Surv(fup,event=status)
Error in Surv(fup, event = status) : argument "time2" is missing, with no
default
>From reading the documentation, it seems that I should be able to simply
write: Surv(time1, event) if my data is
2009 Jul 13
1
survSplit with data.frame containing a Surv object
Dear All,
since years I am struggling with Surv objects in data.frames. The
following seems to have to do with it.
See below the modified example from the help page of survSplit. The
original works, as expected. If, however, a Surv object is added to
the data.frame, each record gets doubled.
Is there some solution other than avoiding Surv objects in data.frames?
Thanks,
Heinz
2012 Dec 06
1
as.matrix.Surv -- R core question/opinions
1. A Surv object is a matrix with some extra attributes. The as.matrix.Surv function
removes the extras but otherwise leaves it as is.
2. The last several versions of the survival library were accidentally missing the
S3method('as.matrix', 'Surv') line from their NAMESPACE file. (Instead it's position is
held by a duplicate of the line just above it in the NAMESPACE file,
2004 Aug 11
2
str and Surv objects
Dear R People:
I used the "Surv" function to produce the following object:
>a <- Surv(1:4,2:5,c(0,1,1,0)) a
[1] (1,2+] (2,3 ] (3,4 ] (4,5+]
>str(a)
Error in "[.Surv"(object, 1:ile) : subscript out of bounds
>
Why does str(a) give an error, please? Or did I do something wrong?
Thanks in advance.
R Version 1.9.1 Windows
Sincerely,
Laura Holt
mailto: lauraholt_983
2009 May 15
1
Function Surv and interpretation
Dear everyone,
My question involves the use of the survival object.
We can have
Surv(time,time2,event, type=, origin = 0) (1)
As detailed on p.65 of:
http://cran.r-project.org/web/packages/survival/survival.pdf
My data (used in my study) is 'right censored' i.e. my variable corresponding to 'event' indicates whether a person is alive (0) or dead (1) at date last seen
2006 Mar 16
2
Surv object in data.frame and Design package
Dear All,
there seems to be some strange influence of the Design package on
data.frame. If I build a data.frame containing a Surv object without
loading the package Design, the data frame is usable to coxph. If instead I
just load Design and build a data.frame afterwards, the naming of the Surv
object is different and it does not work with coxph.
(In my real application I loaded Design to use the
2004 Jun 07
1
Censboot Warning and Error Messages
Good day R help list!!!
I've been trying to do Bootstrap in R on Censored data. I encountered
WARNING/ERROR messages which I could not find explanation.
I've been searching on the literature for two days now and still can't find
answers. I hope there's anyone out there who can help me
with these two questions:
1. If the "Loglik converged before variable..." message
2009 Nov 06
1
Survival Plot in R 2.10.0
I would like to produce a complimentary log-log survival plot with
only the points appearing on the graph. I am using the code below,
taken from the plot.survfit page of help for the the survival package
(version 2.35-7).
I am running in R 2.10.0 on Windows XP, and the list of packages
following
the error is loaded. Is there some specific 'type= ' syntax, or an
additional parameter
that
2008 Feb 14
0
help in simplyfiying programme
my program given below can some one make it presentable. I trying to simulate survival data and calculate the power. I think i could have done better.
s=10
number=0
count1=0;count2=0;count3=0;count4=0;count5=0;count6=0;count7=0;count8=0;
count9=0;
count11=0;count22=0;count33=0;count44=0;count55=0;count66=0;count77=0;
count88=0;count99=0;
while(s!=0){
n=100
n1=n/2
n2=n/4
2007 Oct 29
3
using survfit
hie
when i use plot.survfit to plot more than one graph why I only see the last graph how do i see the other graphs.for example
n=20
n1=n/2
n2=n/4
a11=4;a12=4 ;a21=4 ;a22=4
t1<-array(1,c(n1))
t2<-array(2,c(n1))
treatgrp=matrix(c(t1,t2))
2011 Sep 12
1
coxreg vs coxph: time-dependent treatment
Dear List,
After including cluster() option the coxreg (from eha package)
produces results slightly different than that of coxph (from survival)
in the following time-dependent treatment effect calculation (example
is used just to make the point). Will appreciate any explaination /
comment.
cheers,
Ehsan
############################
require(survival)
require(eha)
data(heart)
# create weights
2009 Jan 14
2
Kaplan-Meier Plot
dear all,
I want to plot a kaplan Meier plot with the following functions, but I fail
to produce the plot I want:
library(survival)
tim <- (1:50)/6
ind <- runif(50)
ind[ind > 0.5] <- 1; ind[ind < 0.5] <- 0;
MS <- runif(50)
pred <- vector()
pred[MS < 0.3] <- 0; pred[MS >= 0.3] <- 1
df <- as.data.frame(cbind(MS, tim, pred, ind))
names(df) <-
2007 Jan 19
1
Error in basehaz function ?
Hello R-users.
I believe that the way basehaz (in the survival package) compute the
baseline hazard function is false.
I come to question this function when it gives me hazard probabilities
greater than 1.
Looking at the code I think I've localised the error :
hazard probability is computed as :
H <- -log(surv)
but it seems to me that hazard probabilities is rather an instantaneous