param_reg: Create a named list of model parameters that can be passed...

View source: R/RcppExports.R

param_regR Documentation

Create a named list of model parameters that can be passed into regression and machine learning functions.

Description

Create a named list of model parameters that can be passed into regression and machine learning functions.

Usage

param_reg(
  regmod = "least_squares",
  intercept = TRUE,
  singmin = 1e-05,
  dimax = 0L,
  residscale = "none",
  confl = 0.1,
  alpha = 0
)

Arguments

method

A character string specifying the type of regression model (the default is method = "least_squares").

intercept

A Boolean specifying whether an intercept term should be added to the predictor (the default is intercept = TRUE).

singmin

A numeric threshold level for discarding small singular values in order to regularize the inverse of the predictor matrix (the default is 1e-5).

dimax

An integer equal to the number of singular values used for calculating the reduced inverse of the predictor matrix (the default is dimax = 0 - standard matrix inverse using all the singular values).

confl

The confidence level for calculating the quantiles of returns (the default is confl = 0.75).

alpha

The shrinkage intensity of returns (with values between 0 and 1 - the default is 0).

Details

The function param_reg() creates a named list of model parameters that can be passed into regression and machine learning functions. For example into the functions calc_reg() and roll_reg().

The function param_reg() simplifies the creation of regression parameter lists. The users can create a parameter list with the default values, or they can specify custom parameter values.

Value

A named list of model parameters that can be passed into regression and machine learning functions.

Examples

## Not run: 
# Create a default list of regression parameters
controlv <- HighFreq::param_reg()
unlist(controlv)
# Create a custom list of regression parameters
controlv <- HighFreq::param_reg(intercept=FALSE, method="regular", dimax=4)
unlist(controlv)

## End(Not run)


algoquant/HighFreq documentation built on Feb. 9, 2024, 8:15 p.m.