Displaying 20 results from an estimated 10000 matches similar to: "How to deal with package conflicts"
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.
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
2018 May 01
4
issue with model.frame()
A user sent me an example where coxph fails, and the root of the failure is a case where
names(mf) is not equal to the term.labels attribute of the formula -- the latter has an
extraneous newline. Here is an example that does not use the survival library.
# first create a data set with many long names
n <- 30? # number of rows for the dummy data set
vname <- vector("character",
2008 Jul 02
1
Tobit Estimation with Panel Data
Hi all!
Do you know if there is any R function/package that can be used to
estimate "tobit" models with panel data (e.g. with random individual
effects)?
In economics, a "tobit" model is a model with a dependent variable that is
left-censored at zero. Hence, it is a special case of a survival model and
can be estimated using the "survival" package (see e.g.
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.
2011 Jun 25
2
cluster() or frailty() in coxph
Dear List,
Can anyone please explain the difference between cluster() and
frailty() in a coxph? I am a bit puzzled about it. Would appreciate
any useful reference or direction.
cheers,
Ehsan
> marginal.model <- coxph(Surv(time, status) ~ rx + cluster(litter), rats)
> frailty.model <- coxph(Surv(time, status) ~ rx + frailty(litter), rats)
> marginal.model
Call:
coxph(formula =
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
2012 Dec 03
1
fitting a gamma frailty model (coxph)
Dear all,
I have a data set<http://yaap.it/paste/c11b9fdcfd68d02b#gIVtLrrme3MaiQd9hHy1zcTjRq7VsVQ8eAZ2fol1lUc=>with
6 clusters, each containing 48 (possibly censored, in which case
"event = 0") survival times. The "x" column contains a binary explanatory
variable. I try to describe that data with a gamma frailty model as follows:
library(survival)
mod <-
2003 Aug 04
1
coxph and frailty
Hi:
I have a few clarification questions about the elements returned by
the coxph function used in conjuction with a frailty term.
I create the following group variable:
group <- NULL
group[id<50] <- 1
group[id>=50 & id<100] <- 2
group[id>=100 & id<150] <- 3
group[id>=150 & id<200] <- 4
group[id>=200 & id<250] <- 5
group[id>=250
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 Aug 15
1
estimating the proportion without recurring ailment based on the nelson-aalen estimator
Dear useRs,
I'm trying to estimate the proportion of individuals with a without a certain recurring ailment at several times points. The data are of the survival type, with "start"-"stop" dates and whether the individual had the ailment in that interval.
Some cases are observed until database closure and some died or are lost to followup. The interest is not on death. I
2012 Feb 03
1
coxme with frailty--variance of random effect?
Dear all,
This probably stems from my lack of understanding of the model, but I
do not understand the variance of the random effect reported in coxme.
Consider the following toy example:
#------------------------------- BEGINNING OF CODE
------------------------------------------------
library(survival)
library(coxme)
#--- Generate toy data:
d <- data.frame(id = c(1:100), #
2007 Apr 17
3
Extracting approximate Wald test (Chisq) from coxph(..frailty)
Dear List,
How do I extract the approximate Wald test for the
frailty (in the following example 17.89 value)?
What about the P-values, other Chisq, DF, se(coef) and
se2? How can they be extracted?
######################################################>
kfitm1
Call:
coxph(formula = Surv(time, status) ~ age + sex +
disease + frailty(id,
dist = "gauss"), data = kidney)
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
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
2010 Apr 26
1
Interpreting output of coxph with frailty.gamma
Dear all,
this is probably a very silly question, but could anyone tell me what the
different parameters in a coxph model with a frailty.gamma term mean?
Specifically I have two questions:
(1) Compared to a "normal" coxph model, it seems that I obtain two standard
errors [se(coef) and se2].
What is the difference between those?
(2) Again compared to a "normal" coxph model,
2002 Oct 08
2
Frailty and coxph
Does someone know the rules by which 'coxph' returns 'frail', the
predicted frailty terms? In my test function:
-----------------------------------------------
fr <- function(){
#testing(frailty terms in 'survival'
require(survival)
dat <- data.frame(exit = 1:6,
event = rep(1, 6),
x = rep(c(0, 1), 3),
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
2008 Jan 16
1
exact method in coxph
I'm trying to estimate a cox proportional hazards regression for repeated
events (in gap time) with time varying covariates. The dataset consists of
just around 6000 observations (lines) (110 events).
The (stylized) data look as follows:
unit dur0 dur1 eventn event ongoing x
1 0 1 0 0 0 32.23
1 1 2 0 1 1 35.34
1
2004 Nov 08
1
coxph models with frailty
Dear R users:
I'm generating the following survival data:
set.seed(123)
n=200 #sample size
x=rbinom(n,size=1,prob=.5) #binomial treatment
v=rgamma(n,shape=1,scale=1) #gamma frailty
w=rweibull(n,shape=1,scale=1) #Weibull deviates
b=-log(2) #treatment's slope
t=exp( -x*b -log(v) + log(w) ) #failure times
c=rep(1,n) #uncensored indicator
id=seq(1:n) #individual frailty indicator