Displaying 20 results from an estimated 2000 matches similar to: "plotting coxph results using survfit() function"
2007 Nov 22
5
testing independence of categorical variables
hi,
is there a way of calculating of measuring dependence between two
categorical variables. i tried using the chi square test to test for
independence but i got error saying that the lengths of the two
vectors don't match. Suppose X and Y are two factors. X has 5 levels
and Y has 7 levels. This is what i tried doing
>temp<-chisq.test(x,y)
but got error "the lengths of the two
2007 Nov 16
7
sorting factor levels by data frequency of levels
using an example from r online help
> state <- c("tas", "sa", "qld", "nsw", "nsw", "nt", "wa", "wa",
"qld", "vic", "nsw", "vic", "qld", "qld", "sa", "tas",
"sa", "nt", "wa", "vic",
2007 Dec 09
2
Getting estimates from survfit.coxph
Dear all,
I'm having difficulty getting access to data generated by survfit and
print.survfit when they are using with a Cox model (survfit.coxph).
I would like to programmatically access the median survival time for
each strata together with the 95% confidence interval. I can get it on
screen, but can't get to it algorithmically. I found myself examining
the source of print.survfit to
2011 Oct 01
4
Is the output of survfit.coxph survival or baseline survival?
Dear all,
I am confused with the output of survfit.coxph.
Someone said that the survival given by summary(survfit.coxph) is the
baseline survival S_0, but some said that is the survival S=S_0^exp{beta*x}.
Which one is correct?
By the way, if I use "newdata=" in the survfit, does that mean the survival
is estimated by the value of covariates in the new data frame?
Thank you very much!
2006 Dec 29
2
Survfit with a coxph object
I am fitting a coxph model on a large dataset (approx 100,000 patients), and
then trying to estimate the survival curves for several new patients based
on the coxph object using survfit. When I run coxph I get the coxph object
back fairly quickly however when I try to run survfit it does not come
back. I am wondering if their is a more efficient way to get predicted
survival curves from a coxph
2011 May 06
2
coxph and survfit issue - strata
Dear users,
In a study with recurrent events:
My objective is to get estimates of survival (obtained through a Cox model) by rank of recurrence and by treatment group.
With the following code (corresponding to a model with a global effect of the treatment=rx), I get no error and manage to obtain what I want :
data<-(bladder)
2012 Nov 27
4
Fitting and plotting a coxph with survfit, package(surv)
Hi Dear R-users
I have a database with 18000 observations and 20 variables. I am running
cox regression on five variables and trying to use survfit to plot the
survival based on a specific variable without success.
Lets say I have the following coxph:
>library(survival)
>fit <- coxph(Surv(futime, fustat) ~ age + rx, data = ovarian)
>fit
what I am trying to do is plot a survival
2013 Dec 07
1
combine glmnet and coxph (and survfit) with strata()
Dear All,
I want to generate survival curve with cox model but I want to estimate the
coefficients using glmnet. However, I also want to include a strata() term
in the model. Could anyone please tell me how to have this strata() effect
in the model in glmnet? I tried converting a formula with strata() to a
design matrix and feeding to glmnet, but glmnet just treats the strata()
term with one
2012 Oct 13
4
Problems with coxph and survfit in a stratified model with interactions
I?m trying to set up proportional hazard model that is stratified with
respect to covariate 1 and has an interaction between covariate 1 and
another variable, covariate 2. Both variables are categorical. In the
following, I try to illustrate the two problems that I?ve encountered, using
the lung dataset.
The first problem is the warning:
To me, it seems that there are too many dummies
2010 Apr 01
1
predicted time length differs from survfit.coxph:
Hello All,
Does anyone know why length(fit1$time) < length(fit2$n) in survfit.coxph
output? Why is the predicted time length is not the same as the number of
samples (n)?
I tried: example(survfit.coxph).
Thanks,
parmee
> fit2$n
[1] 241
> fit2$time
[1] 0 31 32 60 61 152 153 174 273 277 362
365 499 517 518 547
[17] 566 638 700 760 791
2010 Apr 27
1
Problem with time in coxph/survfit
Hi!
I am having a few problems with coxph function, I had the same problem with
the use of survfit. Here it is:
when calling 'M22<-coxphw(Surv(V1,V2,V4)~V5, data=XTDV, id=XTDV$V3, *
prentice*= ~V5, robust=TRUE, censcorr=TRUE)'
knowning that my data is:
> XTDV[1:10,1:3]
V1 V2 V3 V4 V5
1 0 36.39706 36 1 343.2224
2 0 36.39706 943 0 161.5931
3 0 36.39706
2010 Jun 23
1
Probabilities from survfit.coxph:
Hello:
In the example below (or for a censored data) using survfit.coxph, can
anyone point me to a link or a pdf as to how the probabilities appearing in
bold under "summary(pred$surv)" are calculated? Do these represent
acumulative probability distribution in time (not including censored time)?
Thanks very much,
parmee
*fit <- coxph(Surv(futime, fustat) ~ age, data = ovarian)*
2011 Feb 03
3
coxph fails to survfit
I have a model with quant vars only and the error message does not make sense:
(mod1 <- coxph(Surv(time=strt,time2=stp,event=(resp==1))~ +incpost+I(amt/1e5)+rate+strata(termfac),
subset=dt<"2010-08-30", data=inc,method="efron"))
Call:
coxph(formula = Surv(time = strt, time2 = stp, event = (resp ==
1)) ~ +incpost + I(amt/1e+05) + rate + strata(termfac),
2012 Feb 20
1
Reporting Kaplan-Meier / Cox-Proportional Hazard Standard Error, km.coxph.plot, survfit.object
What is the best way to report the standard error when publishing
Kaplan-Meier plots? In my field (Vascular Surgery), practitioners
loosely refer to the "10% error" cutoff as the point at which to stop
drawing the KM curve. I am interpreting this as the *standard error
of the cumulative hazard*, although I'm having a difficult time
finding some guidelines about this (perhaps I am
2012 Oct 14
1
Problems with coxph and survfit in a stratified model, with interactions
First, here is your message as it appears on R-help.
On 10/14/2012 05:00 AM, r-help-request@r-project.org wrote:
> I?m trying to set up proportional hazard model that is stratified with
> respect to covariate 1 and has an interaction between covariate 1 and
> another variable, covariate 2. Both variables are categorical. In the
> following, I try to illustrate the two problems that
2016 Sep 20
5
Domain Member Server: Domain Users cannot access shares
Hello to the Samba devs and mailing list subscribers,
I've run into a bit of trouble getting a new domain member server setup.
I've got three Ubuntu 14.04 64 bit VMs running the latest stable build of
Samba built from source acting as Domain Controllers. I've got a fourth
physical machine running Ubuntu 16.04 64 bit running the canonical
distribution samba (Version 4.3.9-Ubuntu)
2009 Oct 23
1
coxph() and survfit()
Dear All,
I have a question regarding the output of survfit() when I supply a Cox model. Lets say for example:
library(survival)
fit <- coxph(Surv(time, status == 2) ~ factor(spiders), data = pbc)
fit # HR for spiders is significant
newdata <- data.frame(spiders = factor(0:1))
sf <- survfit(fit, newdata = newdata)
sum.sf <- summary(sfit, times = c(2000, 2500, 3000))
# survival
2006 Dec 21
1
: newbie estimating survival curve w/ survfit for coxph
I am wondering how to estimate the survival curve for a particular case(s)
given a coxph model
using this example code:
#fit a cox proportional hazards model and plot the
#predicted survival curve
fit <- coxph(
Surv(futime,fustat)~resid.ds+strata(rx)+ecog.ps+age,data=ovarian[1:23,])
z <- survfit(fit,newdata=ovarian[24:26,],individual=F)
zs <- z$surv
zt <-
2009 Feb 12
2
R Connection with Teradata (Windows)
Hi all,
I am trying to connect Teradata with R using Windows. Due I need to install any specific package or what? I am bit clue-less. Can someone help.
Regards,
Saj
_________________________________________________________________
[[alternative HTML version deleted]]
2013 Jun 25
1
censor=FALSE and id options in survfit.coxph
Terry,
I recently noticed the censor argument of survfit. For some analyses it greatly reduces the size of the resulting object, which is a nice feature.
However, when combined with the id argument, only 1 prediction is made. Predictions can be made individually but I'd prefer to do them all at once if that change can be made.
Chris
#####################################
# CODE
# create