-
Notifications
You must be signed in to change notification settings - Fork 11
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
CI types: simultaneous confidence bands #116
Comments
.. not sure how to pull this through the delta method, though. |
Could be obtained via the package Example: library(survival)
library(pammtools)
#>
#> Attaching package: 'pammtools'
#> The following object is masked from 'package:stats':
#>
#> filter
library(gratia)
as_ped(Surv(time, status) ~ temperature + voltage, data = capacitor) |>
pamm(formula = ped_status ~ s(tend, bs="ad", k = 20)+temperature+voltage) |>
derivatives(interval = "simultaneous")
#> # A tibble: 200 x 8
#> smooth var data derivative se crit lower upper
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 s(tend) tend 216 0.0823 0.0324 3.20 -0.0213 0.186
#> 2 s(tend) tend 220. 0.0774 0.0281 3.20 -0.0125 0.167
#> 3 s(tend) tend 225. 0.0724 0.0247 3.20 -0.00657 0.151
#> 4 s(tend) tend 229. 0.0672 0.0220 3.20 -0.00325 0.138
#> 5 s(tend) tend 234. 0.0618 0.0200 3.20 -0.00213 0.126
#> 6 s(tend) tend 238. 0.0562 0.0184 3.20 -0.00265 0.115
#> 7 s(tend) tend 243. 0.0505 0.0171 3.20 -0.00422 0.105
#> 8 s(tend) tend 247. 0.0445 0.0159 3.20 -0.00623 0.0953
#> 9 s(tend) tend 252. 0.0384 0.0146 3.20 -0.00825 0.0852
#> 10 s(tend) tend 256. 0.0322 0.0132 3.20 -0.0100 0.0744
#> # ... with 190 more rows |
@StaffanBetner That would be for the derivative of the specified smooth though, not the smooth itself or a derived quantity like the hazard ratio etc. I'm in the process of exposing the simulation-based approach to simultaneous intervals for smooths (it's there via |
... instead of the pointwise intervals we do now.
Would probably make more sense for at least some of the functional estimates we return like hazard (ratios), survival functions etc.
Implementation could be based on code here:
https://www.fromthebottomoftheheap.net/2016/12/15/simultaneous-interval-revisited/
The text was updated successfully, but these errors were encountered: