Skip to contents

Package overview

What pvstackr computes, and the objects that its functions return.

pvstackr pvstackr-package
pvstackr: Bayesian Plausible-Value Analysis with One Calibrated Stacked Fit
pvstackr_object_contracts
Objects returned by pvstackr

Check the columns

Find and check the plausible-value, final-weight and replicate-weight columns of a PISA-style data set.

pv_design() print(<pvstackr_design>)
Declare the plausible-value and weight columns
detect_pisa_pv_columns()
Find PISA-style plausible-value columns
detect_pisa_brr_replicate_weights()
Find PISA-style replicate-weight columns

Compute the target

Compute the design-based target for the fixed effects from the BRR-Fay replicate weights and Rubin’s rules, and check or rebuild a saved target.

pv_brr_target() print(<pvstackr_brr_target>)
Compute the design-based target for the fixed effects
pv_revalidate_brr_target()
Check a BRR-Fay target or rebuild it in the current format

Fit a model

pv_fit(), the functions for the three methods, and their settings.

pv_fit()
Fit a model to plausible-value data
pv_fit_direct()
Fit a stacked model and calibrate it to a BRR-Fay target
pv_fit_reference()
Combine one fit per plausible value with Rubin's rules
pv_fit_stack_psis()
Reweight stacked draws toward each plausible value
pv_control() print(<pvstackr_control>)
Settings for the fitting functions

Fitting engine

The fitting functions of the bundled brms engine, which you can reuse when you supply fitting functions of your own.

Compare methods

Put fits made with different methods side by side, with agreement diagnostics.

pv_compare_methods()
Compare fits made with different methods

Read results

Read the estimate table, the target, the draws and the diagnostics of a fit.

get_estimates()
Get the estimate table of a fit
get_target()
Get the target of a fit
get_draws()
Get the calibrated draws of a fit
get_diagnostics()
Get the diagnostics of a fit or comparison

Print methods for all pvstackr objects, and summary methods for fits and comparisons.

Earlier versions

Read stack_psis fits saved by an earlier version of pvstackr.