dot-weights_calc: (Internal) Worker function for weight calculation

.weights_calcR Documentation

(Internal) Worker function for weight calculation

Description

Called from ate() or ett().

Usage

.weights_calc(specification, target, weightAlias, dichotomy, by, data)

Arguments

specification

a StudySpecification object created by one of rct_spec(), rd_spec(), or obs_spec().

target

One of "ate" or "ett"; ate() and ett() chooses these automatically.

weightAlias

An alias for the weight target, currently one of "ate", "ett", "att". Chosen by ate() and ett() automatically.

dichotomy

optional; a formula defining the dichotomy of the treatment variable if it isn't already 0/1. See details of help for ate() or ett() e.g. for details.

by

optional; named vector or list connecting names of unit of assignment/ variables in specification to unit of assignment/cluster variables in data. Names represent variables in the StudySpecification; values represent variables in the data. Only needed if variable names differ.

data

optionally the data for the analysis to be performed on. May be excluded if these functions are included as the weights argument of a model.

Value

a WeightedStudySpecification object


propertee documentation built on Aug. 22, 2025, 1:09 a.m.