similar to: (survexp:) compute the expected remaining survival time

Displaying 20 results from an estimated 6000 matches similar to: "(survexp:) compute the expected remaining survival time"

2010 Dec 10
2
survival package - calculating probability to survive a given time
Dear R users, i try to calculate the probabilty to survive a given time by using the estimated survival curve by kaplan meier. What is the right way to do that? as far as is see i cannot use the predict-methods from the survival package? library(survival) set.seed(1) time <- cumsum(rexp(1000)/10) status <- rbinom(1000, 1, 0.5) ## kaplan meier estimates fit <- survfit(Surv(time,
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
2010 Dec 31
3
survexp - example produces error
Dear All, reposting, because I did not find a solution, maybe someone could check the example below. It's taken from the help page of survdiff. Executing it, gives the error "Error in floor(temp) : Non-numeric argument to mathematical function" best regards, Heinz library(survival) ## Example from help page of survdiff ## Expected survival for heart transplant patients based
2011 Sep 28
1
survexp with large dataframes
Hello, and thank you in advance. I would like to capture the expected survival from a coxph model for subjects in an observational study with recurrent events, but the survexp statement is failing due to memory. I am using R version 2.13.1 (2011-07-08) on Windows XP. My objective is to plot the fitted survival with the Kaplan-Meier plot. Below is the code with output and [unfortunately]
2000 Apr 05
1
problem with survexp in survival5
survexp in survival5 doesn't seem to work for me. see below: > library(survival5) Attaching Package "package:survival5": The following object(s) are masked from package:base : sort.list > library(chron) > data(ratetables) > survexp(~ratetable(year=julian(6,1,1991), + sex=1,age=35*365.24),times=(0:30)/6*365.24) Error in as.character(as.date(c(min(R[, 3]),
2012 Oct 06
2
Expected number of events, Andersen-Gill model fit via coxph in package survival
Hello, I am interested in producing the expected number of events, in a recurring events setting. I am using the Andersen-Gill model, as fit by the function "coxph" in the package "survival." I need to produce expected numbers of events for a cohort, cumulatively, at several fixed times. My ultimate goal is: To fit an AG model to a reference sample, then use that fitted model
2005 Dec 15
2
survexp ratetables for european contries?
Dear All, Does someone have, or know of survexp ratetables for european contries, especially Austria and Germany? I know only about slopop in the package relsurv. Thanks in advance Heinz T??chler
2010 Dec 20
0
survexp - unable to reproduce example
Dear All, when I try to reproduce an example of survexp, taken from the help page of survdiff, I receive the error message "Error in floor(temp) : Non-numeric argument to mathematical function" . It seems to come from match.ratetable. I think, it has to do with character variables in a ratetable. I would be interested to know, if it works for others. With an older version of
2010 Sep 13
0
using survexp and ratetable with coxph object that includes a factor term
Hello, I'm attempting to use the ratetable argument to survexp in the survival package. I use the example from the ?survexp help page below, and then slightly modify it to produce an error. library(survival) data(pbc) #fit a model without any factors pfit1 <- coxph(Surv(time, status > 0) ~ trt + log(bili) + log(protime) + age + platelet, data=pbc) #this works as expected
2010 Nov 11
3
Evaluation puzzle
The survexp function can fail when called from another function. The "why" of this has me baffled, however. Here is a simple test case, using a very stripped down version of survexp: survexp.test <- function(formula, data, weights, subset, na.action, rmap, times, cohort=TRUE, conditional=FALSE, ratetable=survexp.us, scale=1, npoints, se.fit,
2009 Jan 19
1
further notes on model.frame issue
This is a follow-up on my note of Saturday. Let me start with two important clarifications - I think this would be a nice addition, but I've had exactly one use for it in the 15+ years of developing the survival package. - I have a work around for the current case. Prioritize accordingly. The ideal would be to change survexp as follows: fit <- survexp( ~ gender,
2011 May 26
5
Survival: pyears and ratetable: expected events
Dear all, I am having a (really) hard time getting pyears to work together with a ratetable to give me the number of expected events (deaths). I have the following data: dos, date of surgery, as.Date dof, date of last follow-up, as.Date dos, date of surgery, as.Date sex, gender, as.factor (female,male) ev, event(death), 0= censored at time point dof, 1=death at time point dof Could someone
2009 Apr 17
5
Binomial simulation
Hi Guy's I was wondering if someone could point me in the right direction. dbinom(10,1,0.25) I am using dbinom(10,1,0.25) to calculate the probabilty of 10 judges choosing a certain brand x times. I was wondering how I would go about simulating 1000 trials of each x value ? regards Brendan -- View this message in context:
2008 Jan 29
2
Direct adjusted survival?
Hello, I am trying to find an R function to compute 'direct adjusted survival' with standard errors. A SAS-macro to do this is presented in Zhang X, Loberiza FR, Klein JP, Zhang MJ. A SAS macro for estimation of direct adjusted survival curves based on a stratified Cox regression model. Comput Methods Programs Biomed 2007;88:95-101. It appears that this method is not implemented in R.
2009 May 21
1
Changelog for the survival package
> Several changes in print.survfit, plot.survfit and seemingly in the structure > of ratetabels effect some of my syntax files. > Is there somewhere a documentation of these changes, besides the code itself? I agree, the Changelog.09 file is not as comprehensive as one would like. Specific comments: 1. The ratetables were recently changed to accomodate a new option. I thought
2001 Nov 12
2
check() warnings for survival-2.6
I am not sure if this is the right place for that kind of questions, but I wondered that the recommended package survival did not pass R's check procedure without warnings: 1) unbalanced braces: * Rd files with unbalanced braces: * man/Surv.Rd * man/cluster.Rd * man/cox.zph.Rd * man/coxph.Rd * man/coxph.detail.Rd * man/date.ddmmmyy.Rd * man/lines.survfit.Rd *
2005 Jan 16
2
Empirical cumulative distribution with censored data
Dear list, I would like to plot the empirical cumulative distribution of the time needed by a treatment to attain a certain goal. A number of experiments is run with a strict time limit. In some experiments the goal is attained before the time limit, in other experiments time expires before the goal is attained. The situation is very similar to survivial analysis with censored data. I tryed
2008 Apr 09
2
How to estimate a hazard ratio using an external hazard function
Hi, I would like to compare the hazard functions of two samples using the Cox proportional hazards model. For sample 1 I have individual time-to- event data. For sample 2 I don't have individual data, but grouped data that allows to obtain a hazard function. I am wondering if there is an R function that allows to obtain a hazard ratio of the two hazard funtions (under the
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",
2009 Oct 29
1
correlated binary data and overall probability
Dear All, I try to simulate correlated binary data for a clinical research project. Unfortunately, I do not come to grips with bindata(). Consider corr<-data.frame(ID=as.factor(rep(c(1:10), each=5)), task=as.factor(rep(c(1:5),10))) [this format might be more appropriate:] corr2<-data.frame(ID=as.factor(rep(c(1:10),5)), tablet=as.factor(rep(c(1:5),each=10))) Now, I want to