
Plot predictions and uncertainty displays for imputed trait values
Source:R/plot_pigauto.R
plot_uncertainty.RdFor continuous, count, and ordinal traits, plots conformal prediction
intervals when present; otherwise it shows an approximate
prediction +/- 1.96 * SE ribbon, sorted by predicted value.
If truth is supplied, observed values are overlaid as points.
Binary and categorical predictions are refused because their uncertainty
scores are not standard errors. Their probability plots are available
through plot(prediction, type = "probabilities").
See predict.pigauto_fit for type-specific uncertainty meanings.
Arguments
- pred_result
list with
imputedandsecomponents (output ofpredict.pigauto_fit), or apigauto_resultfromimpute(its$predictionis used).- truth
matrix or data.frame of true values (same scale as
pred_result$imputed), orNULL.- trait_name
character. Which trait to plot (must match column name). Binary and categorical traits are not supported by this interval plot: their uncertainty scores are not Gaussian standard errors. Use
plot(prediction, type = "probabilities")for those traits.
