Displaying 20 results from an estimated 10000 matches similar to: "ridge() function and coxph"
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.
2013 Nov 14
1
issues with calling predict.coxph.penal (survival) inside a function
Thanks for the reproducable example. I can confirm that it fails on my machine using
survival 2-37.5, the next soon-to-be-released version,
The issue is with NextMethod, and my assumption that the called routine inherited
everything from the parent, including the environment chain. A simple test this AM showed
me that the assumption is false. It might have been true for Splus. Working this
2010 Nov 11
2
predict.coxph and predict.survreg
Dear all,
I'm struggling with predicting "expected time until death" for a coxph and
survreg model.
I have two datasets. Dataset 1 includes a certain number of people for which
I know a vector of covariates (age, gender, etc.) and their event times
(i.e., I know whether they have died and when if death occurred prior to the
end of the observation period). Dataset 2 includes another
2008 Jun 16
1
回复: cch() and coxph() for case-cohort
I tried to compare if cch() and coxph() can generate same result for
same case cohort data
Use the standard data in cch(): nwtco
Since in cch contains the cohort size=4028, while ccoh.data size =1154
after selection, but coxph does not contain info of cohort size=4028.
The rough estimate between coxph() and cch() is same, but the lower
and upper CI and P-value are a little different. Can we
2010 Dec 02
0
survival - summary and score test for ridge coxph()
It seems to me that summary for ridge coxph() prints summary but returns NULL. It is not a big issue because one can calculate statistics directly from a coxph.object. However, for some reason the score test is not calculated for ridge coxph(), i.e score nor rscore components are not included in the coxph object when ridge is specified. Please find the code below. I use 2.9.2 R with 2.35-4 version
2007 Apr 20
1
Approaches of Frailty estimation: coxme vs coxph(...frailty(id, dist='gauss'))
Dear List,
In documents (Therneau, 2003 : On mixed-effect cox
models, ...), as far as I came to know, coxme penalize
the partial likelihood (Ripatti, Palmgren, 2000) where
as frailtyPenal (in frailtypack package) uses the
penalized the full likelihood approach (Rondeau et al,
2003).
How, then, coxme and coxph(...frailty(id,
dist='gauss')) differs? Just the coding algorithm, or
in
2011 Apr 27
0
treatment of factors and errors in ridge() function with coxph
I am trying to fit a large Cox model with many predictors. Because
there are many predictors, I would like to use the ridge() function to
get penalized ml estimates for all coefficients. The problems are that:
1. When I include a factor (like race) in the ridge() function, dummy
variables are not created. The resulting model has a single
coefficient for the race variable, and I have
2011 Mar 14
1
coxph and drop1
A recent question in r-help made me realize that I should add a drop1 method
for coxph and survreg. The default does not handle strata() or cluster()
properly.
However, for coxph the right options for the "test" argument would be
likelihood-ratio, score, and Wald; not chisq and F. All of them reference
a chi-square distribution. My thought is use these arguments, and add an
2013 Feb 12
0
error message from predict.coxph
In one particular situation predict.coxph gives an error message. Namely: stratified data, predict='expected', new data, se=TRUE. I think I found the error but I'll leave that to you to decide.
Thanks,
Chris
######## CODE
library(survival)
set.seed(20121221)
nn <- 10 # sample size in each group
lambda0 <- 0.1 # event rate in group 0
lambda1 <- 0.2 # event rate in group 1
2009 Aug 01
2
Cox ridge regression
Hello,
I have questions regarding penalized Cox regression using survival
package (functions coxph() and ridge()). I am using R 2.8.0 on Ubuntu
Linux and survival package version 2.35-4.
Question 1. Consider the following example from help(ridge):
> fit1 <- coxph(Surv(futime, fustat) ~ rx + ridge(age, ecog.ps, theta=1), ovarian)
As I understand, this builds a model in which `rx' is
2012 Aug 09
1
basehaz() in package survival and warnings with coxph
I've never seen this, and have no idea how to reproduce it.
For resloution you are going to have to give me a working example of the
failure.
Also, per the posting guide, what is your sessionInfo()?
Terry Therneau
On 08/09/2012 04:11 AM, r-help-request at r-project.org wrote:
> I have a couple of questions with regards to fitting a coxph model to a data
> set in R:
>
> I have a
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
2002 Jul 18
1
survfit on coxph object with weights
Hi,
I am working on a study where we need to predict individual survival
curves from a cox-model fit with sampling weights. In both R and Splus
the survfit.coxph code starts with
if(!is.null((object$call)$weights))
stop("Survfit cannot (yet) compute the result for a weighted model")
My question is does anyone have code to get the expected survival curve,
or even just the base
2008 Jun 16
0
cch() and coxph() for case-cohort
--------- begin included message ---------
I tried to compare if cch() and coxph() can generate same result for
same case cohort data
Use the standard data in cch(): nwtco
Since in cch contains the cohort size=4028, while ccoh.data size =1154
after selection, but coxph does not contain info of cohort size=4028.
The rough estimate between coxph() and cch() is same, but the lower
and upper CI
2010 Dec 07
0
coxph failure
Larry,
You found a data set that kills coxph. I'll have to think about what
to do since on the one hand it's your own fault for trying to fit a very
bad model, and on the other I'd like the routine to give a nice error
message before it dies.
In the data set you sent me the predictor variable is very skewed:
> quantile(anomaly1$CREAT, c(0, .5, .9, .999, 1))
0% 50%
2010 Dec 09
1
survival: ridge log-likelihood workaround
Dear all,
I need to calculate likelihood ratio test for ridge regression. In February I have reported a bug where coxph returns unpenalized log-likelihood for final beta estimates for ridge coxph regression. In high-dimensional settings ridge regression models usually fail for lower values of lambda. As the result of it, in such settings the ridge regressions have higher values of lambda (e.g.
2006 Dec 22
0
newbie estimating survival curve w/ survfit for coxph
fit <- coxph(Surv(futime,fustat)~ age +strata(rx), data=ovarian,
subset=1:23)
curves <- survfit(fit, newdata=ovarian[24:26,])
I don't think this is mentioned in the documentation (I'll have to fix that!),
but subscripting works for survfit objects. In this case there are 2 strata
and 3 subjects, and
curves[1,2] will return the survival curve for strata 1,
2018 May 01
1
[EXTERNAL] Re: issue with model.frame()
Great catch. I'm very reluctant to use my own model.frame, since that locks me into
tracking all the base R changes, potentially breaking survival in a bad way if I miss one.
But, this shows me clearly what the issue is and will allow me to think about it.
Another solution for the user is to use multiple ridge() calls to break it up; since
he/she was using a fixed tuning parameter the
2007 Oct 09
0
coxph models for insects
Justin,
You have an interesting problem, and a serious (reliable) consultation would
take more time than I have to give at the moment. Which is to say that you
should take these comments with a grain of salt.
First, I don't think that you have censored data. You have 2 subdistribution
functions F1(t) and F2(t), F1(t) + F2(t) = F(t) = the "time to endpoint"
distribution.
2009 May 11
0
Comparing COXPH models, one with age as a continuous variable
The "anova" process is only statistically valid for nested models, i.e., where
one includes the other as a proper subset. A model with continuous age and one
with discrete age are not nested; your p-value will be meaningless.
Terry Therneau