fit.list {trending}R Documentation

Fit method list object

Description

Fits a list of trending_model objects to the given input data.

Usage

## S3 method for class 'list'
fit(x, data, ...)

Arguments

x

A list of trending_model objects

data

A data frame containing the data to fit.

...

Not currently used.

Value

A trending_fit_tbl object which is a tibble subclass with one row for each model and entries:

Author(s)

Tim Taylor

See Also

fit.trending_model()

Examples

x = rnorm(100, mean = 0)
y = rpois(n = 100, lambda = exp(1.5 + 0.5*x))
dat <- data.frame(x = x, y = y)
poisson_model <- glm_model(y ~ x , family = poisson)
negbin_model <- glm_nb_model(y ~ x)

fit(list(poisson_model, negbin_model), dat)
fit(list(pm = poisson_model, nm = negbin_model), dat)


[Package trending version 0.1.0 Index]