Message-ID: <34F597BB2569C54894EB3330F6D3234A743784@EXCH-HE01.erasmusmc.nl>
Date: 2018-05-22T13:29:50Z
From: A.C. van der Burgh
Subject: Nelson-Aalen Estimator in R: Error Message
Dear all,
Currently, I am doing a research project about serum sodium levels and falling. I am doing my analysis in R. I am performing 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
[[alternative HTML version deleted]]