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

Add time-varying AR1 correlation parameter to print and tidy output #374

Open
seananderson opened this issue Sep 27, 2024 · 0 comments
Open

Comments

@seananderson
Copy link
Member

Currently requires something like this:

library(sdmTMB)
fit <- sdmTMB(
  density ~ 1,
  time = "year", 
  time_varying = ~ 1,
  time_varying_type = "ar1",
  data = pcod_2011, spatial = "off", 
  spatiotemporal = "off",
  family = tweedie(link = "log")
)
p <- get_pars(fit)
rho <- 2 * plogis(p$rho_time_unscaled) - 1
rho
#>            [,1]
#> [1,] -0.8137769

Created on 2024-09-26 with reprex v2.1.1

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