Learn R Programming

DCSmooth (version 1.1.2)

set.options: Set Options for the DCS procedure

Description

Set Options for the DCS procedure

Usage

set.options(
  type = "LP",
  kerns = c("MW_220", "MW_220"),
  drv = c(0, 0),
  var_model = "iid",
  ...
)

Arguments

type

either local polynomial regression ("LP", the default) or kernel regression ("KR").

kerns

a character vector of length 2 containing the identifier for the kernels to be used in kernel regression. Weighting functions in local polynomial regression are computed according to the identifier. Default value is MW_220, the Mueller-Wang kernel of order \((2, 2, 0)\). If only a single value is provided, it is used as kernel in both directions.

drv

A non-negative vector of length 2, containing the derivative orders to be estimated from the given data. The default is c(0, 0). For LP-regression, polynomial order is selected as \((\nu_1 + 1, \nu_2 + 1)\). If only a single value is provided, it is used as derivative in both directions.

var_model

the method of estimating the variance coefficient \(c_f\). Currently available are var_model = c("iid", "sarma_HR", "sarma_sep", "sarma_RSS", "sfarima_RSS"). Replacing the argument var_model. For code using var_est, the argument is converted to var_model.

...

Additional arguments passed to set.options(). This includes IPI_options, a list containing further options used by the iterative plug-in algorithm. For convenience, any of the options usually included in the list IPI_options can be passed as argument directly to set.options and will be converted into the IPI_options list. Further arguments accepted are model_order controlling the order of the variance model, if either an SARMA or SFARIMA model is used. This argument is either a list of the form list(ar = c(1, 1), ma = c(1, 1)) or specifies an order selection criterion from c("aic", "bic", "gpac"). If an order selection criterion is used, the argument order_max controls the maximum order to be tested.

Value

An object of class "dcs_options".

Details

This function is used to set the options for bandwidth selection in the dcs function. Detailed information can be found in the vignette.

See Also

dcs

Examples

Run this code
# NOT RUN {
# See vignette("DCSmooth") for examples and explanation

set.options()

myOpt <- set.options(type = "KR", var_model = "iid")
y <- y.norm1 + matrix(rnorm(101^2), nrow = 101, ncol = 101)
dcs(y, dcs_options = myOpt)
# }

Run the code above in your browser using DataLab