theoretical_power: Theoretical power of our test

View source: R/theoretical_power.R

theoretical_powerR Documentation

Theoretical power of our test

Description

Function that computes the power of our test for a given a design matrix and a given partitioning into subsamples.

Usage

theoretical_power(
  theta_0,
  M,
  effect_size,
  epsilon,
  alpha = 0.05,
  X = NULL,
  groups = NULL,
  n = NULL,
  d = 1,
  n_zeros = 0,
  nsims = NULL,
  test = "Linear Regression",
  ncores = 1
)

Arguments

theta_0

The threshold.

M

The number of subsamples to partition the data into.

effect_size

The quotient of the parameter of interest (beta or mu) and the standard deviation of the noise (sigma). For ANOVA, the ratio of the between group variance to the within group variance.

epsilon

The privacy parameter.

alpha

The significance level, defaults to 0.05

X

For regression only. A design matrix with at least two explanatory variables.

groups

For regression, a vector of length nrow(X) with the index of the group of each row in X. For ANOVA, an integer of the number of groups

n

For normal or ANOVA. The number of observations (number of rows in the database).

d

For normal test only. The number of dimensions (number of columns in the database).

n_zeros

For normal test only. The number of entries of the alternative distribution with mean zero. Defaults to 0.

nsims

The number of draws from the tulap and binomial with which to compute the reference distribution. (No Longer Used)

test

The test to compute the power of. Either "Linear Regression", "Normal", or "ANOVA"

ncores

The number of cores to use for the Poisson-binomial pmf computation (No Longer Used)

Value

The output will be a double between 0 and 1.


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