predict.aedseo {aedseo}R Documentation

Predict Growth Rates for Future Time Steps

Description

[Stable]

This function is used to predict future growth rates based on a model object created using the 'aedseo' package. It takes the model object and the number of future time steps (n_step) for which you want to make predictions and returns a prediction tibble.

Usage

## S3 method for class 'aedseo'
predict(object, n_step = 3, ...)

Arguments

object

A model object created using the aedseo package, typically the result of the aedseo() function.

n_step

An integer specifying the number of future time steps for which you want to predict growth rates. Default is 3.

...

Additional arguments (not used).

Value

A tibble S3 object called aedseo containing the predicted growth rates, including time, estimated growth rate, lower confidence interval, and upper confidence interval for the specified number of future time steps.

Examples

# Analyze the data using the aedseo package
tsd_data <- tsd(
  observed = c(100, 120, 150, 180, 220, 270),
  time = as.Date(c(
    "2023-01-01",
    "2023-01-02",
    "2023-01-03",
    "2023-01-04",
    "2023-01-05",
    "2023-01-06"
  )),
  time_interval = "day"
)

aedseo_results <- aedseo(
  tsd = tsd_data,
  k = 3,
  level = 0.95,
  family = "poisson"
)

# Predict growth rates for the next 5 time steps
prediction <- predict(object = aedseo_results, n_step = 5)

# Print the prediction
print(prediction)


[Package aedseo version 0.1.2 Index]