Skip to content

Commit

Permalink
re-build vignettes and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjclark committed Sep 3, 2024
1 parent f6e879c commit 726154e
Show file tree
Hide file tree
Showing 128 changed files with 1,421 additions and 942 deletions.
74 changes: 36 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,29 +234,29 @@ summary(lynx_mvgam)
#>
#>
#> GAM coefficient (beta) estimates:
#> 2.5% 50% 97.5% Rhat n_eff
#> (Intercept) 6.4000 6.60 6.900 1 718
#> s(season).1 -0.6500 -0.13 0.420 1 987
#> s(season).2 0.7600 1.30 1.900 1 865
#> s(season).3 1.3000 1.90 2.600 1 816
#> s(season).4 -0.0360 0.53 1.100 1 909
#> s(season).5 -1.4000 -0.69 -0.096 1 759
#> s(season).6 -1.3000 -0.56 0.150 1 869
#> s(season).7 0.0092 0.71 1.400 1 970
#> s(season).8 0.6100 1.40 2.000 1 802
#> s(season).9 -0.3500 0.21 0.840 1 897
#> s(season).10 -1.4000 -0.86 -0.370 1 1366
#> 2.5% 50% 97.5% Rhat n_eff
#> (Intercept) 6.400 6.60 6.900 1.00 961
#> s(season).1 -0.650 -0.14 0.380 1.00 984
#> s(season).2 0.730 1.30 1.900 1.00 1113
#> s(season).3 1.300 1.90 2.500 1.00 727
#> s(season).4 -0.054 0.53 1.100 1.00 727
#> s(season).5 -1.300 -0.70 -0.069 1.00 919
#> s(season).6 -1.200 -0.55 0.170 1.00 1012
#> s(season).7 0.012 0.73 1.400 1.00 1134
#> s(season).8 0.600 1.40 2.100 1.01 756
#> s(season).9 -0.410 0.22 0.810 1.00 710
#> s(season).10 -1.400 -0.87 -0.350 1.00 1164
#>
#> Approximate significance of GAM smooths:
#> edf Ref.df Chi.sq p-value
#> s(season) 9.96 10 49.6 <2e-16 ***
#> s(season) 9.95 10 53.4 <2e-16 ***
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Latent trend parameter AR estimates:
#> 2.5% 50% 97.5% Rhat n_eff
#> ar1[1] 0.57 0.83 0.98 1.01 659
#> sigma[1] 0.38 0.48 0.60 1.01 745
#> ar1[1] 0.59 0.83 0.99 1.00 519
#> sigma[1] 0.38 0.48 0.60 1.01 485
#>
#> Stan MCMC diagnostics:
#> n_eff / iter looks reasonable for all parameters
Expand All @@ -265,7 +265,7 @@ summary(lynx_mvgam)
#> 0 of 2000 iterations saturated the maximum tree depth of 12 (0%)
#> E-FMI indicated no pathological behavior
#>
#> Samples were drawn using NUTS(diag_e) at Thu Jul 25 3:12:50 PM 2024.
#> Samples were drawn using NUTS(diag_e) at Tue Sep 03 1:56:36 PM 2024.
#> For each parameter, n_eff is a crude measure of effective sample size,
#> and Rhat is the potential scale reduction factor on split MCMC chains
#> (at convergence, Rhat = 1)
Expand Down Expand Up @@ -370,14 +370,12 @@ partial effects of smooths on the link scale
``` r
require(gratia)
#> Loading required package: gratia
#> Warning: package 'gratia' was built under R version 4.2.3
#>
#> Attaching package: 'gratia'
#> The following object is masked from 'package:mvgam':
#>
#> add_residuals
#> The following object is masked from 'package:brms':
#>
#> posterior_samples
draw(lynx_mvgam)
```

