fbalance: Balance test of Covariates across treatments

Description Usage Arguments Value

View source: R/fbalance.r

Description

This function implements F-test for the null hypothesis that observed variables are balanced across treatments. First, this function runs a linear regression of covariate on treatments, using lm(). After that, we obtaine F-statistics and its p-value, using anova().

Usage

1
fbalance(x, d, data)

Arguments

x

a formula object whose right hand side is covariates (~ x1 + x2).

d

a formula object whose right hand side is treatment variable (~ d)

data

an object whose class is data.frame

Value

A matrix including mean of covariate in each treatment and p-value of F-statistics. This matrix has RCT and xbalance classes.


KatoPachi/Rkato documentation built on Dec. 18, 2021, 2:42 a.m.