Displaying 5 results from an estimated 5 matches for "survdata".
2010 May 26
2
Survival analysis extrapolation
...0
Treatment B 84 0
Treatment A 84 0
Treatment A 84 0
etc etc
Where time is in days and goes up to 360, 0 represents a withdrawal and 1
represents a failure. The code I've tried is as follows:
survdata<-read.csv("Data.csv")
WeiModel<-survreg(Surv(survdata$Time,survdata$Status)~survdata$Treatment)
summary(WeiModel)
n<-seq(0, 1080, 30 )
##Compute Weibull CDF
A<-pweibull(n, scale=exp(WeiModel$coef[1]), shape=1/WeiModel$scale)
B<-pweibull(n,
scale=exp(WeiModel$coef[1]+...
2010 Sep 21
2
Survival curve mean adjusted for covariate: NEED TO DO IN NEXT 2 HOURS, PLEASE HELP
Hi
I am trying to determine the mean of a Weibull function that has been fit to
a data set, adjusted for a categorical covariate , gender (0=male,1=female).
Here is my code:
library(survival)
survdata<-read.csv("data.csv")
##Fit Weibull model to data
WeiModel<-survreg(Surv(survdata$Time,survdata$Status)~survdata$gender)
summary(WeiModel)
P<-pweibull(n, scale=exp(WeiModel$coef[1]), shape=1/WeiModel$scale)
##Return mean
scale<-exp(WeiModel$coef[1])
shape<-1/Wei...
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
2013 Apr 24
2
Trouble Computing Type III SS in a Cox Regression
...ject.org wrote:
> Hello All,
>
> Am having some trouble computing Type III SS in a Cox Regression using either drop1 or Anova from the car package. Am hoping that people will take a look to see if they can tell what's going on.
>
> Here is my R code:
>
> cox3grp<- subset(survData,
> Treatment %in% c("DC", "DA", "DO"),
> c("PTNO", "Treatment", "PFS_CENSORED", "PFS_MONTHS", "AGE", "PS2"))
> cox3grp<- droplevels(cox3grp)
> str(cox3grp)
>
> coxCV<- coxph(Surv(PFS_MO...
2013 Apr 24
1
Trouble Computing Type III SS in a Cox Regression using drop1 and Anova
Hello All,
Am having some trouble computing Type III SS in a Cox Regression using either drop1 or Anova from the car package. Am hoping that people will take a look to see if they can tell what's going on.
Here is my R code:
cox3grp <- subset(survData,
Treatment %in% c("DC", "DA", "DO"),
c("PTNO", "Treatment", "PFS_CENSORED", "PFS_MONTHS", "AGE", "PS2"))
cox3grp <- droplevels(cox3grp)
str(cox3grp)
coxCV <- coxph(Surv(PFS_MONTHS, PFS_CENSORED == 1) ~...