Package: mvgam 1.1.2

Nicholas J Clark

mvgam:Multivariate (Dynamic) Generalized Additive Models

Fit Bayesian Dynamic Generalized Additive Models to sets of time series. Users can build dynamic nonlinear State-Space models that can incorporate semiparametric effects in observation and process components, using a wide range of observation families. Estimation is performed using Markov Chain Monte Carlo with Hamiltonian Monte Carlo in the software 'Stan'. References: Clark & Wells (2022) <doi:10.1111/2041-210X.13974>.

Authors:Nicholas J Clark [aut, cre]

mvgam_1.1.2.tar.gz
mvgam_1.1.2.tar.gz(r-4.5-noble)mvgam_1.1.2.tar.gz(r-4.4-noble)
mvgam_1.1.2.tgz(r-4.4-emscripten)mvgam_1.1.2.tgz(r-4.3-emscripten)
mvgam.pdf |mvgam.html
mvgam/json (API)
NEWS

# Installmvgam in R:
install.packages('mvgam',repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/nicholasjclark/mvgam/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

43 exports 0.23 score 96 dependencies 338 downloads

Last updated 4 days agofrom:7d17d040ce

Exports:%>%add_residualsARbetarCARcodecompare_mvgamsdynamiceval_mvgamforecastget_mvgam_priorsGPhindcastlfo_cvlv_correlationsmvgamnbneff_rationmixnuts_paramsplot_mvgam_factorsplot_mvgam_fcplot_mvgam_ptermsplot_mvgam_randomeffectsplot_mvgam_residsplot_mvgam_seriesplot_mvgam_smoothplot_mvgam_trendplot_mvgam_uncertaintypp_checkppcPWroll_eval_mvgamRWscoreseries_to_mvgamsim_mvgamstudent_ttetitweedieVARvariables

Dependencies:abindaskpassbackportsbayesplotBHbridgesamplingbrmsBrobdingnagcallrcheckmateclicodacodetoolscolorspacecurldata.tabledescdigestdistributionaldplyrfansifarverfuturefuture.applygenericsggplot2ggridgesglobalsgluegreyboxgridExtragtablehttrinlineinsightisobandjsonlitelabelinglatticelifecyclelistenvloomagrittrmarginaleffectsMASSMatrixmatrixStatsmgcvmimemunsellmvnfastmvtnormnleqslvnlmenloptrnumDerivopensslparallellypbapplypillarpkgbuildpkgconfigplyrposteriorpracmaprocessxpspurrrQuickJSRR6RColorBrewerRcppRcppArmadilloRcppEigenRcppParallelreshape2rlangrstanrstantoolsscalessmoothStanHeadersstatmodstringistringrsystensorAtexregtibbletidyselectutf8vctrsviridisLitewithrxtablezoo

Forecasting and forecast evaluation in mvgam

Rendered fromforecast_evaluation.Rmdusingknitr::rmarkdownon Jul 02 2024.

Last update: 2024-07-02
Started: 2024-05-07

Formatting data for use in mvgam

Rendered fromdata_in_mvgam.Rmdusingknitr::rmarkdownon Jul 02 2024.

Last update: 2024-05-11
Started: 2024-05-07

N-mixtures in mvgam

Rendered fromnmixtures.Rmdusingknitr::rmarkdownon Jul 02 2024.

Last update: 2024-05-11
Started: 2024-05-07

Overview of the mvgam package

Rendered frommvgam_overview.Rmdusingknitr::rmarkdownon Jul 02 2024.

Last update: 2024-05-11
Started: 2024-05-07

Shared latent states in mvgam

Rendered fromshared_states.Rmdusingknitr::rmarkdownon Jul 02 2024.

Last update: 2024-07-02
Started: 2024-05-07

State-Space models in mvgam

Rendered fromtrend_formulas.Rmdusingknitr::rmarkdownon Jul 02 2024.

Last update: 2024-07-02
Started: 2024-05-07

Time-varying effects in mvgam

Rendered fromtime_varying_effects.Rmdusingknitr::rmarkdownon Jul 02 2024.

Last update: 2024-07-02
Started: 2024-05-07

Readme and manuals

Help Manual

Help pageTopics
Calculate randomized quantile residuals for mvgam objectsadd_residuals add_residuals.mvgam
NEON Amblyomma and Ixodes tick abundance survey dataall_neon_tick_data
Print the model code from an mvgam objectcode
Display Conditional Effects of Predictorsconditional_effects.mvgam plot.mvgam_conditional_effects print.mvgam_conditional_effects
Defining dynamic coefficients in mvgam formulaedynamic
Evaluate forecasts from fitted mvgam objectscompare_mvgams evaluate_mvgams eval_mvgam roll_eval_mvgam
Expected Values of the Posterior Predictive Distributionfitted.mvgam
Extract or compute hindcasts and forecasts for a fitted 'mvgam' objectforecast forecast.mvgam
Extract formulae from mvgam objectsformula.mvgam formula.mvgam_prefit
Extract information on default prior distributions for an mvgam modelget_mvgam_priors
Specify dynamic Gaussian processesGP
Extract hindcasts for a fitted 'mvgam' objecthindcast hindcast.mvgam
Index 'mvgam' objectsand coefficient Index index-mvgam names their variables variables.mvgam `mgcv`
Approximate leave-future-out cross-validation of fitted 'mvgam' objectslfo_cv lfo_cv.mvgam
Compute pointwise Log-Likelihoods from fitted 'mvgam' objectslogLik.mvgam
LOO information criteria for 'mvgam' modelsloo.mvgam loo_compare.mvgam
Calculate trend correlations based on mvgam latent factor loadingslv_correlations
MCMC plots as implemented in 'bayesplot'mcmc_plot.mvgam
Extract model.frame from a fitted mvgam objectmodel.frame.mvgam model.frame.mvgam_prefit
Monotonic splines in mvgammonotonic Predict.matrix.mod.smooth Predict.matrix.moi.smooth smooth.construct.mod.smooth.spec smooth.construct.moi.smooth.spec
Fit a Bayesian dynamic GAM to a univariate or multivariate set of time seriesmvgam
Extract diagnostic quantities of 'mvgam' modelslog_posterior.mvgam mvgam_diagnostics neff_ratio neff_ratio.mvgam nuts_params nuts_params.mvgam rhat rhat.mvgam
Extract posterior draws from fitted 'mvgam' objectsas.array.mvgam as.data.frame.mvgam as.matrix.mvgam as_draws.mvgam as_draws_array.mvgam as_draws_df.mvgam as_draws_list.mvgam as_draws_matrix.mvgam as_draws_rvars.mvgam mvgam_draws
Supported mvgam familiesbetar mvgam_families nb nmix student_t tweedie
'mvgam_forecast' object descriptionmvgam_forecast-class
Details of formula specifications in 'mvgam'mvgam_formulae
Helper functions for mvgam marginaleffects calculationsfind_predictors.mvgam find_predictors.mvgam_prefit get_coef.mvgam get_data.mvgam get_data.mvgam_prefit get_predict.mvgam get_vcov.mvgam mvgam_marginaleffects set_coef.mvgam
Supported mvgam trend modelsmvgam_trends
Fitted 'mvgam' object descriptionmvgam-class
Create a matrix of output plots from a 'mvgam' objectpairs.mvgam
Latent factor summaries for a fitted mvgam objectplot_mvgam_factors
Plot mvgam posterior predictions for a specified seriesplot.mvgam_forecast plot_mvgam_fc plot_mvgam_forecasts
Plot mvgam parametric term partial effectsplot_mvgam_pterms
Plot mvgam random effect termsplot_mvgam_randomeffects
Residual diagnostics for a fitted mvgam objectplot_mvgam_resids
Plot observed time series used for mvgam modellingplot_mvgam_series
Plot mvgam smooth termsplot_mvgam_smooth
Plot mvgam latent trend for a specified seriesplot_mvgam_trend
Plot mvgam forecast uncertainty contributions for a specified seriesplot_mvgam_uncertainty
Default mvgam plotsplot.mvgam
Plot Pareto-k and ELPD values from a leave-future-out objectplot.mvgam_lfo
Portal Project rodent capture survey dataportal_data
Draws from the Expected Value of the Posterior Predictive Distributionposterior_epred posterior_epred.mvgam
Posterior Draws of the Linear Predictorposterior_linpred.mvgam
Draws from the Posterior Predictive Distributionposterior_predict.mvgam
Posterior Predictive Checks for 'mvgam' Objectspp_check pp_check.mvgam
Plot mvgam posterior predictive checks for a specified seriesppc ppc.mvgam
Predict from the GAM component of an mvgam modelpredict.mvgam
Summary for a fitted mvgam objectprint.mvgam
Specify piecewise linear or logistic trendsPW
Posterior draws of 'mvgam' residualsresiduals.mvgam
Specify autoregressive dynamic processesAR CAR RW VAR
Compute probabilistic forecast scores for mvgam objectsscore score.mvgam_forecast
This function converts univariate or multivariate time series ('xts' or 'ts' objects) to the format necessary for 'mvgam'series_to_mvgam
Simulate a set of discrete time series for mvgam modellingsim_mvgam
Summary for a fitted mvgam objectcoef.mvgam summary.mvgam summary.mvgam_prefit
Defining smooths in 'mvgam' formulaete ti
Update an existing 'mvgam' objectupdate.mvgam