Package: mvgam 1.1.3

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.3.tar.gz
mvgam_1.1.3.zip(r-4.5)mvgam_1.1.3.zip(r-4.4)mvgam_1.1.3.zip(r-4.3)
mvgam_1.1.3.tgz(r-4.4-x86_64)mvgam_1.1.3.tgz(r-4.4-arm64)mvgam_1.1.3.tgz(r-4.3-x86_64)mvgam_1.1.3.tgz(r-4.3-arm64)
mvgam_1.1.3.tar.gz(r-4.5-noble)mvgam_1.1.3.tar.gz(r-4.4-noble)
mvgam_1.1.3.tgz(r-4.4-emscripten)mvgam_1.1.3.tgz(r-4.3-emscripten)
mvgam.pdf |mvgam.html
mvgam/json (API)
NEWS

# Install 'mvgam' in R:
install.packages('mvgam', repos = c('https://nicholasjclark.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:

On CRAN:

bayesian-statisticsdynamic-factor-modelsecological-modellingforecastinggaussian-processgeneralised-additive-modelsgeneralized-additive-modelsjagsmultilevel-modelsmultivariate-timeseriesstantime-series-analysistimeseriesvector-autoregressionvectorautoregression

80 exports 99 stars 4.78 score 96 dependencies 88 scripts 539 downloads

Last updated 2 hours agofrom:2d0b304657. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 18 2024
R-4.5-win-x86_64OKSep 18 2024
R-4.5-linux-x86_64OKSep 18 2024
R-4.4-win-x86_64OKSep 18 2024
R-4.4-mac-x86_64OKSep 18 2024
R-4.4-mac-aarch64OKSep 18 2024
R-4.3-win-x86_64OKSep 18 2024
R-4.3-mac-x86_64OKSep 18 2024
R-4.3-mac-aarch64OKSep 18 2024

Exports:%>%add_residualsARbernoullibeta_binomialbetarCARcodecompare_mvgamscomparisonsconditional_effectsdatagriddrawDotmvgamdynamicensembleeval_mvgameval_smoothDothilbertDotsmootheval_smoothDotmodDotsmootheval_smoothDotmoiDotsmoothfevdforecastget_mvgam_priorsgpGPhindcasthypothesesirflfo_cvlognormallooloo_comparelv_correlationsmcmc_plotmvgamnbneff_rationmixnuts_paramsplot_comparisonsplot_mvgam_factorsplot_mvgam_fcplot_mvgam_ptermsplot_mvgam_randomeffectsplot_mvgam_residsplot_mvgam_seriesplot_mvgam_smoothplot_mvgam_trendplot_mvgam_uncertaintyplot_predictionsplot_slopesposterior_epredposterior_linpredposterior_predictpp_checkppcpredictionspriorprior_prior_stringPWrhatroll_eval_mvgamRWsscoreseries_to_mvgamset_priorsim_mvgamslopesstabilitystancodestandatastudentstudent_tt2tetitweedieVARvariables

Dependencies:abindaskpassbackportsbayesplotBHbridgesamplingbrmsBrobdingnagcallrcheckmateclicodacodetoolscolorspacecurldata.tabledescdigestdistributionaldplyrfansifarverfuturefuture.applygenericsggplot2ggridgesglobalsgluegreyboxgridExtragtablehttrinlineinsightisobandjsonlitelabelinglatticelifecyclelistenvloomagrittrmarginaleffectsMASSMatrixmatrixStatsmgcvmimemunsellmvnfastmvtnormnleqslvnlmenloptrnumDerivopensslparallellypbapplypillarpkgbuildpkgconfigplyrposteriorpracmaprocessxpspurrrQuickJSRR6RColorBrewerRcppRcppArmadilloRcppEigenRcppParallelreshape2rlangrstanrstantoolsscalessmoothStanHeadersstatmodstringistringrsystensorAtexregtibbletidyselectutf8vctrsviridisLitewithrxtablezoo

Forecasting and forecast evaluation in mvgam

Rendered fromforecast_evaluation.Rmdusingknitr::rmarkdownon Sep 18 2024.

Last update: 2024-09-06
Started: 2023-10-23

Formatting data for use in mvgam

Rendered fromdata_in_mvgam.Rmdusingknitr::rmarkdownon Sep 18 2024.

Last update: 2024-09-06
Started: 2023-09-20

N-mixtures in mvgam

Rendered fromnmixtures.Rmdusingknitr::rmarkdownon Sep 18 2024.

Last update: 2024-09-06
Started: 2024-01-29

Overview of the mvgam package

Rendered frommvgam_overview.Rmdusingknitr::rmarkdownon Sep 18 2024.

Last update: 2024-09-06
Started: 2023-08-29

Shared latent states in mvgam

Rendered fromshared_states.Rmdusingknitr::rmarkdownon Sep 18 2024.

Last update: 2024-09-06
Started: 2023-09-29

State-Space models in mvgam

Rendered fromtrend_formulas.Rmdusingknitr::rmarkdownon Sep 18 2024.

Last update: 2024-09-06
Started: 2023-09-01

Time-varying effects in mvgam

Rendered fromtime_varying_effects.Rmdusingknitr::rmarkdownon Sep 18 2024.

Last update: 2024-09-06
Started: 2023-10-14

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
Stan code and data objects for mvgam modelscode stancode.mvgam stancode.mvgam_prefit standata.mvgam_prefit
Display Conditional Effects of Predictorsconditional_effects.mvgam plot.mvgam_conditional_effects print.mvgam_conditional_effects
Defining dynamic coefficients in mvgam formulaedynamic
Combine mvgam forecasts into evenly weighted ensemblesensemble ensemble.mvgam_forecast
Evaluate forecasts from fitted mvgam objectscompare_mvgams evaluate_mvgams eval_mvgam roll_eval_mvgam
Calculate latent VAR forecast error variance decompositionsfevd fevd.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
Enhance mvgam post-processing using gratia functionalitydraw.mvgam drawDotmvgam eval_smooth.hilbert.smooth eval_smooth.mod.smooth eval_smooth.moi.smooth eval_smoothDothilbertDotsmooth eval_smoothDotmodDotsmooth eval_smoothDotmoiDotsmooth gratia_mvgam_enhancements
Extract hindcasts for a fitted 'mvgam' objecthindcast hindcast.mvgam
Index 'mvgam' objectsand coefficient Index index-mvgam names their variables variables.mvgam `mgcv`
Calculate latent VAR impulse response functionsirf irf.mvgam
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 familiesbernoulli betar beta_binomial lognormal mvgam_families nb nmix student student_t tweedie
'mvgam_fevd' object descriptionmvgam_fevd-class
'mvgam_forecast' object descriptionmvgam_forecast-class
Details of formula specifications in 'mvgam'mvgam_formulae
'mvgam_irf' object descriptionmvgam_irf-class
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 forecast error variance decompositions from an mvgam_fevd object This function takes an 'mvgam_fevd' object and produces a plot of the posterior median contributions to forecast variance for each series in the fitted Vector Autoregressionplot.mvgam_fevd
Plot impulse responses from an mvgam_irf object This function takes an 'mvgam_irf' object and produces plots of Impulse Response Functionsplot.mvgam_irf
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.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 conditional 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 time series for mvgam modellingsim_mvgam
Calculate measures of latent VAR community stabilitystability stability.mvgam
Summary for a fitted mvgam objectcoef.mvgam summary.mvgam summary.mvgam_prefit
Update an existing 'mvgam' objectupdate.mvgam