search for: ratet

Displaying 20 results from an estimated 30 matches for "ratet".

Did you mean: rate
2010 Dec 31
3
survexp - example produces error
...g 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 on ## US mortality tables expect <- survexp(futime ~ ratetable(age=(accept.dt - birth.dt), sex=1,year=accept.dt,race="white"), jasa, cohort=FALSE, ratetable=survexp.usr) Error in floor(temp) : Non-numeric argument to mathematical function sessionInfo('survival') R version 2.12.1 Patch...
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...
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
2011 Apr 20
2
survexp with weights
...021 0.00805 2.55666 0.0110 platelet -0.001699 0.998 0.00085 -2.00130 0.0450 Likelihood ratio test=164 on 5 df, p=0 n= 308, number of events= 143 (110 observations deleted due to missingness) > > plot(survfit(Surv(time, status>0) ~ trt, data=pbc)) > lines(survexp( ~ trt, ratetable=pfit, data=pbc), col='purple') > > pfit.wtd <- coxph(Surv(time,status>0) ~ trt + log(bili) + log(protime) + age + + + platelet, weights=albumin, data=pbc + ) > > pfit.wtd Call: coxph(formula = Surv(time, status > 0) ~ trt + log(bili) + log(protime) + ag...
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(proti...
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]), max(R[, 3])))) : couldn't find function "as.date" I got the same errors from the following platforms: R-1.0.0, survival5_1.1-1 on AIX, R...
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 survival, it worked well. best regards, Heinz library(survival) Loading required package: splines > ## Example from help page of survdiff &gt...
1999 Jul 10
1
who submitted ratetables to CRAN?
Hi, the ratetables package on CRAN contains no author/maintainer information whatsoever and I cannot remember who submitted it ... is the creator out there on this list? The DESCRIPTION file is missing (otherwise I wouldn't have problems with finding the author) ... Fritz -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-....
2009 Jan 19
1
further notes on model.frame issue
...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, data=mydata, ratetable=survexp.us, ratevar=list(sex=gender, year=enroll.dt, age=age*365.25)) The model statement says that I want separate curves by gender, and is similar to other model statements. The ratevar option gives the mapping between my variable names and the dimnames of the survexp.us rate table....
2008 Sep 10
2
relsurv package
Dear R-users, I have a couple of questions about the relsurv package: 1) when I try to run the example: fit <- rsmul(Surv(time,cens)~sex+as.factor(agegr)+ratetable(age=age*365.24,sex=sex,year=year),ratetable=slopop,data=rdata) with the datasets in the package (rdata and slopop) it gives me an error: Error in nrow(x) : object "x" not found 2) If I have a date format like:"6/17/1997 " "9/10/1990 " "12/4/1996 " how...
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...
2010 Nov 11
3
Evaluation puzzle
...ed 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, model=FALSE, x=FALSE, y=FALSE) { call <- match.call() m <- match.call(expand.dots=FALSE) # keep the first element (the call), and the following selected arguments m <- m[c(1, match(c('formula', 'data'...
2001 Nov 12
2
check() warnings for survival-2.6
...man/survdiff.Rd * man/survexp.Rd * man/survfit.Rd * man/survreg.control.Rd * man/survsum.Rd * man/untangle.specials.Rd 2) missing docs: * checking for undocumented objects ... WARNING [1] "[.Surv" "[.coxph.penalty" [3] "[.ratetable" "[.ratetable2" [5] "[.survfit" "[.tcut" [7] "[.terms" "anova.survreg" [9] "anova.survreglist" "as.character.Surv" [11] &quot...
2012 Feb 24
1
package relsurv
...ticular I've tried to reproduce the examples proposed in the R-documentation about rsadd, rsmul and rstrans functions in R latest version (R 2.14.1). These examples don't run and the error message is always the following: data(slopop) data(rdata) rsadd(Surv(time,cens)~sex+as.factor(agegr)+ratetable(age=age*365,sex=sex,year=year),ratetable=slopop,data=rdata,int=5) Errore in .Call("pyears3b", as.integer(death), as.integer(rfac), as.integer(atts$dim), : C symbol name "pyears3b" not in DLL for package "survival" However I've tried to reproduce the same ex...
2012 Nov 30
1
Baffled with as.matrix
I'm puzzled by as.matrix. It appears to work differently for Surv objects. Here is a session from my computer: tmt% R --vanilla > library(survival) Loading required package: splines > ytest <- Surv(1:3, c(1,0,1)) > is.matrix(ytest) >[1] TRUE > attr(ytest, 'type') [1] "right" > attr(as.matrix(ytest), 'type') [1] "right" >
2012 Apr 30
0
need help with avg.surv (Direct Adjusted Survival Curve), Message-ID:
...labels=c("40-55", "55-70", "70-90")) fit1 <- coxph(Surv(time, death) ~ age.grp + stage + I(year >=74), larynx) #fit a Cox model km <- survfit(Surv(time, death) ~ stage, data=larynx) # KM plot(km) direct <- survexp( ~stage, data=larynx, ratetable=fit1) # "direct adjusted" survival lines(direct, col=2) --- A few further comments 1. It would help those of us who advise if you would simplify your code. I didn't need to see 20+ lines of data set manipulation and curve drawing. Give the essence of the problem. 2....
2010 Nov 03
1
model.frame problem
A few weeks ago I reported a problem with model.frame, whose root lay in a formula expression "....+ ratetable(x1=x1, x2=x2, ....x100=x100)" that was really long and caused model.frame to fail. Brian had some indefinite ideas on what might need to change in the base code to handle it. In survival_2.36-1 the bit of code that generated the offending expression has been changed (mostly for other r...
2002 Oct 10
0
help ! calculating relative mortality using survival5
...dataset for an impaired group containing survival time (x), and an right-censoring indicator (ind), from which I can get the estimated survival function S_impar(t), using something like fit<-survfit(Surv(x,ind)~1). And from some statistics literature, I gather I can get what I want using "ratetable", "survexp" and "offset". But I've poured through the help files, but I still have some questions ... specifically, I have a table of probabilities of death on each day for each age for the general population. How do I convert that into a table that ratetable can...
2010 Oct 07
1
model.frame deficiency
...;), collapse=', ') temp2 <- paste("~1 + cbind(", temp1, ")") model.frame(as.formula(temp2), tdata) This came out of a user report to me. Coxph with a very long formula (which does work) followed by a call to survexp leads to a call like the above but using my "ratetable" function instead of "cbind". My machine's details: R version 2.10.0 (2009-10-26) x86_64-unknown-linux-gnu locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C [5] LC_MONETARY=C LC_M...
2012 Apr 29
0
need help with avg.surv (Direct Adjusted Survival Curve)
...y(fit2) fit3<-coxph(Surv(time, death) ~ stage.fac + age.larynx + year.larynx), data=larynx, method=c("efron")) summary(fit3) fit4<-coxph(Surv(time,death)~factor(stage)+factor(age>=74)+factor(year>=74),data=larynx,method=c("efron")) summary(fit4)  lines(survexp(~stage+ratetable(stage,age.larynx,year>=74),data=larynx,ratetable=fit2,cohort=TRUE),col="purple")  fits<-avg.surv(fit3, var.name="stage.fac", var.values=c(1,2,3,4), data=larynx) matlines(fits$time,fits$fits) [[alternative HTML version deleted]]