Synthetic datasets#
Generators return data together with known population quantities and are intended for examples, tests, and method studies.
Each generator accepts a sample size, random seed, and dataframe backend. Its return value contains the generated frame and a mapping of known population quantities.
Three functions serve the navigation program that the examples share.
function |
what it returns |
|---|---|
|
the |
|
the |
|
the |
Eight names serve the subscription-retailer program of the offers tutorial.
name |
what it holds |
|---|---|
|
a long panel of three weekly offers, with the logged probabilities and the exact truth. |
|
the exact week-4 share under each plan, and each contrast with no offers |
|
the |
|
the two dynamic rules, as functions of the week’s engagement |
|
the five plans by name, the three offer levels, and the number of weekly sends |
make_sequential_offers returns a long panel and takes the keyword policy. It is not in GENERATORS,
which holds generators of one wide frame with the columns Y and A.
Seven names serve the pricing tutorial of the same program.
name |
what it holds |
|---|---|
|
a wide frame of three monthly renewal prices with engagement, the renewal, and the revenue, with the exact truth |
|
the exact mean renewal and revenue under each plan, each effect against the engine’s own prices, and the decomposition of the effect by path |
|
the |
|
a plan that raises each price by a factor and keeps the engine’s price where the raised price would leave the band |
|
the three plans by name, the price band of each month, and the number of monthly prices |
make_sequential_pricing is not in GENERATORS either. Its columns are usage, engaged_1,
price_1, engaged_2, price_2, engaged_3, price_3, renewed, and revenue.
Names of the bundled data-generating processes. |
|
Generate point-treatment data with a constant additive effect. |
|
Nonlinear nuisance functions and a heterogeneous effect. |
|
Generate a bounded outcome with nonlinear nuisance functions. |
|
A binary outcome with known risks, risk ratio and odds ratio. |
|
A three-armed confounded process with known counterfactual means. |
|
A sample whose treated and control populations have genuinely different effects. |
|
Instrument-inflation: a covariate that predicts treatment but not the outcome. |
|
A confounded continuous dose with known means under each declared shift. |
|
Missing outcomes, with a missingness mechanism that depends on treatment. |
|
A binary outcome with outcomes missing at random given |
|
Missing outcomes on the known support |
|
Controlled direct effect: the effect of |
|
Clustered data with an unobserved shared effect modifying the treatment effect. |
|
A sample selected with known, unequal probabilities from a known population. |
|
A practical positivity violation. |
|
Two time points, a binary outcome and (optionally) monotone censoring. |
|
Two time points, an absorbing event at each, and monotone censoring. |
|
Three time points, a repeated binary outcome at each, and monotone censoring. |
|
Two time points, two competing absorbing causes at each, monotone censoring. |
|
A biased sample of |
|
A baseline treatment, a discrete-time event, and dropout at the visits. |
|
The exact truth of |
|
Draw the point-treatment program data, with the columns under the program's names. |
|
Return the protocol for the standard navigation offer in the tutorial program. |
|
Return the protocol for navigation offered at two decisions after discharge. |
|
Draw a weekly-offer campaign as a long panel, with the exact truth of its plans. |
|
Return the exact week-4 full-price share under each plan, and each contrast with no offers. |
|
Return the protocol of the weekly-offer campaign. |
|
Return the win-back offer: the discount for a customer who is not engaged, else nothing. |
|
Return the win-back-then-ship offer: the discount if not engaged, else free shipping. |
|
Draw three monthly renewal prices and the renewal, with the exact truth of the plans. |
|
Return the exact mean renewal and revenue under each plan, and the effect of each plan. |
|
Return the protocol of the monthly renewal-price program. |
|
Return the plan that raises each price by |