dot-bin_txt: (Internal) Extracts treatment as binary 'vector'

.bin_txtR Documentation

(Internal) Extracts treatment as binary vector

Description

(Internal) Extracts treatment as binary vector

Usage

.bin_txt(spec, data = NULL, dichotomy = NULL)

Arguments

spec

A StudySpecification, used to get treatment assignment information

data

A dataframe with unit of assignment information and, if a dichotomy is provided, columns specified therein

dichotomy

Optional, a formula. See the Details section of the ett() or att() help pages for information on specifying the formula

Details

If a dichotomy is specified or the StudySpecification has a treatment variable consisting only of 0/1 or NA, then returns the binary treatment. Otherwise (it has a non-binary treatment and lacks a dichotomy) it errors.

Value

A vector of binary treatments


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