Learn R Programming

RegSDC (version 0.4.0)

RegSDCipso: 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

Value

Generated version of y

Details

Input matrices are subjected to EnsureMatrix.

Examples

Run this code
# NOT RUN {
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)))
# }

Run the code above in your browser using DataLab