Learn R Programming

RegSDC (version 0.4.0)

RegSDCgen: Regression-based SDC Tools - General data generation

Description

IPSO by QR or SVD, scores from arbitrary data, and ROMM

Usage

RegSDCgen(
  y,
  x = NULL,
  doSVD = FALSE,
  yNew = NULL,
  lambda = Inf,
  makeunique = TRUE,
  ensureIntercept = TRUE,
  returnParts = FALSE
)

Arguments

y

Matrix of confidential variables

x

Matrix of non-confidential variables

doSVD

SVD when TRUE and QR when FALSE

yNew

Matrix of y-data for new scores (simulated when NULL)

lambda

ROMM parameter

makeunique

Parameter to be used in GenQR

ensureIntercept

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

returnParts

Alternative output two matrices: yHat (fitted) and yRes (generated residuals).

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 {
exY <- matrix(rnorm(15), 5, 3)
RegSDCgen(exY)
RegSDCgen(exY, yNew = exY + 0.001 * matrix(rnorm(15), 5, 3))  # Close to exY
RegSDCgen(exY, lambda = 0.001)  # Close to exY
# }

Run the code above in your browser using DataLab