similar to: Adjusted survival curves

Displaying 20 results from an estimated 3000 matches similar to: "Adjusted survival curves"

2017 Oct 09
0
Adjusted survival curves
Adjusted survival curves. (Sample code here: https://rpubs.com/daspringate/survival ) Deep gratitude?to Moderator/Admin! At?David Winsemius prompt, more elegant working code:Thanks, Ted :) library(survival) library(survminer) df<-read.csv("F:/R/data/edgr-orig.csv", header = TRUE, sep = ";") df2 <- df df2[,c('treatment', 'age', 'sex',
2017 Oct 07
2
Adjusted survival curves
For adjusted survival curves I took the sample code from here: https://rpubs.com/daspringate/survival and adapted for my date, but got error. I would like to understand what is my mistake. Thanks! #ADAPTATION FOR MY DATA library(survival) library(survminer) df<-read.csv("F:/R/data/base.csv", header = TRUE, sep = ";") head(df) ID start stop censor sex age stage treatment 1
2017 Oct 07
2
Adjusted survival curves
For adjusted survival curves I took the sample code from here: https://rpubs.com/daspringate/survival and adapted for my date, but ... have a QUESTION. library(survival) library(survminer) df<-read.csv("base.csv", header = TRUE, sep = ";") head(df) ID start stop censor sex age stage treatment 1 1 0 66 0 2 1 3 1 2 2 0 18 0 1 2 4 2 3 3 0 43 1 2 3 3 1 4 4 0 47 1 2 3 NA 2 5 5
2017 Jun 23
0
Plot survival curves after coxph() with frailty() random effects terms
I would like to plot a survival curves of a group with different categories after running a Cox model with frailty() random effects terms. I just could display a survival plot of the covariable?s mean. Here an example: library(survival) fit<-coxph(Surv(time, status) ~ sex+ frailty(litter, dist='gamma', method='em'), rats) summary(fit ) suf<-survfit(fit) plot(suf,
2013 Jan 24
0
Royston Parmar adjusted survival curves using flexsurv
Dear R I am trying to understand and use the flexible parametric survival model suggested by Royston and Parmar. However I am stuck trying to plot the adjusted survival curves for different covariates in the following code: library(flexsurv) library(graphics) spl <- flexsurvspline(Surv(futime, fustat) ~ rx+ecog.ps+resid.ds+age, data = ovarian, k=2, scale="odds") spl the code
2009 Dec 18
2
Covariate adjusted survival curves
Hello, We are using frailty models to estimate risk of one year death. Is there a way to generate survival curves adjusted for covariates and also include frailty term? Any help will be much appreciated! Thanks! LV [[alternative HTML version deleted]]
2018 Feb 14
2
Fleming-Harrington weighted log rank test
Hi all,? The survdiff() from survival package has an argument "rho" that implements Fleming-Harrington weighted long rank test.? But according to several sources including "survminer" package (https://cran.r-project.org/web/packages/survminer/vignettes/Specifiying_weights_in_log-rank_comparisons.html), Fleming-Harrington weighted log-rank test should have 2 parameters
2018 Feb 15
0
Fleming-Harrington weighted log rank test
> On Feb 13, 2018, at 4:02 PM, array chip via R-help <r-help at r-project.org> wrote: > > Hi all, > > The survdiff() from survival package has an argument "rho" that implements Fleming-Harrington weighted long rank test. > > But according to several sources including "survminer" package
2018 Feb 15
1
Fleming-Harrington weighted log rank test
> On Feb 14, 2018, at 5:26 PM, David Winsemius <dwinsemius at comcast.net> wrote: > >> >> On Feb 13, 2018, at 4:02 PM, array chip via R-help <r-help at r-project.org> wrote: >> >> Hi all, >> >> The survdiff() from survival package has an argument "rho" that implements Fleming-Harrington weighted long rank test. >>
2005 Sep 19
2
Problem with tick marks in lines.survfit (package survival)
I have attempted to follow posting guidelines but I have failed to find out what I am doing wrong here. I am trying to use lines.survfit to plot a second curve onto a survival curve produced by plot.survfit. In my case this is to be a progression free survival curve superimposed upon an overall survival curve, but I will illustrate my problem using the example given in the help for
2007 May 07
1
Predicted Cox survival curves - factor coding problems..
The combination of survfit, coxph, and factors is getting confused. It is not smart enough to match a new data frame that contains a numeric for sitenew to a fit that contained that variable as a factor. (Perhaps it should be smart enough to at least die gracefully -- but it's not). The simple solution is to not use factors. site1 <- 1*(coxsnps$sitenew==1) site2 <-
2007 May 04
0
Predicted Cox survival curves - factor coding problems...
I am trying to use the survfit() function with the newdata argument to produce predicted survivor curves for a particular covariate profile. The main purpose of the plot will be to visualise the effect of snp1, coded 0 and 1. In my Cox model I have stratified by one variable, edu, and so I know I will automatically get a separate curve for each strata. My problem is how to deal with the
2010 Sep 21
2
Survival curve mean adjusted for covariate: NEED TO DO IN NEXT 2 HOURS, PLEASE HELP
Hi I am trying to determine the mean of a Weibull function that has been fit to a data set, adjusted for a categorical covariate , gender (0=male,1=female). Here is my code: library(survival) survdata<-read.csv("data.csv") ##Fit Weibull model to data WeiModel<-survreg(Surv(survdata$Time,survdata$Status)~survdata$gender) summary(WeiModel) P<-pweibull(n,
2005 Mar 17
1
Legend positioning in scaled survival plot
I am sorry that this is another novice question. I am having trouble using "legend" with the survival curve plot from the survival package, and I wonder if it is because I have rescaled my plot. Here is the relevant segment of code: > plot(survfit(Surv(OS,Status)~shortishcr1),main='Overall Survival by factor', + xlab='Years',ylab='%
2012 Apr 29
0
need help with avg.surv (Direct Adjusted Survival Curve)
Hello R users,  I am trying to obtain a direct adjusted survival curve. I am sending my whole code (see below). It's basically the larynx cancer data with Stage 1-4. I am using the cox model using coxph option, see the fit3 coxph. When I use the avg.surv option on fit3, I get the following error: "fits<-avg.surv(fit3, var.name="stage.fac", var.values=c(1,2,3,4), data=larynx)
2012 Nov 26
1
Plotting an adjusted survival curve
First a statistical issue: The survfit routine will produce predicted survival curves for any requested combination of the covariates in the original model. This is not the same thing as an "adjusted" survival curve. Confusion on this is prevalent, however. True adjustment requires a population average over the confounding factors and is closely related to the standardized
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",
2008 Apr 29
0
Looking for Post-hoc tests (a la TukeyHSD) or interaction-level independent contrasts for survival analysis.
Hello all R-helpers, I've performed an experiment to test for differential effects of elevated temperatures on three different groups of corals. I'm currently performing a cox proportional hazards regression with censoring on the survivorship (days to mortality) of each individual in the experiment with two factors: Temperature Treatment (2 levels: ambient and elevated) and
2010 Sep 23
2
extending survival curves past the last event using plot.survfit
Hello, I'm using plot.survfit to plot cumulative incidence of an event. Essentially, my code boils down to: cox <-coxph(Surv(EVINF,STATUS) ~ strata(TREAT) + covariates, data=dat) surv <- survfit(cox) plot(surv,mark.time=F,fun="event") Follow-up time extends to 54 weeks, but the last event occurs at week 30, and no more people are censored in between. Is there a
2009 Jun 18
1
lattice logaritmic scale (basis "e" ), rewriting labels using xscale.component
Hi there, sorry for troubling everybody once again, I've got a problem rewriting Sarkar's function for rewriting the tick locations in a logaritmic way (s. http://lmdvr.r-forge.r-project.org/code/Chapter08.R): His example works for log 2 but I need log e (natural logarithm). My problem is that if I replace 2 with "e" (using paste()), I get the error message that the location