RegSDCipso: Regression-based SDC Tools - Ordinary synthetic data (IPSO)

View source: R/RegSDCgen.R

RegSDCipsoR Documentation

Regression-based SDC Tools - Ordinary synthetic data (IPSO)

Description

Implementation of equation 4 in the paper.

Usage

RegSDCipso(y, x = NULL, ensureIntercept = TRUE)

Arguments

y

Matrix of confidential variables

x

Matrix of non-confidential variables

ensureIntercept

Whether to ensure/include a constant term. Non-NULL x is subjected to EnsureIntercept

Details

Input matrices are subjected to EnsureMatrix.

Value

Generated version of y

Author(s)

Øyvind Langsrud

Examples

x <- matrix(1:5, 5, 1)
y <- matrix(rnorm(15) + 1:15, 5, 3)
ySynth <- RegSDCipso(y, x)

# Identical regression results
summary(lm(y[, 1] ~ x))
summary(lm(ySynth[, 1] ~ x))

# Identical covariance matrices
cov(y) - cov(ySynth)
cov(residuals(lm(y ~ x))) - cov(residuals(lm(ySynth ~ x)))

RegSDC documentation built on Aug. 19, 2022, 9:08 a.m.

Related to RegSDCipso in RegSDC...