predict | R Documentation |
Predict using a fitted SPM model on the whole data or on new data
## S4 method for signature 'sspm_fit'
predict(
object,
new_data = NULL,
biomass = NULL,
aggregate = FALSE,
interval = FALSE,
next_ts = FALSE,
type = "response"
)
## S4 method for signature 'sspm_dataset'
predict(
object,
new_data = NULL,
discrete = TRUE,
type = "response",
interval = FALSE
)
object |
[sspm_fit] Fit object to predict from. |
new_data |
[data.frame] New data to predict with. |
biomass |
[character] Biomass variable. |
aggregate |
[logical] For biomass predictions only, whether to aggregate the data to the boundary level. Default to FALSE. |
interval |
[logical] Whether or not to calculate confidence, and when possible, prediction intervals. |
next_ts |
[logical] For biomass, predict next timestep. |
type |
When this has the value |
discrete |
[logical] If |
A dataframe
of predictions.
## Not run:
# Predictions for a model fit (usually, productivity)
predict(sspm_model_fit)
# To get biomass predictions, provide the variable name
predict(sspm_model_fit, biomass = "weight_per_km2_borealis")
# To get the next timestep predictions
predict(sspm_model_fit, biomass = "weight_per_km2_borealis", next_ts = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.