Barrientos_power: Barrientos power

View source: R/Barrientos_implementation.R

Barrientos_powerR Documentation

Barrientos power

Description

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.

Usage

Barrientos_power(
  X,
  groups,
  M,
  a_vector,
  effect_size,
  alpha,
  epsilon,
  nsims,
  reps
)

Arguments

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.

Value

Will return a vector of powers of the same length as 'a_vector', where output corresponds to the power with that level of truncation.


diff-priv-ht/nonpmRegPkg documentation built on Feb. 6, 2023, 5:22 p.m.