Learn R Programming

RegSDC (version 0.4.0)

Z2Yhat: Suppressed tabular data: Yhat from X and Z

Description

Implementation of equation 21 in the paper.

Usage

Z2Yhat(z, x, digits = 9)

Arguments

z

Z as a matrix

x

X as a matrix

digits

When non-NULL, output values close to whole numbers will be rounded using digits as input to RoundWhole.

Value

Yhat as a matrix

Details

Generalized inverse is computed by ginv. In practise, the computations can be speeded up using reduced versions of X and Z. See ReduceX.

See Also

IpsoExtra

Examples

Run this code
# NOT RUN {
# Same data as in the paper
z <- RegSDCdata("sec7z")
x <- RegSDCdata("sec7x")
Z2Yhat(z, x)

# With y known, yHat can be computed in other ways
y <- RegSDCdata("sec7y")  # Now z is t(x) %*% y 
fitted(lm(y ~ x - 1))
IpsoExtra(y, x, FALSE, resScale = 0)
# }

Run the code above in your browser using DataLab