scan_spline_lam: Scan spline regularization parameter

Description Usage Arguments Value

View source: R/spline_model.R

Description

This function holds degrees of freedom fixed and scans regularization parameter values.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
scan_spline_lam(
  reported,
  delay_dist,
  lam_grid,
  method = "val",
  percent_thresh = 2,
  dof = 10,
  regularization_order = 2,
  reported_val = NULL,
  end_pad_size = 0,
  fisher_approx_cov = TRUE
)

Arguments

reported

An integer vector of reported cases.

delay_dist

A positive vector that sums to one, which describes the delay distribution.

lam_grid

A vector of regularization strengths to scan.

method

Metric to choose "best" dof: 'aic', 'bic', 'val'. If method='val', reported_val must be non NULL and match reported size.

percent_thresh

If using validation likelihood to select best, the largest (strongest) lambda that is within 'percent_thresh' of the highest validation lambda will be selected. Default is 2. Must be greater than 0.

dof

Degrees of freedom for spline basis.

regularization_order

An integer (typically 0, 1, 2), indicating differencing order for L2 regularization of spline parameters. Default is 2 for second derivative penalty.

reported_val

Validation time series of equal size to reported vector for use with 'val' method. Default is NULL.

end_pad_size

And integer number of steps the spline is defined beyond the final observation.

fisher_approx_cov

A flag to use either the Fisher Information (TRUE) or the Hessian (FALSE) to approx posterior covariance over parameters.

Value

List of outputs:


incidental documentation built on Sept. 16, 2020, 5:07 p.m.