diff --git a/articles/basic-intro.html b/articles/basic-intro.html index b43a2f4d..04b8db6b 100644 --- a/articles/basic-intro.html +++ b/articles/basic-intro.html @@ -391,8 +391,8 @@

Model diagnostics#> #> SAMPLING FOR MODEL 'tmb_generic' NOW (CHAIN 1). #> Chain 1: -#> Chain 1: Gradient evaluation took 0.01007 seconds -#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 100.7 seconds. +#> Chain 1: Gradient evaluation took 0.012596 seconds +#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 125.96 seconds. #> Chain 1: Adjust your expectations accordingly! #> Chain 1: #> Chain 1: @@ -417,9 +417,9 @@

Model diagnostics#> Chain 1: Iteration: 100 / 101 [ 99%] (Warmup) #> Chain 1: Iteration: 101 / 101 [100%] (Sampling) #> Chain 1: -#> Chain 1: Elapsed Time: 26.202 seconds (Warm-up) -#> Chain 1: 0.198 seconds (Sampling) -#> Chain 1: 26.4 seconds (Total) +#> Chain 1: Elapsed Time: 27.083 seconds (Warm-up) +#> Chain 1: 0.197 seconds (Sampling) +#> Chain 1: 27.28 seconds (Total) #> Chain 1: r <- residuals(m3, "mle-mcmc", mcmc_samples = samps) qqnorm(r) @@ -586,9 +586,6 @@

Time-varying effects#> 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(2006, 2008, 2010, 2012, 2014, 2016)` -#> Warning in sqrt(diag(cov)): NaNs produced -#> Warning: The model may not have converged: non-positive-definite Hessian -#> matrix. m4 #> Spatiotemporal model fit by ML ['sdmTMB'] #> Formula: density ~ 0 + as.factor(year) @@ -596,40 +593,6 @@

Time-varying effects#> Time column: year #> Data: pcod #> Family: tweedie(link = 'log') -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced -#> Warning in sqrt(diag(object$cov.fixed)): NaNs produced #> #> coef.est coef.se #> as.factor(year)2003 3.36 0.30 @@ -668,13 +631,13 @@

Time-varying effects#> Matérn range: 13.58 #> Spatial SD: 1.63 #> Spatiotemporal IID SD: 1.66 -#> ML criterion at convergence: 6251.146 +#> ML criterion at convergence: 6251.245 #> #> See ?tidy.sdmTMB to extract these values as a data frame. #> #> **Possible issues detected! Check output of sanity().** AIC(m4) -#> [1] 12534.29 +#> [1] 12534.49

To plot these, we make a data frame that contains all combinations of the time-varying covariate and time. This is easily created using expand.grid() or tidyr::expand_grid().

@@ -689,6 +652,7 @@

Time-varying effectsnd$depth_scaled2 <- nd$depth_scaled^2 p <- predict(m4, newdata = nd, se_fit = TRUE, re_form = NA) +#> Warning in sqrt(diag(cov)): NaNs produced ggplot(p, aes(depth_scaled, exp(est), ymin = exp(est - 1.96 * est_se), diff --git a/articles/basic-intro_files/figure-html/plot-cv-1.png b/articles/basic-intro_files/figure-html/plot-cv-1.png index 079e2421..2b406ea0 100644 Binary files a/articles/basic-intro_files/figure-html/plot-cv-1.png and b/articles/basic-intro_files/figure-html/plot-cv-1.png differ diff --git a/articles/basic-intro_files/figure-html/residuals-mcmc-1.png b/articles/basic-intro_files/figure-html/residuals-mcmc-1.png index 711a3d5c..08f559b0 100644 Binary files a/articles/basic-intro_files/figure-html/residuals-mcmc-1.png and b/articles/basic-intro_files/figure-html/residuals-mcmc-1.png differ diff --git a/articles/basic-intro_files/figure-html/tv-depth-eff-1.png b/articles/basic-intro_files/figure-html/tv-depth-eff-1.png index 5e7bbb8f..d8641ce0 100644 Binary files a/articles/basic-intro_files/figure-html/tv-depth-eff-1.png and b/articles/basic-intro_files/figure-html/tv-depth-eff-1.png differ diff --git a/articles/bayesian.html b/articles/bayesian.html index 4807d2c6..a5fe4454 100644 --- a/articles/bayesian.html +++ b/articles/bayesian.html @@ -381,7 +381,7 @@

Passing the model to tmbstan#> omega_s[85] -0.29 0.01 0.21 -0.68 -0.44 -0.30 -0.15 0.11 1111 1.00 #> lp__ 136.06 0.93 9.26 118.11 129.87 136.38 142.46 152.88 100 1.02 #> -#> Samples were drawn using NUTS(diag_e) at Mon Aug 26 18:29:22 2024. +#> Samples were drawn using NUTS(diag_e) at Mon Aug 26 19:27:16 2024. #> For each parameter, n_eff is a crude measure of effective sample size, #> and Rhat is the potential scale reduction factor on split chains (at #> convergence, Rhat=1). diff --git a/articles/bayesian_files/figure-html/unnamed-chunk-9-1.png b/articles/bayesian_files/figure-html/unnamed-chunk-9-1.png index df7f5e3c..34e13551 100644 Binary files a/articles/bayesian_files/figure-html/unnamed-chunk-9-1.png and b/articles/bayesian_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/articles/delta-models.html b/articles/delta-models.html index bd86a898..9f7ae662 100644 --- a/articles/delta-models.html +++ b/articles/delta-models.html @@ -113,7 +113,7 @@

2024-08-26

