Skip to content

Error with person-period data #38

@sepaul1124

Description

@sepaul1124

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions