Skip to contents

Generics for accessing model information.

Usage

get_result(x, ...)

# S3 method for default
get_result(x, ...)

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

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

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

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

get_warnings(x, ...)

# S3 method for default
get_warnings(x, ...)

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

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

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

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

get_errors(x, ...)

# S3 method for default
get_errors(x, ...)

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

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

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

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

get_fitted_model(x, ...)

# S3 method for default
get_fitted_model(x, ...)

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

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

get_fitted_data(x, ...)

# S3 method for default
get_fitted_data(x, ...)

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

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

get_formula(x, ...)

# S3 method for default
get_formula(x, ...)

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

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

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

get_response(x, ...)

# S3 method for default
get_response(x, ...)

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

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

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

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

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

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

get_predictors(x, ...)

# S3 method for default
get_predictors(x, ...)

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

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

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

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

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

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

get_estimate(x, ...)

# S3 method for default
get_estimate(x, ...)

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

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

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

Arguments

x

An R object.

...

Not currently used by any methods.

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.

Details

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

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)
#> [[1]]
#> 
#> Call:  glm(formula = y ~ x, family = "poisson", data = dat)
#> 
#> Coefficients:
#> (Intercept)            x  
#>      1.4514       0.5509  
#> 
#> Degrees of Freedom: 99 Total (i.e. Null);  98 Residual
#> Null Deviance:	    225.5 
#> Residual Deviance: 84.19 	AIC: 413.2
#> 
get_formula(fitted_poisson)
#> [[1]]
#> y ~ x
#> <environment: 0x5642ed3c8ba0>
#> 
get_response(fitted_poisson)
#> [[1]]
#> [1] "y"
#> 
get_predictors(fitted_poisson)
#> [[1]]
#> [1] "x"
#>