binomial(link = "logit")) and then a model for the positive catches only with a lognormal observation distribution and a log link (i.e., lognormal(link = "log")

-
  • Poisson-link delta-Gamma or delta-lognormal. See the Poisson-link +

  • Poisson-link delta-Gamma or delta-lognormal. See the Poisson-link delta model vignette.

  • Delta-truncated-negative-binomial: family = delta_truncated_nbinom1() or @@ -502,8 +502,8 @@

    #> #> Dispersion parameter: 0.94 #> Matérn range: 0.01 -#> Spatial SD: 727.39 -#> Spatiotemporal IID SD: 2065.20 +#> Spatial SD: 727.21 +#> Spatiotemporal IID SD: 2064.69 #> ML criterion at convergence: 5102.136 #> #> See ?tidy.sdmTMB to extract these values as a data frame. diff --git a/articles/delta-models_files/figure-html/cv-1.png b/articles/delta-models_files/figure-html/cv-1.png index fea4e82b..4c408704 100644 Binary files a/articles/delta-models_files/figure-html/cv-1.png and b/articles/delta-models_files/figure-html/cv-1.png differ diff --git a/articles/delta-models_files/figure-html/unnamed-chunk-19-1.png b/articles/delta-models_files/figure-html/unnamed-chunk-19-1.png index 4a32ea3d..a857d7ba 100644 Binary files a/articles/delta-models_files/figure-html/unnamed-chunk-19-1.png and b/articles/delta-models_files/figure-html/unnamed-chunk-19-1.png differ diff --git a/articles/delta-models_files/figure-html/unnamed-chunk-20-1.png b/articles/delta-models_files/figure-html/unnamed-chunk-20-1.png index da418331..34c29502 100644 Binary files a/articles/delta-models_files/figure-html/unnamed-chunk-20-1.png and b/articles/delta-models_files/figure-html/unnamed-chunk-20-1.png differ diff --git a/articles/residual-checking.html b/articles/residual-checking.html index 1a6ea99c..cccfab0f 100644 --- a/articles/residual-checking.html +++ b/articles/residual-checking.html @@ -214,8 +214,8 @@

    MCMC-based randomized-quantile #> #> SAMPLING FOR MODEL 'tmb_generic' NOW (CHAIN 1). #> Chain 1: -#> Chain 1: Gradient evaluation took 0.000981 seconds -#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 9.81 seconds. +#> Chain 1: Gradient evaluation took 0.000976 seconds +#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 9.76 seconds. #> Chain 1: Adjust your expectations accordingly! #> Chain 1: #> Chain 1: @@ -232,9 +232,9 @@

    MCMC-based randomized-quantile #> Chain 1: Iteration: 720 / 800 [ 90%] (Sampling) #> Chain 1: Iteration: 800 / 800 [100%] (Sampling) #> Chain 1: -#> Chain 1: Elapsed Time: 6.685 seconds (Warm-up) -#> Chain 1: 4.754 seconds (Sampling) -#> Chain 1: 11.439 seconds (Total) +#> Chain 1: Elapsed Time: 6.704 seconds (Warm-up) +#> Chain 1: 4.757 seconds (Sampling) +#> Chain 1: 11.461 seconds (Total) #> Chain 1: mcmc_res <- residuals(fit_nb2, type = "mle-mcmc", mcmc_samples = samps) qqnorm(mcmc_res) @@ -488,8 +488,8 @@

    The need for one-sample residuals#> #> SAMPLING FOR MODEL 'tmb_generic' NOW (CHAIN 1). #> Chain 1: -#> Chain 1: Gradient evaluation took 0.002089 seconds -#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 20.89 seconds. +#> Chain 1: Gradient evaluation took 0.002304 seconds +#> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 23.04 seconds. #> Chain 1: Adjust your expectations accordingly! #> Chain 1: #> Chain 1: @@ -506,9 +506,9 @@

    The need for one-sample residuals#> Chain 1: Iteration: 360 / 400 [ 90%] (Sampling) #> Chain 1: Iteration: 400 / 400 [100%] (Sampling) #> Chain 1: -#> Chain 1: Elapsed Time: 31.437 seconds (Warm-up) -#> Chain 1: 30.836 seconds (Sampling) -#> Chain 1: 62.273 seconds (Total) +#> Chain 1: Elapsed Time: 30.809 seconds (Warm-up) +#> Chain 1: 30.196 seconds (Sampling) +#> Chain 1: 61.005 seconds (Total) #> Chain 1: #> Warning: The largest R-hat is 1.08, indicating chains have not mixed. #> Running the chains for more iterations may help. See diff --git a/articles/spatial-trend-models_files/figure-html/unnamed-chunk-13-1.png b/articles/spatial-trend-models_files/figure-html/unnamed-chunk-13-1.png index 757e2e5f..70014cae 100644 Binary files a/articles/spatial-trend-models_files/figure-html/unnamed-chunk-13-1.png and b/articles/spatial-trend-models_files/figure-html/unnamed-chunk-13-1.png differ diff --git a/index.html b/index.html index 00eff280..6e2856c9 100644 --- a/index.html +++ b/index.html @@ -545,7 +545,7 @@

    Priors

    Bayesian MCMC sampling with Stan

    -

    The fitted model can be passed to the tmbstan package to sample from the posterior with Stan. See the Bayesian vignette.

    +

    The fitted model can be passed to the tmbstan package to sample from the posterior with Stan. See the Bayesian vignette.

    Turning off random fields diff --git a/news/index.html b/news/index.html index cb840390..20a8ca15 100644 --- a/news/index.html +++ b/news/index.html @@ -77,7 +77,7 @@

    sdmTMB 0.6.0

    sdmTMB 0.5.0

    CRAN release: 2024-04-03

    -