add_lag_diff: Add Variable by Lag Differencing

View source: R/tmb.R

add_lag_diffR Documentation

Add Variable by Lag Differencing

Description

Add a variable that will be available for comparisons with observed data that is created by processing an existing variable in the simulation history by lagged differencing.

Usage

add_lag_diff(model, var_pattern, delay_n = 1)

add_lag_diff_uneven(model, input_names, output_names, lag_dates)

Arguments

model

flexmodel object

var_pattern

regular expression used to identify variables for differencing. See avail_for_lag for a function that will return the names of all variables that are available for differencing.

delay_n

Delay in days for determining the lag in the differences.

input_names

names of variables to be differenced

output_names

names of the result of differencing

lag_dates

Dates between which differences should be taken.


bbolker/McMasterPandemic documentation built on Aug. 25, 2024, 6:35 p.m.