flexsurv-dev
flexsurv-dev copied to clipboard
adding time-dependent covariate in flexsurvspline
Hi, thanks for giving us great package to use.
I'm trying to fitting model with time-dependent covariate using flexsurvspline function
flexsurvspline(Surv(start_t, end_t, status) ~ cov1,
data = data, k = 1)
but it gives me an error message saying,
Error in optim(method = "BFGS", par = c(gamma0 = 2.25366952832903, gamma1 = 0.605209668922837, :
initial value in 'vmmin' is not finite`
The code run well if I use the Surv object not in counting process form, which means
flexsurvspline(Surv(obs_time, status) ~ cov1,
data = data, k = 1)
I'm wondering whether this error occurs because flexsurvspline function cannot be used for fitting model with time-dependent covariate or occurs because of the optimization problem.
The test data file is attached here test_data.csv
Thank you in advance.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| learn-draftjs | ❌ Failed (Inspect) | Oct 6, 2022 at 1:21AM (UTC) |