Learn R Programming

SynthesizerPlus (version 0.4.0)

ci_overlap: Confidence-interval overlap of regression coefficients

Description

A specific utility measure: the same regression model is fitted to the real and the synthetic data and, for each coefficient, the overlap of the two confidence intervals is computed (Karr et al., 2006): $$IO = \frac{1}{2}\left(\frac{U-L}{u_r-l_r} + \frac{U-L}{u_s-l_s}\right)$$ where \([L, U]\) is the intersection of the intervals. Overlap is 1 for identical intervals and can become negative when they are disjoint.

Usage

ci_overlap(real, synthetic, formula, family = stats::gaussian(), level = 0.95)

Value

A data frame with estimates, intervals, the standardised difference of the estimates and the interval overlap per coefficient.

Arguments

real, synthetic

Data frames.

formula

Model formula.

family

A stats::family() object (default Gaussian, i.e. linear regression).

level

Confidence level.

References

Karr, A. F., Kohnen, C. N., Oganian, A., Reiter, J. P. and Sanil, A. P. (2006). A framework for evaluating the utility of data altered to protect confidentiality. The American Statistician, 60(3), 224--232. tools:::Rd_expr_doi("10.1198/000313006X124640")

Examples

Run this code
syn <- synthesize(mtcars, seed = 1)
ci_overlap(mtcars, syn, mpg ~ wt + hp)

Run the code above in your browser using DataLab