Description Usage Arguments Examples
View source: R/utilities-covariance.R
Function to extract regression coefficients using the differentially private covariance matrix
via the sweep operator. This is the function to obtain coefficients for additional models
after the covariance.release()
function has already been called.
1 | coefficientRelease(formula, release, n)
|
formula |
Formula, regression formula used on data |
release |
Numeric, private release of covariance matrix |
n |
Integer, indicating number of observations |
1 2 3 4 5 6 7 8 9 10 | ## Not run:
range.income <- c(-10000, 713000)
range.education <- c(1, 16)
range <- rbind(range.income, range.education)
dpCov <- dpCovariance$new(mechanism="mechanismLaplace",var.type = 'numeric', n = 10000,
epsilon = 1, columns = c("income", "educ"), rng = range, formula='income~educ')
out <- dpCov$release(PUMS5extract10000)
coefficient.release('educ~income', out$release, n=10000)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.