accessors: Accessors generics

accessorsR Documentation

Accessors generics

Description

Generics for accessing model information.

Usage

get_result(x, ...)

## Default S3 method:
get_result(x, ...)

## S3 method for class 'trending_fit'
get_result(x, ...)

## S3 method for class 'trending_predict'
get_result(x, ...)

## S3 method for class 'trending_fit_tbl'
get_result(x, ...)

## S3 method for class 'trending_predict_tbl'
get_result(x, ...)

get_warnings(x, ...)

## Default S3 method:
get_warnings(x, ...)

## S3 method for class 'trending_fit'
get_warnings(x, ...)

## S3 method for class 'trending_predict'
get_warnings(x, ...)

## S3 method for class 'trending_fit_tbl'
get_warnings(x, ...)

## S3 method for class 'trending_predict_tbl'
get_warnings(x, ...)

get_errors(x, ...)

## Default S3 method:
get_errors(x, ...)

## S3 method for class 'trending_fit'
get_errors(x, ...)

## S3 method for class 'trending_predict'
get_errors(x, ...)

## S3 method for class 'trending_fit_tbl'
get_errors(x, ...)

## S3 method for class 'trending_predict_tbl'
get_errors(x, ...)

get_fitted_model(x, ...)

## Default S3 method:
get_fitted_model(x, ...)

## S3 method for class 'trending_fit'
get_fitted_model(x, ...)

## S3 method for class 'trending_fit_tbl'
get_fitted_model(x, ...)

get_fitted_data(x, ...)

## Default S3 method:
get_fitted_data(x, ...)

## S3 method for class 'trending_fit'
get_fitted_data(x, ...)

## S3 method for class 'trending_fit_tbl'
get_fitted_data(x, ...)

get_formula(x, ...)

## Default S3 method:
get_formula(x, ...)

## S3 method for class 'trending_model'
get_formula(x, ...)

## S3 method for class 'trending_fit'
get_formula(x, ...)

## S3 method for class 'trending_fit_tbl'
get_formula(x, ...)

get_response(x, ...)

## Default S3 method:
get_response(x, ...)

## S3 method for class 'trending_model'
get_response(x, ...)

## S3 method for class 'trending_fit'
get_response(x, ...)

## S3 method for class 'trending_fit_tbl'
get_response(x, ...)

## S3 method for class 'trending_prediction'
get_response(x, ...)

## S3 method for class 'trending_predict'
get_response(x, ...)

## S3 method for class 'trending_predict_tbl'
get_response(x, ...)

get_predictors(x, ...)

## Default S3 method:
get_predictors(x, ...)

## S3 method for class 'trending_model'
get_predictors(x, ...)

## S3 method for class 'trending_fit'
get_predictors(x, ...)

## S3 method for class 'trending_fit_tbl'
get_predictors(x, ...)

## S3 method for class 'trending_prediction'
get_predictors(x, ...)

## S3 method for class 'trending_predict'
get_predictors(x, ...)

## S3 method for class 'trending_predict_tbl'
get_predictors(x, ...)

get_estimate(x, ...)

## Default S3 method:
get_estimate(x, ...)

## S3 method for class 'trending_prediction'
get_estimate(x, ...)

## S3 method for class 'trending_predict'
get_estimate(x, ...)

## S3 method for class 'trending_predict_tbl'
get_estimate(x, ...)

Arguments

x

An R object.

...

Not currently used by any methods.

Details

Methods are provided for trending_model, trending_fit, trending_fit_tbl, trending_predict, and trending_predict_tbl objects.

Value

  • get_result(): the captured output.

  • get_warnings(): the captured warnings.

  • get_errors(): the captured warnings.

  • get_fitted_data: The underlying data used to fit the model.

  • get_fitted_model(): The underlying fitted model.

  • get_formula(): the formula used to model temporal trends.

  • get_response(): the response variable of the underlying model.

  • get_predictors(): the predictor variable(s) of the underlying 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")
fitted_poisson <- fit(poisson_model, dat)

get_fitted_model(fitted_poisson)
get_formula(fitted_poisson)
get_response(fitted_poisson)
get_predictors(fitted_poisson)


trending documentation built on April 4, 2023, 1:07 a.m.