View source: R/Barrientos_implementation.R
Barrientos_power | R Documentation |
Simulate a p-value computation for the test proposed by Barrientos et al. many times and compute the power. This is done for several choices of the truncation parameter, a. The design matrix is set prior to the simulations.
Barrientos_power( X, groups, M, a_vector, effect_size, alpha, epsilon, nsims, reps )
X |
The design matrix. |
groups |
A vector with the group number of each observation. |
M |
The number of subsamples when computing p-value. |
a_vector |
Vector of truncation levels. |
effect_size |
The quotient of the parameter of interest (beta) and the standard deviation of the noise (sigma). |
alpha |
The significance level. |
epsilon |
The privacy parameter. |
nsims |
Number of simulations for the p-value computation. |
reps |
Number of simulations for the reference distribution computation. |
Will return a vector of powers of the same length as 'a_vector', where output corresponds to the power with that level of truncation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.