dot-fit.quantile: Quantile regression for 'tidyfit'

.fit.quantileR Documentation

Quantile regression for tidyfit

Description

Fits a linear quantile regression on a 'tidyFit' R6 class. The function can be used with regress.

Usage

## S3 method for class 'quantile'
.fit(self, data = NULL)

Arguments

self

a 'tidyFit' R6 class.

data

a data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr).

Details

Hyperparameters:

None. Cross validation not applicable.

Important method arguments (passed to m)

  • tau (the quantile(s) to be estimated)

The function provides a wrapper for quantreg::rq. See ?rq for more details. The argument tau is the chosen quantile (default tau = 0.5).

Implementation

No implementation notes

Value

A fitted 'tidyFit' class model.

Author(s)

Johann Pfitzinger

References

Koenker R (2022). quantreg: Quantile Regression. R package version 5.94, https://CRAN.R-project.org/package=quantreg.

See Also

.fit.lm, .fit.bayes and m methods

Examples

# Load data
data <- tidyfit::Factor_Industry_Returns

fit <- regress(data, Return ~ .,
               m("quantile", tau = c(0.1, 0.5, 0.9)),
               .mask = c("Date", "Industry"))
coef(fit)


tidyfit documentation built on Oct. 3, 2024, 5:06 p.m.