Displaying 3 results from an estimated 3 matches for "statusvar".
Did you mean:
statusbar
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 <- ovarian$futime
status.cox <- ovarian$fustat
apply(ovarian[,-(1:2)],2, f.coxph.zph, timeVar = time.cox, statusV...
2018 May 22
2
Nelson-Aalen Estimator in R: Error Message
...ing the multiple imputation right now. I want to perform a survival analysis later, but therefore I need to specify the Nelson-Aalen estimator. My dataset is called DF1, the event indicator is Falls and the time variable is Time. The code that I use is as follows:
NAE <- nelsonaalen(data = DF1, statusvar = Falls, timevar = Time)
However, I get this error: Error in Surv(time, status) : Time variable is not numeric
If I do the following:
class(DF1$Time) [1] "numeric"
It shows that my variable is numeric. Can you help me with how I can solve this issue?
Thank you in advance.
Lisa
[[...
2018 May 22
0
Nelson-Aalen Estimator in R: Error Message
...ltiple imputation right now. I want to perform a survival analysis later, but therefore I need to specify the Nelson-Aalen estimator. My dataset is called DF1, the event indicator is Falls and the time variable is Time. The code that I use is as follows:
>
> NAE <- nelsonaalen(data = DF1, statusvar = Falls, timevar = Time)
>
> However, I get this error: Error in Surv(time, status) : Time variable is not numeric
>
> If I do the following:
>
> class(DF1$Time) [1] "numeric"
>
> It shows that my variable is numeric. Can you help me with how I can solve this i...