Displaying 12 results from an estimated 12 matches for "survtime".
2012 May 11
2
survival analysis simulation question
...nt error distributions
2. Have the error term be dependent on the covariates
But I'm not sure how to specify either conditions. I am using the Design
package to perform the survival analysis using the survreg, bj, coxph
functions. Any help is greatly appreciated.
This is what I have so far:
survtime <- 10*rexp(500) #distribution of survival time
cens <- ifelse(survtime > 10, 0, 1) #indicator for censored/observed
survtime <- pmin(survtime, 10) #new survival time values with censored
info
age <- rnorm(200, 40, 10) #age variable
race <- factor(sample(c('a','b...
2007 Apr 26
3
adding a column to a matrix
i would like to add a variable to an existing matrix by manipulating 2 previous variables eg for the data
m
treat strata censti survTime
[1,] 1 2 284.684074 690.4961005
[2,] 1 1 172.764515 32.3990335
[3,] 1 1 2393.195400 24.6145279
[4,] 2 1 30.364771 8.0272267
[5,] 1 1 523.182282 554.7659501
l would want to add a new column censoring by comparing ( i...
2007 May 07
4
creating a new column
hie l would like to create a 6th column "actual surv time" from the following data
the condition being
if censoringTime>survivaltime then actual survtime =survival time
else actual survtime =censoring time
the code l used to create the data is
s=2
while(s!=0){ n=20
m<-matrix(nrow=n,ncol=4)
colnames(m)=c("treatmentgrp","strata","censoringTime","survivalTime")...
2007 Feb 21
2
Coxph and ordered factors
Dear useRs,
I am trying to fit a Cox PH model on survival data from a lung cancer
dataset. I would like to include the patient staging (I-IV) as a
covariate. For this I use the following function:
coxph(Surv(time,status) ~ stage)
The staging information is a categorical variable, and it is important
to take the ordering into account (I<II<III<IV). Does the coxph function
handle
2020 Sep 29
5
2 KM curves on the same plot
Hello,
Can anyone suggest a simple way to generate a Kaplan-Meier plot with 2 survfit objects, just like this one:?
https://drive.google.com/file/d/1fEcpdIdE2xYtA6LBQN9ck3JkL6-goabX/view?usp=sharing
Suppose I have 2 survfit objects: fit1 is for the curve on the left (survtime has been truncated to the cutoff line: year 5), fit2 is for the curve on the right (minimum survival time is at the cutoff line: year 5), but if I do the following:
plot(fit1, col=1:2)
lines(fit2,col=1:2)
Then I will have an horizontal line on the top that connect from 0 to 4 years, which I do no...
2010 Nov 24
2
Is there an equivalent to predict(..., type="linear") of a Proportional hazard model for a Cox model instead?
Hi all,
Is there an equivalent to predict(...,type="linear") of a Proportional hazard
model for a Cox model instead?
For example, the Figure 13.12 in MASS (p384) is produced by:
(aids.ps <- survreg(Surv(survtime + 0.9, status) ~ state + T.categ +
pspline(age, df=6), data = Aidsp))
zz <- predict(aids.ps, data.frame(state = factor(rep("NSW", 83), levels =
levels(Aidsp$state)),
T.categ = factor(rep("hs", 83), levels = levels(Aidsp$T.categ)), age =
0:82), se = T, type = "lin...
2007 Apr 25
0
Use of Lexis function to convert survival data to counting format
I'm trying to convert a dataset from the time-independent analysis form
> head(addicts)
id clinic status survtime prison meth clinic01
1 1 1 1 428 0 50 1
2 2 1 1 275 1 55 1
3 3 1 1 262 0 55 1
into the "counting data format" necessary to perform extended Cox regression.
I got survSplit() to work, but it appears...
2003 Mar 12
1
simulating 'non-standard' survival data
...)
ind<-which(R==j)
dati[i,]<-c(obsTime[j],status[j],x[j])
filtro<-R!=j
R<-R[filtro]
Pok<-Pok[,filtro]
}
dati[nrow(dati),]<-c(obsTime[nrow(dati)],status[nrow(dati)],x[nrow(dati)])
dati<-data.frame(dati)
names(dati)<-c("SurvTime","cens","x")
library(survival)
coxph(Surv(SurvTime,cens)~x,dati)
2010 Dec 05
0
Help with time varying covariate-unfold function
...ovariates and FAILCENS = 2 indicates
observed times. So, when I tried to use,
igg2.long<-unfold(igg.2[3,],time="FAILTIME",event="FAILCENS",cov=9:13,cov.na
mes="iggtitre"), I obtained the following output:
start stop FAILCENS.time CASE TRT FAILTIME FAILCENS SURVTIME SURVCENS
SEX
3.1 0 1 0 26003 A 11.2033 1 17.5441 1
1
3.2 1 2 0 26003 A 11.2033 1 17.5441 1
1
3.3 2 3 0 26003 A 11.2033 1 17.5441 1
1
3.4 3 4 0 26003 A 11.2033...
2011 Jul 21
0
Survdiff for multiple comparisons
Hello all-
I am doing a survival analysis for two species of invasive plants I
outplanted to edges and interiors of island and mainland sites in a local
reservoir. I am using the KM estimate and had no problem doing survdiff for
my data using the following code:
S4<-Surv(outplant$SurvTime, outplant$StatusD6)
diff4=survdiff(S4 ~ outplant$Species+outplant$SiteType+outplant$EdgInt)
diff4
Species = ALBIJU or LONIJA
SiteType = Island or Mainland
EdgInt = Edge or Interior
The overall test for difference among the 8 curves is highly significant
(p<0.001), but what I would like to know...
2020 Sep 30
0
2 KM curves on the same plot
...ate a Kaplan-Meier plot with 2 survfit objects, just like this one:
> > > >
> > > > https://drive.google.com/file/d/1fEcpdIdE2xYtA6LBQN9ck3JkL6-goabX/view?usp=sharing
> > > >
> > > > Suppose I have 2 survfit objects: fit1 is for the curve on the left (survtime has been truncated to the cutoff line: year 5), fit2 is for the curve on the right (minimum survival time is at the cutoff line: year 5), but if I do the following:
> > > >
> > > > plot(fit1, col=1:2)
> > > > lines(fit2,col=1:2)
> > > >
> > >...
2004 Nov 02
3
time dependency of Cox regression
Hi,
How can I specify a Cox proportional hazards model
with a covariate which i believe its strength on
survival changes/diminishes with time? The value of
the covariate was only recorded once at the beginning
of the study for each individual (e.g. at the
diagnosis of the disease), so I do not have the time
course data of the covariate for any given individual.
For example, I want to state at the