tasmd

tasmd(x, z, *, treat_lab=1, mean_tar=None, sd_tar=None, denom='target')[source]

Target absolute standardized mean difference of one group.

|mean of the group - target| / sd, where the target defaults to the full-sample mean and sd is the target SD (default: full-sample SD) or, with denom="group", the SD within the group.

Parameters:
  • x (DataFrame) – Covariates, one column per covariate.

  • z (ndarray) – Group label per unit.

  • treat_lab (object) – Label of the group assessed.

  • mean_tar (ndarray | None) – Target covariate means.

  • sd_tar (ndarray | None) – Target covariate standard deviations.

  • denom (Literal['target', 'group']) – Which standard deviation to divide by.

Returns:

TASMD per covariate.

Return type:

Series