Predict the expected wet biomass per m² of plot at the rows of new_data, or
at the observed data when new_data = NULL. Equivalent to
kb_predict_cover_calibration().
Arguments
- object
A
kb_fit_cover_calibrationobject.- new_data
A data frame of the rows to predict at, with
canopy_area_m2(the canopy area in the plot, m²),plot_area_m2(the plot area, m²),canopy_tide_height_m(the tide height, m), and optionallysiteandyear, orNULLfor the observed surveys.yearmay be numeric or character:2022and"2022"match the same fitted year.- ...
These dots are for future extensions and must be empty.
- new_levels
A string giving how uncertainty is estimated for a site or year not in the data used to fit the model, or when
new_datahas nositeoryearcolumn. Sites and years in the model fit always use their own estimates. One of:"average"(the default): the typical site or year. The site and year effects are set to 0, their mean, so the interval does not include among-site or among-year variation. Use it to describe an average site or year."sample": a new effect for each new site or year, drawn from the estimated variation among sites or among years (the random-effect standard deviation). The point estimate is equivalent, but the interval is wider since it also includes that variation. Use it to get realistic uncertainty about a particular site or year that the model has no information on. The interval varies slightly between calls; useset.seed()to reproduce it.
- representative_site
A character vector of sites in the fit whose effects a new site adopts (averaged when several are named), or
NULL(the default) to follownew_levels.- conf_level
A number greater than 0 and less than 1 giving the compatibility-interval level.
- estimate
A function that reduces a numeric vector of posterior draws to a single estimate, such as
medianormean.- sig_fig
A whole number of significant figures for summary output.
See also
Other prediction functions:
autoplot.kb_predictions(),
kb_new_data(),
kb_plot_predictions(),
kb_predict_biomass_canopy(),
kb_predict_biomass_in_situ(),
kb_predict_carbon(),
kb_predict_cover_calibration(),
kb_predict_mean_weight(),
kb_predict_nitrogen(),
kb_predict_size(),
kb_predict_weight(),
kb_predict_wetdry(),
predict.kb_fit_carbon(),
predict.kb_fit_nitrogen(),
predict.kb_fit_size(),
predict.kb_fit_weight(),
predict.kb_fit_wetdry()
Examples
predict(
fit_cover_calibration_sim_macro,
data.frame(canopy_area_m2 = 120, plot_area_m2 = 200, canopy_tide_height_m = 0.5)
)
#> <kb_predictions> predictor: cover | response: biomass_kg_m2
#> # A tibble: 1 × 6
#> canopy_area_m2 plot_area_m2 canopy_tide_height_m estimate lower upper
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 120 200 0.5 6.16 5.22 7.16