dot-fit.anova: ANOVA for 'tidyfit'

.fit.anovaR Documentation

ANOVA for tidyfit

Description

Performs Analysis of Variance on a 'tidyFit' R6 class. The function can be used with regress or classify.

Usage

## S3 method for class 'anova'
.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)

The function provides a wrapper for stats::anova. See ?anova for more details.

First a glm model is fitted which is passed to anova.

Value

A fitted 'tidyFit' class model.

Author(s)

Johann Pfitzinger

See Also

.fit.lm, .fit.glm and m methods

Examples

# Load data
data <- tidyfit::Factor_Industry_Returns

# Stand-alone function
fit <- m("anova", Return ~ `Mkt-RF` + HML + SMB, data)
fit

# Within 'regress' function
fit <- regress(data, Return ~ ., m("anova"), .mask = c("Date", "Industry"))
tidyr::unnest(coef(fit), model_info)


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