Z2Yhat {RegSDC}R Documentation

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.

Details

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

Value

Yhat as a matrix

Author(s)

Øyvind Langsrud

See Also

IpsoExtra

Examples

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

[Package RegSDC version 0.7.0 Index]