cleverly.TrialATE#

class cleverly.TrialATE(population: Literal['pooled', 'trial'])[source]#

The trial’s treatment effect, estimated with external data pooled in.

The trial’s conditional effect at covariates W is the difference in the trial’s mean outcome between the arms among trial rows with those covariates. population says over whose covariates it is averaged. The contrast is the second treatment level against the first, in sorted order, as ATE takes it by default. The estimand is on the difference scale only.

Parameters:
population{“pooled”, “trial”}

"trial" averages over the trial’s covariates, which is the trial’s average treatment effect. "pooled" averages over the covariates of every row, trial and external; it also needs every external row’s covariates to occur in the trial. Required, because the two differ whenever trial membership depends on the covariates.

Raises:
ValueError

When population is neither "pooled" nor "trial".

See also

TrialWithExternalData

The design this estimand is identified on.

AdaptiveTMLEMethod

The method that estimates it.

ATE

The average treatment effect of a single study.

Examples

>>> from cleverly import TrialATE
>>> TrialATE(population="trial").definition
'trial effect averaged over the trial covariates, E[Y^1 - Y^0 | S = 1]'

Methods#

Attributes#

TrialATE.definition#

Return the effect’s definition for the declared population.

TrialATE.name: str = 'ate'#
TrialATE.population: Literal['pooled', 'trial']#