Z2Yhat | R Documentation |
Implementation of equation 21 in the paper.
Z2Yhat(z, x, digits = 9)
z |
Z as a matrix |
x |
X as a matrix |
digits |
When non-NULL, output values close to whole numbers will be rounded using
|
Generalized inverse is computed by ginv
.
In practise, the computations can be speeded up using reduced versions of X and Z. See ReduceX
.
Yhat as a matrix
Øyvind Langsrud
IpsoExtra
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.