Skip to contents

Implementation based on equations 11, 12 and 17 in the paper.

Usage

RegSDCromm(y, lambda = Inf, x = NULL, doSVD = FALSE, ensureIntercept = TRUE)

Arguments

y

Matrix of confidential variables

lambda

ROMM parameter

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. The exact behaviour of the method depends on the choice of the decomposition method because of the sequentially phenomenon mentioned in the paper. The similarity to the original data will tend to be highest for the first component. Input matrices are subjected to EnsureMatrix.

Author

Øyvind Langsrud

Examples

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

# Same as IPSO (RegSDCipso)
RegSDCromm(y, Inf, x)
#>          [,1]      [,2]     [,3]
#> [1,] 2.700540  7.298341 12.63000
#> [2,] 2.709010  7.981590 12.84849
#> [3,] 2.904772  7.308195 12.20955
#> [4,] 5.413306  9.513246 14.40105
#> [5,] 4.906183 11.379692 15.63661

# Close to IPSO
RegSDCromm(y, 100, x)
#>          [,1]      [,2]     [,3]
#> [1,] 2.588519  6.087369 11.52098
#> [2,] 2.891641  8.126544 13.16348
#> [3,] 2.845269  8.892081 13.43822
#> [4,] 5.432506 10.754498 15.43482
#> [5,] 4.875877  9.620571 14.16820

# Close to y
RegSDCromm(y, 0.001, x)
#>          [,1]      [,2]     [,3]
#> [1,] 2.741093  6.530433 11.90906
#> [2,] 2.111899  7.056944 12.05533
#> [3,] 3.779154 10.099017 14.71114
#> [4,] 5.293664  9.777172 14.66110
#> [5,] 4.708002 10.017498 14.38907