POST/primitives/coursemember
One person's years, age by age: household money (income, work, retirement, buffer, borrowing, spending) under an economy that moves between regimes, and the body (height, weight, lean share) under an energy balance and activity. Stateless and seeded; a model with stated parameters, `basis: modelled`, validity echoed.
Body
seed | number |
id | person |
birth_year | year |
from_age | default 18 |
to_age | default 90 |
household | {start_assets?, base_income?, profile?, retire_age?, ...: household parameters; unknown names refused} |
body | {height_cm?, weight_kg?, activity?, params?} |
lifestyle | {surplus_kcal?, activity?} |
macro | {seed?, spec?: {regimes, transition, start}} |
POST/primitives/demandmember
Budget shares across categories by an almost-ideal demand system with its restrictions checked (adding up, homogeneity, symmetry), exact elasticities, and a person's choice among options by a logit with their own price sensitivity.
Body
model | {alpha, beta, gamma, alpha0?} |
prices | [number] one per category |
budget | number |
options | {quality: [number], prices: [number], sensitivity?} |
POST/primitives/trialmember
An offer put in front of a sample of people drawn from a household income process: the share who respond with the sampling interval, the parameter interval and the backtest error kept apart. Called checked only when a backtest error is given.
Body
seed | number |
n | 10..20000 |
year | year |
offer | {point: [taste position], price, quality?} |
params | trial parameters |
household | household parameters |
age_lo | 18 |
age_hi | 85 |
perturb | relative parameter spread, default 0.15 |
backtest_error | absolute error of a registered backtest of this kind of trial |
POST/primitives/retentionmember
Repeat purchase until a customer quietly stops: a cohort simulated beside the closed-form expectation, with satisfaction moving the dropout chance.
Body
model | {rate_shape, rate_scale, drop_a, drop_b, satisfaction_effect} |
seed | number |
n | 10..50000 |
horizon | time units |
satisfaction | -1..1 |
POST/primitives/tastemember
A moving culture in a taste space and a person's taste in it, year by year: formed in their own years, drawn toward the present at their own pace.
Body
seed | number |
person | number |
birth_year | year |
from_year | year |
to_year | year |
params | taste parameters |
POST/primitives/returnsmember
A purchase kept or returned: the return chance from fit gap, price and satisfaction (with each buyer's own tendency), the day of a return inside the window, and the wear of what is kept; the simulated share beside the integrated one.
Body
model | {base_rate, fit_effect, price_effect, reference_price, satisfaction_effect, propensity_sd, window_days, timing_shape, timing_scale_days, wears_per_month, wear_satisfaction_effect, wear_decay_per_month} |
seed | number |
n | 10..50000 |
months | 0..120 |
purchase | {fit_gap 0..1, price, satisfaction -1..1, fit_gaps?: {place: 0..1} (per place on the body; the chance reads 1 - prod(1 - gap), never below fit_gap)} |
POST/primitives/wearmember
How a garment ages with wearing and washing from a fabric's test numbers: abrasion, pilling grade, colour change, shrinkage and shape loss at given wear counts, and the satisfaction they cost.
Body
fabric | {abrasion_cycles, pilling_cycles, colour_wash_grade (grey-scale grade after the wash test, 5 = no change), colour_test_washes? (home washes the test stands for, default 5), shrinkage_after_washes_pct, recovery_pct} |
wearing | {martindale_cycles_per_wear, wears_per_wash, shape_loss_wears, weights} |
wears | [number] |
fit_gap | 0..1 |