conf.interval.meis: Calculate Confidence Interval

View source: R/hypothesis_test.r

conf.interval.meisR Documentation

Calculate Confidence Interval

Description

This function calculates a confidence interval for the coefficient (or linear combination of coefficients) defined by test.var (or c0) according to Meiselman (2021).

Usage

conf.interval.meis(
  data,
  y.name,
  x.names,
  cluster.id,
  alpha = 0.05,
  weights = NULL,
  c0 = NULL,
  test.var = NULL,
  fe.id = cluster.id,
  crve.type = "CR1"
)

Arguments

data

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

y.name

Name of dependent variable

x.names

Vector of covariate names

cluster.id

Name of cluster id variable

alpha

Size of test associated with the confidence interval (e.g. a test of size 0.05 is associated with a 95% confidence interval)

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 lower and upper bound of the confidence interval


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