RegSDCgen: Regression-based SDC Tools - General data generation

View source: R/RegSDCgen.R

RegSDCgenR Documentation

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).

Details

doSVD has effect on decomposition of y and yNew. Input matrices are subjected to EnsureMatrix.

Value

Generated version of y

Author(s)

Øyvind Langsrud

Examples

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

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

Related to RegSDCgen in RegSDC...