SpilloverCRTpower: Conduct power analysis of conditional randomization test

View source: R/crt.R

SpilloverCRTpowerR Documentation

Conduct power analysis of conditional randomization test

Description

See S3.2 for more details.

Usage

SpilloverCRTpower(
  D,
  Z,
  CourtEvent_HearingDate,
  n = 4,
  m = 4,
  size = 2,
  cand_omegaZtilde = seq(-1.5, 1.5, by = 0.5)
)

Arguments

D

A numeric vector of judge's decision.

Z

A numeric vector of treatment variable.

CourtEvent_HearingDate

The court event hearing date.

n

Number of permutations.

m

Number of permutations.

size

The number of parallel computing. The default is 2.

cand_omegaZtilde

Candidate values

Value

A data.frame of the result of power analysis.

Examples


data(synth)
data(hearingdate_synth)
crt_power <- SpilloverCRTpower(
  D = synth$D, Z = synth$Z,
  CourtEvent_HearingDate = hearingdate_synth,
  size = 1
) # adjust the size



aihuman documentation built on April 12, 2025, 1:47 a.m.