View source: R/diagnostics_generic.R
| temporal_corr | R Documentation |
Returns posterior summary for temporal hyperparameters (tau, rho for AR1, sigma/lengthscale for temporal GP).
temporal_corr(object, probs = c(0.025, 0.975))
object |
A |
probs |
Quantile probabilities (default 0.025, 0.975). |
A data.frame with rows for each temporal hyperparameter.
set.seed(127)
df <- data.frame(year = rep(1:20, each = 3), x = rnorm(60))
f <- as.numeric(arima.sim(list(ar = 0.7), 20, sd = 0.4))
df$count <- rpois(60, exp(1 + 0.3 * df$x + f[df$year]))
fit <- tulpa(count ~ x, data = df, family = "poisson",
temporal = temporal_ar1("year"))
temporal_corr(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.