Displaying 20 results from an estimated 6000 matches similar to: "numerics from a factor"
2012 Nov 17
4
survfit & number of variables != number of variable names
This works ok:
> cox = coxph(surv ~ bucket*(today + accor + both) + activity, data = data)
> fit = survfit(cox, newdata=data[1:100,])
but using strata leads to problems:
> cox.s = coxph(surv ~ bucket*(today + accor + both) + strata(activity),
> data = data)
> fit.s = survfit(cox.s, newdata=data[1:100,])
Error in model.frame.default(data = data[1:100, ], formula = ~bucket + :
2011 Feb 17
2
Rd2pdf error in R12.0
On the local machine the command R11 CMD Rd2pdf survfit.Rd works fine.
R12 CMD Rd2pdf survfit.Rd fails with the message below.
Converting Rd files to LaTeX ...
survfit.Rd
Creating pdf output from LaTeX ...
Error in texi2dvi("Rd2.tex", pdf = (out_ext == "pdf"), quiet =
FALSE, :
Running 'texi2dvi' on 'Rd2.tex' failed.
Messages:
sh: texi2dvi: command not
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
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 Feb 03
3
coxph fails to survfit
I have a model with quant vars only and the error message does not make sense:
(mod1 <- coxph(Surv(time=strt,time2=stp,event=(resp==1))~ +incpost+I(amt/1e5)+rate+strata(termfac),
subset=dt<"2010-08-30", data=inc,method="efron"))
Call:
coxph(formula = Surv(time = strt, time2 = stp, event = (resp ==
1)) ~ +incpost + I(amt/1e+05) + rate + strata(termfac),
2019 Sep 06
2
install_github and survival
I cloned therneau/survival and the installation failed since there is no definition for exported function survfit().
A file seems to be missing - there is survfit0() and survfit0.R but, compared to CRAN, no survfit.R.
Georgi Boshnakov
----------------------------------------------------------------------
Message: 1
Date: Thu, 05 Sep 2019 12:53:11 -0500
From: "Therneau, Terry M.,
2018 Oct 08
2
bug with OutDec option and deferred_string altrep object
While implementing R's new 'altrep' functionality in the TERR engine,
I discovered a bug in R's 'deferred_string' altrep object: it is not
using the correct value of the 'OutDec' option when it expands a
deferred_string. See the following example:
R 3.5.1: (same results in R 3.6.0 devel engine built 10/5)
> options(scipen=0, OutDec=".")
>
2007 Nov 13
2
plotting coxph results using survfit() function
i want to make survival plots for a coxph object using survfit
function. mod.phm is an object of coxph class which calculated results
using columns X and Y from the DataFrame. Both X and Y are
categorical. I want survival plots which shows a single line for each
of the categories of X i.e. '4' and 'C'. I am getting the following
error:
> attach(DataFrame)
>
2016 Mar 16
2
match and unique
Is the phrase "index <- match(x, sort(unique(x)))" reliable, in the sense that it will
never return NA?
Context: Calculation of survival curves involves the concept of unique death times. I've
had reported cases in the past where survfit failed, and it was due to the fact that two
"differ by machine precision" values would sometimes match and sometimes not,
2019 Jun 01
4
survival changes
In the next version of the survival package I intend to make a non-upwardly compatable
change to the survfit object.? With over 600 dependent packages this is not something to
take lightly, and I am currently undecided about the best way to go about it.? I'm looking
for advice.
The change: 20+ years ago I had decided not to include the initial x=0,y=1 data point in
the survfit object
2009 May 15
1
Function Surv and interpretation
Dear everyone,
My question involves the use of the survival object.
We can have
Surv(time,time2,event, type=, origin = 0) (1)
As detailed on p.65 of:
http://cran.r-project.org/web/packages/survival/survival.pdf
My data (used in my study) is 'right censored' i.e. my variable corresponding to 'event' indicates whether a person is alive (0) or dead (1) at date last seen
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
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 <-
2009 May 22
1
survfit, summary, and survmean (was Changelog for survival package)
> Further I appreciate your new function survmean(). At the moment it
> seems to be intended as internal, and not documented in the help.
The computations done by print.survfit are now a part of the results returned by
summary.survfit. See 'table' in the output list of ?summary.survfit. Both
call an internal survmean() function to ensure that any future updates stay in
2019 Jun 01
3
survival changes
> On Jun 1, 2019, at 12:59 PM, Peter Langfelder <peter.langfelder at gmail.com> wrote:
>
> On Sat, Jun 1, 2019 at 3:22 AM Therneau, Terry M., Ph.D. via R-devel
> <r-devel at r-project.org> wrote:
>>
>> In the next version of the survival package I intend to make a non-upwardly compatable
>> change to the survfit object. With over 600 dependent packages
2013 Jan 31
1
obtainl survival curves for single strata
Dear useRs,
What is the syntax to obtain survival curves for single strata on many subjects?
I have a model based on Surv(time,response) object, so there is a single row per subject and no start,stop and no switching of strata.
The newdata has many subjects and each subject has a strata and the survival based on the subject risk and the subject strata is needed.
If I do
newpred <-
2012 Oct 08
1
Survival prediction
> Dear All,
>
> I have built a survival cox-model, which includes a covariate * time interaction. (non-proportionality detected)
> I am now wondering how could I most easily get survival predictions from my model.
>
> My model was specified:
> coxph(formula = Surv(event_time_mod, event_indicator_mod) ~ Sex +
> ageC + HHcat_alt + Main_Branch + Acute_seizure +
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)
2009 Oct 13
2
time grid for "survfit" Survival function outputs
Dear All,
Maybe it is a silly question. But I wasn't able to find it from manual
or R site search.
I was wondering what is the corresponding time axis for survival
function outputs in "survfit". I think it is "survfit(.......)$time",
but not 100% sure.
If it is, is it possible we could make survival function outputs on
the pre-specified time grid with fixed increment and
2010 Jul 21
1
Table vs unique
A bug in the survival routines was reported to me today. The root cause
is a difference between table, unique, and sort.
> temp <- rep(c(1, sqrt(2)^2, 2), 1:3)
> unique(temp)
[1] 1 2 2
> table(temp)
temp
1 2
1 5
I'm using 2.10 on Linux, the user reported from 2.9 on Windows.
1. Minor issue: I think the root rounding occurs in factor. I didn't
see any discussion of