p.value.meis: Calculate P-Value

View source: R/hypothesis_test.r

p.value.meisR Documentation

Calculate P-Value

Description

This function calculates a p-value for the test statistic t0 according to Meiselman (2021).

Usage

p.value.meis(
  t0,
  data,
  x.names,
  cluster.id,
  weights = NULL,
  c0 = NULL,
  test.var = NULL,
  fe.id = cluster.id,
  crve.type = "CR1"
)

Arguments

t0

The test statistic

data

Data frame or matrix containing all outcomes, covariates, and group ids

x.names

Vector of covariate names

cluster.id

Name of cluster id variable

weights

Name of weight variable, if applicable

c0

Linear hypothesis vector, either c0 or test.var must be supplied

test.var

Index of variable to test, either c0 or test.var must be supplied

fe.id

Name of fixed effect group id variable (defaults to cluster.id)

crve.type

Type of cluster-robust variance estimator (CR0, CR1, CR2, CR3)

Value

numeric, the probability that a test statistic with a magnitude of abs(t0) or greater is observed


akiva-yonah-meiselman/clubsoda documentation built on Feb. 3, 2025, 1:34 p.m.