designToDescriptives: Generate Descriptives

View source: R/Design.R

designToDescriptivesR Documentation

Generate Descriptives

Description

Use a design object to generate descriptive statistics that ignore clustering. Stratum weights are respected if provided (by passing a design arg of class StratumWeightedDesignOptions). If not provided, stratum weights default to "Effect of Treatment on Treated" weighting. That is, when combining within-stratum averages (which will themselves have been weighted by unit weights), each stratum receives a weight equal to the product of the stratum sum of unit weights with the fraction of clusters within the stratum that were assigned to the treatment condition.

Usage

designToDescriptives(design, covariate.scales = NULL)

Arguments

design

A DesignOptions object

covariate.scales

Scale estimates for covariates, a named numeric vector

Details

By default, covariates are scaled by their pooled s.d.s, square roots of half of their treatment group variances plus half of their control group variances. If weights are provided, these are weighted variances. If descriptives are requested for an unstratified setup, i.e. a stratification named ‘--’, then covariate s.d.s are calculated against it; otherwise the variances reflect stratification, and are calculated against the first stratification found. Either way, if descriptives are calculated for multiple stratifications, only one set of covariate s.d.s will have been calculated, and these underlie standard difference calculations for each of the stratifications.

If a named numeric covariate.scales argument is provided, any covariates named in the vector will have their pooled s.d.s taken from it, rather than from the internal calculation.

Value

Descriptives


RItools documentation built on June 22, 2024, 9:06 a.m.