Skip to content

AR(1) Time-varying Parameters #307

Answered by seananderson
Nathan-Hebert asked this question in Q&A
Discussion options

You must be logged in to vote

See rho_time_unscaled. Sorry this is a bit obscure to obtain still!

library(sdmTMB)
fit <- sdmTMB(
  catch_weight ~ 1,
  data = dogfish,
  spatial = "off",
  time = "year",
  spatiotemporal = "off",
  time_varying = ~ 1,
  time_varying_type = "ar1",
  family = tweedie(link = "log")
)
#> Detected irregular time spacing with an AR(1) or random walk process.
#> Consider filling in the missing time slices with `extra_time`.
#> `extra_time = c(2005, 2007, 2009, 2011, 2013, 2015, 2017, 2019, 2020)`

fit$sd_report
#> sdreport(.) result
#>                     Estimate Std. Error
#> b_j                4.3622661 0.38181529
#> thetaf             1.3042638 0.04396550
#> ln_phi             2.3763279 0…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Nathan-Hebert
Comment options

Answer selected by Nathan-Hebert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants