Learn R Programming

mvgam (version 1.1.594)

how_to_cite.mvgam: Generate a methods description for mvgam models

Description

Create a brief but fully referenced methods description, along with a useful list of references, for fitted mvgam and jsdgam models.

Usage

how_to_cite(object, ...)

# S3 method for mvgam how_to_cite(object, ...)

Value

An object of class how_to_cite containing a text description of the methods as well as lists of both primary and additional references.

Arguments

object

list object of class mvgam resulting from a call to mvgam() or jsdgam()

...

ignored

Author

Nicholas J Clark

Details

This function uses the model's structure to come up with a very basic but hopefully useful methods description that can help users to appropriately acknowledge the hard work of developers and champion open science. Please do not consider the text returned by this function to be a completely adequate methods section; it is only meant to get you started.

See Also

citation, mvgam, jsdgam

Examples

Run this code
if (FALSE) {
#--------------------------------------------------
# Simulate 4 time series with hierarchical seasonality
# and a VAR(1) dynamic process
#--------------------------------------------------
set.seed(0)

simdat <- sim_mvgam(
  seasonality = 'hierarchical',
  trend_model = VAR(cor = TRUE),
  family = gaussian()
)

# Fit an appropriate model
mod1 <- mvgam(
  y ~ s(season, bs = 'cc', k = 6),
  data = simdat$data_train,
  family = gaussian(),
  trend_model = VAR(cor = TRUE),
  chains = 2,
  silent = 2
)

how_to_cite(mod1)

#--------------------------------------------------
# For a GP example, simulate data using the mgcv package
#--------------------------------------------------
dat <- mgcv::gamSim(1, n = 30, scale = 2)

# Fit a model that uses an approximate GP from brms
mod2 <- mvgam(
  y ~ gp(x2, k = 12),
  data = dat,
  family = gaussian(),
  chains = 2,
  silent = 2
)

how_to_cite(mod2)
}

Run the code above in your browser using DataLab