Predict crop yields from a fitted model

Description

Predict crop yields from a fitted model

Usage

## S3 method for class 'crop_yield_model'
predict(
  object,
  newdata,
  interval = c("none", "prediction"),
  use_ar = TRUE,
  ...
)

Arguments

object

A 'crop_yield_model' object.

newdata

A data frame with 'RS', 'Year', and every weather term used by the model, or a 'crop_yield_data' object.

interval

Either '"none"' or '"prediction"'. Prediction intervals are available only for models extracted from [compare_crop_models()].

use_ar

Whether to apply the pooled residual AR(1) correction.

...

Unused.

Value

A numeric vector, or a data frame with 'fit', 'lower', and 'upper'.


[Package yieldlag version 0.3.0 ]