Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with person-period data #38

Open
sepaul1124 opened this issue Apr 14, 2022 · 0 comments
Open

Error with person-period data #38

sepaul1124 opened this issue Apr 14, 2022 · 0 comments

Comments

@sepaul1124
Copy link

forestmodel v 0.6.2

Model:

mod <- coxph(Surv(tstart, exit_init, event_init) ~ DM1 + race_recode + ethnicity_recode + par_educ_high_gmc:tstart + par_income_grouped + paralc_recode + case_ctrl + par_separ12 + par_separ13up + CENTER + birth_cohort + mdd + sad + pd + agor + si + adhd_inatt + adhd_hyper12 + adhd_hyper13_15 + adhd_hyper16up + odd + cd12 + cd13_15 + cd16up + cig13 + cig14_15 + cig16up + mj12 + mj13up + frailty(FAM_ID), data = person_period)

Using forest_model

forest_model(coxph2b)

Error:
Error in [.default(data[, 1], , "time") : subscript out of bounds

When I run the model without the person-period format, the function generates a plot. However, I need to use the person_period plot to incorporate time-varying covariates.

Are there any solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant