Displaying 20 results from an estimated 10000 matches similar to: "How do I specify a partially completed survival analysis model"
2009 Nov 19
1
How do I specify a partially completed survival analysis model?
Hello,
I just started using R to do epidemiologic simulation research using the Cox
proportional hazard model. I have 2 covariates X1 and X2 which I want to
model as h(t,X)=h0(t)*exp(b1*X1+b2*X2). I assume independence of X from t.
After I simulate Time and Censor data vectors denoting the censoring time
and status respectively, I can call the following function to fit the data
into the Cox
2011 Jul 25
1
error in survival analysis
This is a simple R program that I have been trying to run. I keep running into the "singular matrix" error. I end up with no sensible results. Can anyone suggest any changes or a way around this?
I am a total rookie when working with R.
Thanks,
Rasika
> library(survival)
Loading required package: splines
> args(coxph)
function (formula, data, weights, subset, na.action, init,
2010 Sep 08
4
coxph and ordinal variables?
Dear R-help members,
Apologies - I am posting on behalf of a colleague, who is a little puzzled
as STATA and R seem to be yielding different survival estimates for the same
dataset when treating a variable as ordinal. Ordered() is used to represent
an ordinal variable) I understand that R's coxph (by default) uses the Efron
approximation, whereas STATA uses (by default) the Breslow. but we
2011 Jul 22
3
Cox model approximaions (was "comparing SAS and R survival....)
For time scale that are truly discrete Cox proposed the "exact partial
likelihood". I call that the "exact" method and SAS calls it the
"discrete" method. What we compute is precisely the same, however they
use a clever algorithm which is faster. To make things even more
confusing, Prentice introduced an "exact marginal likelihood" which is
not
2003 Jun 16
0
new package: eha
A few days ago I uploaded to CRAN a new package called 'eha', which
stands for 'Event History Analysis'. Its main focus is on proportional
hazards modeling in survival analysis, and in that respect eha can
be regarded as a complement and an extension to the 'survival'
package. In fact eha requires survival. Eha contains three functions
for proportional hazards
2003 Jun 16
0
new package: eha
A few days ago I uploaded to CRAN a new package called 'eha', which
stands for 'Event History Analysis'. Its main focus is on proportional
hazards modeling in survival analysis, and in that respect eha can
be regarded as a complement and an extension to the 'survival'
package. In fact eha requires survival. Eha contains three functions
for proportional hazards
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
2009 Jun 24
1
Coxph frailty model counting process error X matrix deemed singular
Hello,
I am currently trying to simulate data and analyze it using the frailty option in the coxph function. I am working with recurrent event data, using counting process notation. Occasionally, (about 1 in every 100 simulations) I get the following warning:
Error in coxph(Surv(start, end, censorind) ~ binary + uniform + frailty(subject, :
X matrix deemed to be singular; variable 2
My
2004 Nov 10
0
RE: [S] worked in R, but not in S-Plus
The following works, you need to include x=TRUE in the call to coxph.
Passing the time and status variables as additional arguments is a matter of
personal preference.
f.coxph.zph<-function(x, timeVar, statusVar)
{
cox.fit <- coxph(Surv(timeVar, statusVar) ~ x, na.action =
na.exclude, method = "breslow", x=TRUE)
fit.zph<-cox.zph(cox.fit)
fit.zph$table[,3]
}
time.cox <-
2005 Mar 30
1
Cox model qustion in R
Dear all,
I have a beginner's R question for coxph() and survfit().
I have a data set with survival time (no censoring) and treatment indicator(0/1). I did something like
fit<-coxph( Surv(t)~treat, method="breslow",data=data)
> fit
Call:
coxph(formula = Surv(t) ~ treat, data = data, method = "breslow")
coef exp(coef) se(coef) z p
treat -1.96
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",
2008 Apr 29
0
Looking for Post-hoc tests (a la TukeyHSD) or interaction-level independent contrasts for survival analysis.
Hello all R-helpers,
I've performed an experiment to test for differential effects of
elevated temperatures on three different groups of corals. I'm
currently performing a cox proportional hazards regression with
censoring on the survivorship (days to mortality) of each individual
in the experiment with two factors: Temperature Treatment (2 levels:
ambient and elevated) and
2009 Jul 13
0
adjusting survival using coxph
I have what I *think* should be a simple problem in R, and hope
someone might be able to help me.
I'm working with cancer survival data, and would like to calculate
adjusted survival figures based on the age of the patient and the
tumour classification. A friendly statistician told me I should use
Cox proportional hazards to do this, and I've made some progress with
using the
2011 Dec 19
1
Calculating the probability of an event at time "t" from a Cox model fit
Dear R-users,
I would like to determine the probability of event at specific time using
cox model fit. On the development sample data I am able to get the
probability of a event at time point(t).
I need probability score of a event at specific time, using scoring scoring
dataset which will have only covariates and not the response variables.
Here is the sample code:
n = 1000
beta1 = 2; beta2 =
2011 Jun 24
1
UnoC function in survAUC for censoring-adjusted C-index
Hello,
I am having some trouble with the 'censoring-adjusted C-index' by Uno et al, in the package survAUC. The relevant function is UnoC.
The question has to do with what happens when I specify a time point t for the upper limit of the time range under consideration (we want to avoid using the right-end tail of the KM curve).
Copying from the example in the help file:
TR <-
2009 Sep 26
1
Multiple comparisons for coxph survival analysis model
Hello, all R-users!
I am working on fitting a survival analysis model using the coxph
function for Cox proportional hazards regression model. Data look like
usual:
==========================
group block death censor
Group1 1 4 1
Group1 1 12 1
...
Group2 30 4 1
Group2 30 4 1
...
Group3 57 16
2004 Nov 10
1
worked in R, but not in S-Plus
Hi,
I wrote a function that worked well in R, but not in
S-Plus, can anyone suggest a solution?
> f.coxph.zph<-function(x)
{
cox.fit <- coxph(Surv(time.cox, status.cox) ~ x,
na.action = na.exclude, method = "breslow")
fit.zph<-cox.zph(cox.fit,transform='log')
fit.zph$table[,3]
}
yyy is my data frame that contains survial time,
censor status and predictor
2005 Jun 22
1
A question on time-dependent covariates in the Cox model.
I have a dataset with
event=death
time (from medical examination until death/censoring)
dose (given at examination time)
Two groups are considered, a non-exposed group (dose=0), an exposed group
(dose between 5 and 60).
For some reason there is a theory of the dose increasing its effect over
time (however it was only given (and measured) once = at the time of
examination).
I tested a model:
2009 Aug 10
0
survival:: plotting survfit with two predictors
Hi R-Helpers,
I am having difficulty plotting a coxph model with two predictors. My
predictors are "morder" (a factor with five levels where the mean of
each level is plotted as a separate line) and tmean (continuous). When
I run a model with just morder it is fine and the plot is fine. When I
add tmean, the coxph model runs fine but this model will not plot and I
receive an