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

Pred_spec_auto and character values #68

Open
DustinMLong opened this issue Oct 8, 2024 · 0 comments
Open

Pred_spec_auto and character values #68

DustinMLong opened this issue Oct 8, 2024 · 0 comments

Comments

@DustinMLong
Copy link

See below.

library(aorsf)

fit = orsf(pbc_orsf, time + status ~ . - id)

orsf_pd_oob(fit, pred_spec = pred_spec_auto(age))
#>    pred_horizon      age      mean        lwr      medn       upr
#> 1:         1788 35.66324 0.2702930 0.01283832 0.1639040 0.8902918
#> 2:         1788 41.51266 0.2811068 0.01250296 0.1799548 0.8988816
#> 3:         1788 49.70979 0.3068783 0.01287180 0.2048165 0.9127864
#> 4:         1788 56.58453 0.3361083 0.01693452 0.2480658 0.9267214
#> 5:         1788 62.88433 0.3667286 0.02749217 0.2945945 0.9229582

orsf_pd_oob(fit, pred_spec = pred_spec_auto("age"))
#>    pred_horizon      age      mean        lwr      medn       upr
#> 1:         1788 35.66324 0.2702930 0.01283832 0.1639040 0.8902918
#> 2:         1788 41.51266 0.2811068 0.01250296 0.1799548 0.8988816
#> 3:         1788 49.70979 0.3068783 0.01287180 0.2048165 0.9127864
#> 4:         1788 56.58453 0.3361083 0.01693452 0.2480658 0.9267214
#> 5:         1788 62.88433 0.3667286 0.02749217 0.2945945 0.9229582

bob = "age"

orsf_pd_oob(fit, pred_spec = pred_spec_auto(bob))
#> Error: variables in pred_spec were not found in data: bob

Created on 2024-10-08 with reprex v2.1.0

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