balance {PND.heter.cluster}R Documentation

Checking covariate balance based on estimated cluster assignment probabilities (principal score) and treatment assignment probabilities (propensity score).

Description

Checking covariate balance based on estimated cluster assignment probabilities (principal score) and treatment assignment probabilities (propensity score).

Usage

balance(data_in, atekCl_results, covariate_names = "X_dat.1", ttname, Kname)

Arguments

data_in

A data.frame containing all necessary variables.

atekCl_results

[list]
A list returned from the R function atekCl().

covariate_names

[character]
A character vector of the column names of the baseline covariates for checking balance.

ttname

[character]
A character string of the column name of the treatment variable. The treatment variable should be dummy-coded, with 1 for the (clustered) treatment arm and 0 for the (non-clustered) control arm.

Kname

[character]
A character string of the column name of the cluster assignment variable. This variable should be coded as 0 for individuals in the control arm, the arm without the cluster assignment.

Value

A data.frame containing the covariate balance measures (smd, standardized mean difference) between each cluster in the treatment arm and the control arm, both before and after the weighting adjustment.


[Package PND.heter.cluster version 0.1.0 Index]