Displaying 20 results from an estimated 4000 matches similar to: "how to plot hazard function for coxph model?"
2012 Oct 13
4
Problems with coxph and survfit in a stratified model with interactions
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 I?ve encountered, using
the lung dataset.
The first problem is the warning:
To me, it seems that there are too many dummies
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
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 Apr 06
1
help on pspline in coxph
Hi there,
I have a question on how to extract the linear term in the penalized
spline in coxph. Here is a sample code:
n=100
set.seed(1)
x=runif(100)
f1 = cos(2*pi*x)
hazard = exp(f1)
T = 0
for (i in 1:100) {
T[i] = rexp(1,hazard[i])
}
C = runif(n)*4
cen = T<=C
y = T*(cen) + C*(1-cen)
data.tr=cbind(y,cen,x)
fit=coxph(Surv(data.tr[,1],
2010 Feb 16
1
survival - ratio likelihood for ridge coxph()
It seems to me that R returns the unpenalized log-likelihood for the ratio likelihood test when ridge regression Cox proportional model is implemented. Is this as expected?
In the example below, if I am not mistaken, fit$loglik[2] is unpenalized log-likelihood for the final estimates of coefficients. I would expect to get the penalized log-likelihood. I would like to check if this is as expected.
2005 Sep 13
1
coxph.detail() does not work
Hello everyone,
I tried to use coxph.detail() to get the hazard function. But a warning
messge always returns to me, even in the example provided by its help
document:
> ?coxph.detail
> fit <- coxph(Surv(futime,fustat) ~ age + rx + ecog.ps, ovarian, x=TRUE)
> fitd <- coxph.detail(fit)
Warning message:
data length [37] is not a sub-multiple or multiple of the number of
rows
2005 Nov 27
1
the output of coxph
Dear All:
I have some questions about the output of coxph.
Below is the input and output:
----------------------------------------
> coxph(formula = Surv(futime, fustat) ~ age + rx + ecog.ps, data =
+ ovarian, x = TRUE)
Call:
coxph(formula = Surv(futime, fustat) ~ age + rx + ecog.ps, data =
ovarian, x = TRUE)
coef exp(coef) se(coef) z p
age 0.147 1.158
2011 Oct 05
0
How to get the hazard of coxph (not cumulative hazard)
Dear all,
I think the coxph and survfit.coxph can give the cumulative hazard of cox
model.
But is there any method to calculate the hazard
Lambda(t)=lambda_0(t)*exp{beta*X(t)}?
Any suggestion will be great help.
Thank you very much!
Koshihaku
--
View this message in context: http://r.789695.n4.nabble.com/How-to-get-the-hazard-of-coxph-not-cumulative-hazard-tp3873516p3873516.html
Sent from the R
2012 Jul 06
1
How to compute hazard function using coxph.object
My question is, how to compute hazard function(H(t)) after building the
coxph model. I even aware of the terminology that differs from hazard
function(H(t)) and the hazard rate(h(t)). Here onward I wish to calculate
both.
Here what I have done in two different methods;
##########################################################################################
2011 Jun 16
0
coxph: cumulative mortality hazard over time with associated confidence intervals
Dear R-users,
I computed a simple coxph model and plotted survival over time with
associated confidence intervals for 2 covariate levels (males and
females).
M1 <- coxph(survobject~sex, data=surv)
M1
survsex <- survfit(survobject~sex,data=surv)
summary(survsex)
plot(survsex, conf.int=T, col=c("black","red"), lty = c(1,2),
lwd=c(1,2), xlab="Time",
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
2001 Feb 22
3
[newbie] Cox Baseline Hazard
Hello everybody.
First of all, I would like to present myself.
I'm a french student in public health and I like statistics though I'm
not that good in mathematics (but I try to catch up). I've discovered R
recently while trying to find a statistical program in order to avoid
rebooting my computer under windows when I need to do some statistical
work.
And here is my first question.
2012 Jun 05
1
model.frame and predvars
I was looking at how the model.frame method for lm works and comparing
it to my own for coxph.
The big difference is that I try to retain xlevels and predvars
information for a new model frame, and lm does not.
I use a call to model.frame in predict.coxph, which is why I went that
route, but never noted the difference till now (preparing for my course
in Nashville).
Could someone shed light
2008 Apr 21
2
Trend test for survival data
Hello,
is there a R package that provides a log rank trend test
for survival data in >=3 treatment groups?
Or are there any comparable trend tests for survival data in R?
Thanks a lot
Markus
--
Dipl. Inf. Markus Kreuz
Universitaet Leipzig
Institut fuer medizinische Informatik, Statistik und Epidemiologie (IMISE)
Haertelstr. 16-18
D-04107 Leipzig
Tel. +49 341 97 16 276
Fax. +49 341 97 16
2012 May 02
1
coxph reference hazard rate
Hi,
In the following results I interpret exp(coef) as the factor that multiplies
the base hazard rate if the corresponding variable is TRUE. For example,
when the bucket is ks008 and fidelity <= 3, then the rate, compared to the
base rate h_0(t), is h(t) = 0.200 h_0(t). My question is then, to what case
does the base hazard rate correspond to? I would expect the reference to be
the first
2012 Feb 20
1
Reporting Kaplan-Meier / Cox-Proportional Hazard Standard Error, km.coxph.plot, survfit.object
What is the best way to report the standard error when publishing
Kaplan-Meier plots? In my field (Vascular Surgery), practitioners
loosely refer to the "10% error" cutoff as the point at which to stop
drawing the KM curve. I am interpreting this as the *standard error
of the cumulative hazard*, although I'm having a difficult time
finding some guidelines about this (perhaps I am
2013 Jan 17
3
coxph with smooth survival
Hello users,
I would like to obtain a survival curve from a Cox model that is smooth and does not have zero differences due to no events for those particular days.
I have:
> sum((diff(surv))==0)
[1] 18
So you can see 18 days where the survival curve did not drop due to no events.
Is there a way to ask survfit to fit a nice spline for the survival??
Note: I tried survreg and it did not
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
2010 Nov 12
3
predict.coxph
Since I read the list in digest form (and was out ill yesterday) I'm
late to the discussion.
There are 3 steps for predicting survival, using a Cox model:
1. Fit the data
fit <- coxph(Surv(time, status) ~ age + ph.ecog, data=lung)
The biggest question to answer here is what covariates you wish to base
the prediction on. There is the usual tradeoff between too few (leave
out something
2020 Mar 06
1
[PATCH] virtio_ring: Fix mem leak with vring_new_virtqueue()
On 2/25/20 9:13 PM, Jason Wang wrote:
>
> On 2020/2/26 ??12:51, Suman Anna wrote:
>> Hi Jason,
>>
>> On 2/24/20 11:39 PM, Jason Wang wrote:
>>> On 2020/2/25 ??5:26, Suman Anna wrote:
>>>> The functions vring_new_virtqueue() and __vring_new_virtqueue() are
>>>> used
>>>> with split rings, and any allocations within these