Skip to contents

Uses the estimates from a precision_weights fit (additive: \(\tau^2\), \(\kappa\), \(\beta_1\); multiplicative: phi, beta1) to compute the variance, the weight \(w = 1/\sigma^2\) and, for the additive model, the reliability for new observations — typically a precision grid (to draw a continuous weight profile) or held-out samples — without refitting.

Usage

predict_weights(object, newdata = NULL, ...)

Arguments

object

A precision_weights object from fit_precision_weights().

newdata

One of: a weight_data frame, a plain data frame with the predictor column, or a calibration_result(_multiplate) (which is run through as_weight_data(source = "grid") using the fit's design). NULL (default) re-applies to the fit's own data via the stored weights.

...

Passed to as_weight_data() when newdata is an ecosystem object.

Value

A data frame with the predictor, sigma, w, and w_norm columns added.