Learn R Programming

kardl (version 0.1.1)

kardl_set: Function to get or set settings

Description

This function allows you to get or set various options related to the kardl package.

Usage

kardl_set(. = FALSE, ...)

Value

If no arguments are provided, returns all options as a list. If named arguments are provided, sets those options and returns the updated list.

Arguments

.

If provided, the function will return this value. If not provided or set to `FALSE`, it will return the current settings.

...

Named arguments to set options, or no arguments to get all options.

See Also

kardl_get, kardl_reset

Examples

Run this code
# Set options
kardl_set(criterion = "BIC", differentAsymLag = TRUE)
# Get specific options
kardl_get("criterion", "differentAsymLag")
# Get all options.

# Note: In interactive use, avoid calling this directly to prevent cluttering the console.

# \donttest{
kardl_get()
# }

# Utilizing the magrittr pipe
library(magrittr)
# Set options and then get them

MyFormula<-CPI~ER+PPI+asym(ER)+deterministic(covid)+trend
kardl_set(ShortCoef = "L___{lag}.d.{varName}")
imf_example_data %>%   kardl(MyFormula)

kardl_reset()
kardl_get()

imf_example_data %>%  kardl_set(LongCoef= "LK{lag}_{varName}",ShortCoef = "D{lag}.d.{varName}") %>%
kardl(MyFormula)
kardl_get(c("LongCoef","ShortCoef"))

Run the code above in your browser using DataLab