Displaying 20 results from an estimated 10000 matches similar to: "Changes in the survival package (long)"
2009 Jan 07
0
Frailty by strata interactions in coxph (or coxme)?
Hello,
I was hoping that someone could answer a few questions for me (the background is given below):
1) Can the coxph accept an interaction between a covariate and a frailty term
2) If so, is it possible to
a) test the model in which the covariate and the frailty appear as main terms using the penalized likelihood (for gaussian/t frailties)
b)augment model 1) by stratifying on the variable that
2019 Oct 04
0
Error in [.terms
Martin,
? There are a couple of issues with [.terms that have bitten my survival code.? At the
useR conference I promised you a detailed (readable) explanation, and have been lax in
getting it to you. The error was first pointed out in a bugzilla note from 2016, by the
way.? The current survival code works around these.
Consider the following formula:
<<testform>>=
2020 Feb 24
0
specials issue, a heads up
On 24/02/2020 8:55 a.m., Therneau, Terry M., Ph.D. via R-devel wrote:
> I recently had a long argument wrt the survival package, namely that the following code
> didn't do what they expected, and so they reported it as a bug
>
> ? survival::coxph( survival::Surv(time, status) ~ age + sex + survival::strata(inst),
> data=lung)
>
> a. The Google R style guide? recommends
2024 Sep 15
1
Possible update to survival
I got good feedback from the list about a scope issue, so I am coming back for more.
Prior issue: users who type survival::coxph(survival::Surv(time, status) ~ x1 + x2 + surv ival::strata(group), data=mydata)
This messes up the character string matching for strata, done via tt <- terms(formula, specials= ?strata?). The code runs, and gives the wrong answer (group is treated as an ordinary
2007 Mar 14
0
Wald test and frailty models in coxph
Dear R members,
I am new in using frailty models in survival analyses and am getting
some contrasting results when I compare the Wald and likelihood ratio
tests provided by the r output.
I am testing the survivorship of different sunflower interspecific
crosses using cytoplasm (Cyt), Pollen and the interaction Cyt*Pollen
as fixed effects, and sub-block as a random effect. I stratified
2020 Feb 24
1
specials issue, a heads up
In the long run, coming up with a way to parse specials in formulas
that is both clean and robust is a good idea - annoying users are a
little bit like CRAN maintainers in this respect. I think I would
probably do this by testing identical(eval(extracted_head),
survival::Surv) - but this has lots of potential annoyances (what if
extracted_head is a symbol that can't be found in any attached
2013 Nov 04
0
Fwd: Re: How to obtain nonparametric baseline hazard estimates in the gamma frailty model?
-------- Original Message --------
Subject: Re: How to obtain nonparametric baseline hazard estimates in the gamma frailty model?
Date: Mon, 04 Nov 2013 17:27:04 -0600
From: Terry Therneau <therneau.terry at mayo.edu>
To: Y <yuhanusa at gmail.com>
The cumulative hazard is just -log(sfit$surv).
The hazard is essentially a density estimate, and that is much harder. You'll notice
2005 Jan 06
0
Parametric Survival Models with Left Truncation, survreg
Hi,
I would like to fit parametric survival models to time-to-event data
that are left truncated. I have checked the help page for survreg and
looked in the R-help archive, and it appears that the R function survreg
from the survival library (version 2.16) should allow me to take account
of left truncation. However, when I try the command
2012 Oct 14
1
Problems with coxph and survfit in a stratified model, with interactions
First, here is your message as it appears on R-help.
On 10/14/2012 05:00 AM, r-help-request@r-project.org wrote:
> I?m trying to set up proportional hazard model that is stratified with
> respect to covariate 1 and has an interaction between covariate 1 and
> another variable, covariate 2. Both variables are categorical. In the
> following, I try to illustrate the two problems that
2011 Jul 10
1
Package "survival" --- Difference of coxph strata with subset?
[code]>require("survival")
> coxph(Surv(futime,fustat)~age + strata(rx),ovarian)
Call:
coxph(formula = Surv(futime, fustat) ~ age + strata(rx), data = ovarian)
coef exp(coef) se(coef) z p
age 0.137 1.15 0.0474 2.9 0.0038
Likelihood ratio test=12.7 on 1 df, p=0.000368 n= 26, number of events= 12
> coxph(Surv(futime,fustat)~age, ovarian, subset=rx==1)
2005 Oct 06
1
Testing strata by covariate interactions in coxph
Dear list members,
I am working with a Cox ph model for the duration of unemployment. The event of
interest
in my analysis is getting employed. I have various background variables
explaining this
event: age, sex, education etc. I have multiple unemployment spells per person.
I use a model with person-specific frailty terms in order to take into account
the correlation of spells by the same
2009 Feb 23
1
predicting cumulative hazard for coxph using predict
Hi
I am estimating the following coxph function with stratification and frailty?where each person had multiple events.
m<-coxph(Surv(dtime1,status1)~gender+cage+uplf+strata(enum)+frailty(id),xmodel)
?
> head(xmodel)
id enum dtime status gender cage uplf
1 1008666 1 2259.1412037 1 MA 0.000 0
2 1008666 2 36.7495023 1 MA 2259.141 0
3 1008666
2005 Sep 07
1
Survival analysis with COXPH
Dear all,
I would have some questions on the coxph function for survival analysis,
which I use with frailty terms.
My model is:
mdcox<-coxph(Surv(time,censor)~ gender + age + frailty(area, dist='gauss'),
data)
I have a very large proportion of censored observations.
- If I understand correctly, the function mdcox$frail will return the random
effect estimated for each group on the
2005 Jul 18
1
Survival dummy variables and some questions
Hi All,
I am currently conducting some survival analyses. I would like to
extract coefficients at each level of the IVs.
I read on a previous posting that dummy regression using coxph was not
possible.
Therefore I though, hey why not categorize the variables
(I realize some folks object to categorization but the paper I am
replicating appears to have done so ...)
and turn the variables
2004 Nov 17
1
frailty and time-dependent covariate
Hello,
I'm trying to estimate a cox model with a frailty variable and time-dependent covariate (below there is the statement I use and the error message). It's seems to be impossible, because every time I add the time-dependent covariate the model doesn't converge. Instead, if I estimate the same model without the time-dependent covariate it's converge. I'd like knowing if
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
*
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 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 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 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",