Skip to contents

Estimates the minimum required standard errors for detecting given effect sizes with desired power.

Usage

compute_target_standard_error(
  X,
  min_effect,
  target_power_approx,
  alpha,
  acc = 0.001
)

Arguments

X

Design matrix

min_effect

Minimum effect size(s) to detect

target_power_approx

Approximate desired statistical power (0-1)

alpha

Type I error rate (e.g., 0.05)

acc

Accuracy for numeric search (default: 1e-3)

Value

A vector of minimum standard errors for each covariate