set_datamod_outcome_rr3 {bage}R Documentation

Specify RR3 Data Model

Description

Specify a data model where the outcome variable has been randomly rounded to base 3.

Usage

set_datamod_outcome_rr3(mod)

Arguments

mod

An object of class "bage_mod", created with mod_pois(), mod_binom(), or mod_norm().

Details

set_datamod_outcome_rr3() can only be used with Poisson and binomial models (created with mod_pois() and mod_binom().)

Random rounding to base 3 (RR3) is a confidentialization technique that is sometimes applied by statistical agencies. RR3 is applied to integer data. The procedure for rounding value n is as follows:

If set_datamod_outcome_rr3() is applied to a fitted model, it 'unfits' the model, deleting existing estimates.

Value

A modified version of mod.

See Also

Examples

## 'injuries' variable in 'nzl_injuries' dataset
## has been randomly rounded to base 3
mod <- mod_pois(injuries ~ age:sex + ethnicity + year,
                data = nzl_injuries,
                exposure = popn) |>
  set_datamod_outcome_rr3() |>
  fit()

[Package bage version 0.9.0 Index]