Skip to content

Commit

Permalink
add check on CAR1 for trend mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjclark committed Dec 3, 2024
1 parent 4f50398 commit ba9cb2d
Show file tree
Hide file tree
Showing 42 changed files with 138 additions and 118 deletions.
2 changes: 1 addition & 1 deletion R/how_to_cite.R
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ how_to_cite.mvgam <- function(object, ...){

# List of additional, possibly very useful references
other_citations <- vector(mode = 'list')
other_citations[[1]] <- "Arel-Bundock V (2024). marginaleffects: Predictions, Comparisons, Slopes, Marginal Means, and Hypothesis Tests. R package version 0.19.0.4, https://marginaleffects.com/."
other_citations[[1]] <- "Arel-Bundock, V, Greifer, N, and Heiss, A (2024). How to interpret statistical models using marginaleffects for R and Python. Journal of Statistical Software, 111(9), 1–32. https://doi.org/10.18637/jss.v111.i09"
other_citations[[2]] <- "Gabry J, Simpson D, Vehtari A, Betancourt M, and Gelman A (2019). Visualization in Bayesian workflow. Journal of the Royal Statatistical Society A, 182, 389-402. doi:10.1111/rssa.12378."
other_citations[[3]] <- "Vehtari A, Gelman A, and Gabry J (2017). Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC. Statistics and Computing, 27, 1413-1432. doi:10.1007/s11222-016-9696-4."
other_citations[[4]] <- "Burkner, PC, Gabry, J, and Vehtari, A. (2020). Approximate leave-future-out cross-validation for Bayesian time series models. Journal of Statistical Computation and Simulation, 90(14), 2499-2523. https://doi.org/10.1080/00949655.2020.1783262"
Expand Down
1 change: 1 addition & 0 deletions R/mvgam.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
#'should depend on. The `series` column should have a single unique entry for each series in the
#'data (names should perfectly match factor levels of the `series` variable in `data`). Note that
#'if this is supplied, the intercept parameter in the process model will NOT be automatically suppressed.
#'Not yet supported for models in wich the latent factors evolve in continuous time (`CAR()`).
#'See examples for details
#'@param noncentred \code{logical} Use the non-centred parameterisation for autoregressive
#'trend models? Setting to `TRUE` will reparameterise the model to avoid possible
Expand Down
10 changes: 5 additions & 5 deletions R/validations.R
Original file line number Diff line number Diff line change
Expand Up @@ -666,11 +666,11 @@ validate_trendmap = function(trend_map,
call. = FALSE)
}

# No point in trend mapping if trend model is 'None'
# if(trend_model == 'None'){
# stop('cannot set up latent trends when "trend_model = None"',
# call. = FALSE)
# }
# Cannot yet map observations to trends that evolve as CAR1
if(trend_model == 'CAR1'){
stop('cannot yet use trend mapping for CAR1 dynamics',
call. = FALSE)
}

# trend_map must have an entry for each unique time series
if(!all(sort(trend_map$series) == sort(unique(data_train$series)))){
Expand Down
Binary file modified docs/reference/figures/README-unnamed-chunk-12-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-13-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-14-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-15-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-16-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-17-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-18-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-19-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-20-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-21-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-22-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-23-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/figures/README-unnamed-chunk-24-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/reference/get_mvgam_priors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified docs/reference/mvgam-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/mvgam-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/mvgam-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/mvgam-12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/mvgam-13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/mvgam-14.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/mvgam-15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/mvgam-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/mvgam-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/mvgam-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/mvgam-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/mvgam-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/mvgam-5.png
Binary file modified docs/reference/mvgam-6.png
Binary file modified docs/reference/mvgam-7.png
Binary file modified docs/reference/mvgam-8.png
Binary file modified docs/reference/mvgam-9.png
184 changes: 96 additions & 88 deletions docs/reference/mvgam.html

Large diffs are not rendered by default.

Binary file modified docs/reference/update.mvgam-1.png
Binary file modified docs/reference/update.mvgam-2.png
Binary file modified docs/reference/update.mvgam-3.png
55 changes: 31 additions & 24 deletions docs/reference/update.mvgam.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions man/get_mvgam_priors.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/mvgam.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/update.mvgam.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ba9cb2d

Please sign in to comment.