Displaying 20 results from an estimated 30000 matches similar to: "using weights with survfit"
2002 Jul 18
1
survfit on coxph object with weights
Hi,
I am working on a study where we need to predict individual survival
curves from a cox-model fit with sampling weights. In both R and Splus
the survfit.coxph code starts with
if(!is.null((object$call)$weights))
stop("Survfit cannot (yet) compute the result for a weighted model")
My question is does anyone have code to get the expected survival curve,
or even just the base
2009 Feb 17
3
Survival-Analysis: How to get numerical values from survfit (and not just a plot)?
Hi!
I came across R just a few days ago since I was looking for a toolbox
for cox-regression.
I?ve read
"Cox Proportional-Hazards Regression for Survival Data
Appendix to An R and S-PLUS Companion to Applied Regression" from John Fox.
As described therein plotting survival-functions works well
(plot(survfit(model))). But I?d like to do some manipulation with the
survival-functions
2009 Feb 26
0
plot.survfit
For a fitted Cox model, one can either produce the predicted survival curve for
a particular "hypothetical" subject (survfit), or the predicted curve for a
particular cohort of subjects (survexp). See chapter 10 of Therneau and
Grambsch for a long discussion of the differences between these, and the various
pitfalls.
By default, survfit produces the curve for a hypothetical
2009 Feb 25
3
survival::survfit,plot.survfit
I am confused when trying the function survfit.
my question is: what does the survival curve given by plot.survfit mean?
is it the survival curve with different covariates at different points?
or just the baseline survival curve?
for example, I run the following code and get the survival curve
####
library(survival)
fit<-coxph(Surv(futime,fustat)~resid.ds+rx+ecog.ps,data=ovarian)
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!
2011 Apr 20
2
survexp with weights
Hello,
I probably have a syntax error in trying to generate an expected
survival curve from a weighted cox model, but I can't see it. I used
the help sample code to generate a weighted model, with the addition
of a "weights=albumin" argument (I only chose albumin because it had
no missing values, not because of any real relevance). Below are my
code with the resulting error
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
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
2007 Jun 10
0
Question on weighted Kaplan-Meier analysis of case-cohort design
I have a study best described as a retrospective case-cohort design:
the cases were all the events in a given time span surveyed, and the
controls (event-free during the follow-up period) were selected in
2:1 ratio (2 controls per case). The sampling frequency for the
controls was about 0.27, so I used a weight vector consisting of 1
for cases and 1/0.27 for controls for coxph to adjust
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
2010 Jul 15
1
Standard Error for individual patient survival with survfit and summary.survfit
I am using the coxph, survfit and summary.survfit functions to calculate an estimate of predicted survival with confidence interval for future patients based on the survival distribution of an existing cohort of subjects. I am trying to understand the calculation and interpretation of the std.err and confidence intervals printed by the summary.survfit function.
Using the default confidence
2006 Aug 02
0
expected survival from a frailty cox model using survfit
Hello R users
Would somebody know how to estimate survival from a frailty cox model,
using the function survfit
and the argument newdata ? (or from any other way that could provide
individual expected survival
with standard error); Is the problem related to how the random term is
included in newdata ?
kfitm1 <- coxph(Surv(time,status) ~ age + sex + disease + frailty(id,
2011 Jan 14
1
Survfit: why different survival curves but same parameter estimates?
Hello,
I'm trying to estimate a Cox proportional hazard model with time-varying covariates using coxph. The parameter estimates are fine but there is something wrong with the survival curves I get with survfit (results are not plausible).
Let me explain why I think something's wrong.
To make sure I'm setting up my data correctly to estimate a model with time-varying covariates, I
2013 Mar 26
1
Weighted Kaplan-Meier estimates with R
There are two ways to view weights. One is to treat them as case weights, i.e., a weight
of 3 means that there were actually three identical observations in the primary data,
which were collapsed to a single observation in the data frame to save space. This is the
assumption of survfit. (Most readers of this list will be too young to remember when
computer memory was so small that we had to
2012 May 07
1
estimating survival times with glmnet and coxph
Dear all,
I am using glmnet (Coxnet) for building a Cox Model and
to make actual prediction, i.e. to estimate the survival function S(t,Xn) for a
new subject Xn. If I am not mistaken, glmnet (coxnet) returns beta, beta*X and
exp(beta*X), which on its own cannot generate S(t,Xn). We miss baseline
survival function So(t).
Below is my code which takes beta coefficients from
glmnet and creates coxph
2011 Sep 05
1
SAS code in R
Dear all,
I was wondering if anyone can help? I am an R user but recently I have resorted to SAS to calculate the probability of the event (and the associated confidence interval) for the Cox model with combinations of risk factors. For example, suppose I have a Cox model with two binary variables, one for gender and one for treatment, I wish to calculate the probability of survival for the
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
2009 Oct 06
0
Problem with NLTM package
Dear R users,
I have a question concerning the nltm package. Before posting to the R list I first contacted the author of the package twice but no succes. May be I've got the wrong email! My question is about the object "surv" given in the package "nltm". As explained, the object "surv" represents the MLE estimates of the baseline survival function evaluated at
2009 Oct 08
0
Question on NLTM package
Dear all,
I didn't get any suggestion for my querry concerning the NLTM package so I am re-posting it hoping that someone can give me any clue. I apologize for doing so. Please find attached a copy of my previous email:
Dear R users,
I have a question concerning the nltm package. Before posting to the R list I first contacted the author of the package twice but no succes. May be I've
2012 Apr 30
0
need help with avg.surv (Direct Adjusted Survival Curve), Message-ID:
Well, I would suggest using the code already in place in the survival
package. Here is my code for your problem.
I'm using a copy of the larynx data as found from the web resources for
the Klein and Moeschberger book.
larynx <- read.table("larynx.dat", skip=12,
col.names=c("stage", "time", "age", "year",