Description Usage Arguments Value Examples
This function works similarly to lm
. It takes a formula and data and
returns an lmdp object containing bias corrected OLS coefficients and standard errors. The output can be summarised
by inputting it as an argument to summary.lmdp
. See an overview at bit.ly/PrivUexample.
1 2 |
formula |
An |
data |
The data to estimate the model on. The first row of data should contain the DP standard error associated with that column unless noise argument is not NULL. |
bootstrap_var |
If FALSE, then the variance is estimated via simulation. If TRUE then the variance covariance matrix is estimated via bootstrap methods. Default is FALSE unless model contains interaction terms/squared terms or fewer than 10000 obsesrvations |
nsims_var |
Number of bootstrap samples/simulations. Default is 500 |
noise |
Set a default differentially private standard error for every column of the data matrix |
Returns an object of class lmdp containing:
b |
Inconsistent OLS coefficient estimate |
b_vcov |
Estimate of variance covariance of b |
beta_tilde |
Consistent estimates of coefficients, \tilde{β} |
beta_tilde_vcov |
Estimate of variance covariance of \tilde{β} |
var_sims |
Full set of simulated/bootstrap estimates of b and \tilde{β} |
Sigma_sq_hat |
Estimate of σ^2 |
vc_pos_def |
Indicator variable = 1 if covariance estimate was PD. NA if bootstrap used |
boot |
Indicator variable = 1 if bootstrap was used to estimate variance |
est_vc |
Variance-covariance matrix used in variance simulation. NA if bootstrap used |
X |
Matrix of covariates |
Y |
Dependent variable vector |
formula |
Model formula |
1 2 3 | ## Not run: data(dp_data)
## Not run: lmdp_test <- lmdp(Y ~ X1 + X2 + X3, data = dp_data)
## Not run: summary(lmdp_test)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.