kc_baltab: Create balance table with group statistics; conduct t-tests...

View source: R/kc_baltab.R

kc_baltabR Documentation

Create balance table with group statistics; conduct t-tests and F-test

Description

Create an export-ready data frame containing group means and group standard deviations (or standard errors), output from difference-in-means tests; as well as output from a joint significance test for models of group membership

Usage

kc_baltab(
  data,
  balvar,
  grpvar,
  refgrp,
  fevar = NULL,
  vcov = "hc1",
  report_sd = FALSE,
  report_ttest_pval = TRUE
)

Arguments

data

The data frame to tabulate

balvar

The variables to tabulate

grpvar

If TRUE then drops NA values; if FALSE then includes NA values

refgrp

Reference category for group comparisons

fevar

Name of fixed effects or block variables to condition on

vcov

Standard error type (e.g. "hc1", "iid", "hetero") or a name of a variable to cluster standard errors on

report_sd

If TRUE then reports standard deviation of each variable; if FALSE then reports standard errors

report_ttest_pval

If TRUE then reports p-values in difference in means test; if FALSE then reports mean difference

Value

A data frame containing the balance table information


kennchua/kctools documentation built on Aug. 28, 2024, 8:37 a.m.