Expand Down Expand Up @@ -405,7 +403,7 @@ series (testing and training)
``` r
plot(lynx_mvgam, type = 'forecast', newdata = lynx_test)
#> Out of sample DRPS:
#> 2380.85453525
#> 2356.32008125
```

<img src="man/figures/README-unnamed-chunk-21-1.png" alt="Plotting forecast distributions using mvgam in R" width="60%" style="display: block; margin: auto;" />
Expand Down Expand Up @@ -535,41 +533,41 @@ summary(mod, include_betas = FALSE)
#>
#> Observation precision parameter estimates:
#> 2.5% 50% 97.5% Rhat n_eff
#> phi[1] 5.4 8.3 12 1 1248
#> phi[2] 5.7 8.6 13 1 1312
#> phi[3] 5.6 8.5 12 1 1724
#> phi[1] 5.4 8.3 12 1 2019
#> phi[2] 5.7 8.7 13 1 1795
#> phi[3] 5.5 8.4 12 1 1680
#>
#> GAM coefficient (beta) estimates:
#> 2.5% 50% 97.5% Rhat n_eff
#> (Intercept) -0.2 0.19 0.46 1.01 566
#> 2.5% 50% 97.5% Rhat n_eff
#> (Intercept) -0.18 0.19 0.45 1.01 757
#>
#> Approximate significance of GAM smooths:
#> edf Ref.df Chi.sq p-value
#> s(season) 3.872 5 29.63 1.6e-05 ***
#> s(season):seriesseries_1 0.615 4 0.77 0.98
#> s(season):seriesseries_2 1.012 4 0.30 0.99
#> s(season):seriesseries_3 1.106 4 1.54 0.81
#> s(season) 4.231 5 28.89 2.6e-06 ***
#> s(season):seriesseries_1 0.687 4 0.69 0.98
#> s(season):seriesseries_2 0.664 4 0.60 0.99
#> s(season):seriesseries_3 1.286 4 1.39 0.82
#> ---
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#>
#> Latent trend marginal deviation (alpha) and length scale (rho) estimates:
#> 2.5% 50% 97.5% Rhat n_eff
#> alpha_gp[1] 0.051 0.41 0.92 1.01 525
#> alpha_gp[2] 0.360 0.72 1.20 1.00 946
#> alpha_gp[3] 0.150 0.46 1.00 1.00 659
#> rho_gp[1] 1.100 3.80 15.00 1.01 370
#> rho_gp[2] 1.900 7.80 37.00 1.01 365
#> rho_gp[3] 1.400 5.10 21.00 1.00 645
#> 2.5% 50% 97.5% Rhat n_eff
#> alpha_gp[1] 0.06 0.41 0.96 1.00 823
#> alpha_gp[2] 0.38 0.73 1.30 1.00 1073
#> alpha_gp[3] 0.15 0.45 0.98 1.00 903
#> rho_gp[1] 1.10 3.90 14.00 1.01 302
#> rho_gp[2] 1.70 7.00 32.00 1.01 364
#> rho_gp[3] 1.30 4.80 22.00 1.01 373
#>
#> Stan MCMC diagnostics:
#> n_eff / iter looks reasonable for all parameters
#> Rhat looks reasonable for all parameters
#> 12 of 2000 iterations ended with a divergence (0.6%)
#> 18 of 2000 iterations ended with a divergence (0.9%)
#> *Try running with larger adapt_delta to remove the divergences
#> 0 of 2000 iterations saturated the maximum tree depth of 12 (0%)
#> E-FMI indicated no pathological behavior
#>
#> Samples were drawn using NUTS(diag_e) at Thu Jul 25 3:13:40 PM 2024.
#> Samples were drawn using NUTS(diag_e) at Tue Sep 03 1:57:57 PM 2024.
#> For each parameter, n_eff is a crude measure of effective sample size,
#> and Rhat is the potential scale reduction factor on split MCMC chains
#> (at convergence, Rhat = 1)
Expand Down
Loading

0 comments on commit 726154e

Please sign in to comment.