Displaying 20 results from an estimated 34 matches for "survexp".
Did you mean:
survex
2010 Dec 31
3
survexp - example produces error
...urvdiff. 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 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 versi...
2011 Apr 20
2
survexp with weights
...0.020590 1.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(pro...
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,...
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, da...
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 fo...
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] errors. Is
there something wrong in my use of cluster in generating the
proportion...
2009 Jan 19
1
further notes on model.frame issue
...ay. 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, 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 m...
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),
+ se...
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
2005 Sep 22
1
(survexp:) compute the expected remaining survival time
DeaR list
I would like to know if there is a direct method to compute the
expected remaining survival time for a subject having survived up to
time t. survexp gives me the probabilty for subject S to survive up to
day D
Thanks
--
Anne
2012 Oct 06
2
Expected number of events, Andersen-Gill model fit via coxph in package survival
...ted numbers of events for a new cohort; then, comparing the
expected vs. the observed numbers of events would give us some idea of
whether the new cohort differs from the reference one.
>From my reading of the documentation and the text by Therneau and
Grambsch, it seems that the function "survexp" is what I need. But
using it I am not able to obtain expected numbers of events that match
reasonably well the observed numbers *even for the same reference
population.* So, I think I am misunderstanding something quite badly.
Below is an example that illustrates the situation. At the end I...
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
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.
2008 Apr 09
2
How to estimate a hazard ratio using an external hazard function
...'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 proportionality
assumption) taking into account the censoring of the data?
I am aware of survexp and survdiff functions, but I am not sure if
that is the best way to do what I need.
Any help will be highly appreciated.
Montse Rue
Department of Basic Medical Sciences
University of Lleida (Spain)
2018 Apr 16
1
strange warning: data() error?
..."jasa1"
------- snip ----
data(bladder2)
# Warning message:
# In data(bladder2) : data set ?bladder2? not found
data(mgus1)
# Warning message:
# In data(mgus1) : data set ?mgus1? not found
> data(mgus1)
Warning message:
In data(mgus1) : data set ?mgus1? not found
> data("survexp.mn")
Warning message:
In data("survexp.mn") : data set ?survexp.mn? not found
Hypothesis: datasets in a ..library/data/Rdata.rds file whose listing does not match the name of the dataset from which it is derived will cause the behavior in question.
And Terry; After executing `d...
2001 Nov 12
2
check() warnings for survival-2.6
...man/coxph.Rd
* man/coxph.detail.Rd
* man/date.ddmmmyy.Rd
* man/lines.survfit.Rd
* man/plot.cox.zph.Rd
* man/predict.survreg.Rd
* man/pyears.Rd
* man/residuals.coxph.Rd
* man/stanford2.Rd
* man/strata.Rd
* man/summary.survfit.Rd
* 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" "[.ra...
2018 Apr 16
3
strange warning: data() error?
A user asked me about this and I can't figure it out.
tmt% R
R Under development (unstable) (2018-04-09 r74565) -- "Unsuffered Consequences"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
> library(survival)
> data(cgd0)
Warning message:
In data(cgd0) : data set ?cgd0? not found
----
The data set is present and can be
2014 Jul 05
1
Predictions from "coxph" or "cph" objects
Dear R users,
My apologies for the simple question, as I'm starting to learn the concepts
behind the Cox PH model. I was just experimenting with the survival and rms
packages for this.
I'm simply trying to obtain the expected survival time (as opposed to the
probability of survival at a given time t). I can't seem to find an option
from the "type" argument in the predict
2010 Oct 07
1
model.frame deficiency
...at)
temp1 <- paste( paste(tname, tname, sep='='), 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_COLL...
2010 Apr 16
1
R CMD check tells me 'no visible binding for globalvariable'
...publishing a package on CRAN is that it have to pass R CMD check with
no errors, warnings *or* notes. So, in that sense notes are no
different from warnings.
---------------------------------
Getting rid of these notes would be very hard in the survival package.
The population survival routines (survexp, pyears) that have to deal
with dates try to be very accommodating wrt the date format the user
chose, so have constructions like
if (user date looks like a chron object) {
calculation using chron functions
}
else if (is from the date package) {
use mdy.date }
els...