Learn R Programming

RegSDC (version 0.4.0)

RegSDCnew: Regression-based SDC Tools - Scores from new data

Description

Implementation of equation 12 in the paper.

Usage

RegSDCnew(y, yNew, x = NULL, doSVD = FALSE, ensureIntercept = TRUE)

Arguments

y

Matrix of confidential variables

yNew

Matrix of y-data for new scores

x

Matrix of non-confidential variables

doSVD

SVD when TRUE and QR when FALSE

ensureIntercept

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

Value

Generated version of y

Details

doSVD has effect on decomposition of y and yNew. 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)

# Same as IPSO (RegSDCipso)
RegSDCnew(y, matrix(rnorm(15), 5, 3), x)

# Close to y
RegSDCnew(y, y + 0.001 * matrix(rnorm(15), 5, 3), x)
# }

Run the code above in your browser using DataLab