synaptome.estimates¶
synaptome.estimates
¶
Estimates: how large, with no hypothesis. A registry of estimators (what each needs of a question's
design, its engine function and analytic interval) and the runner behind q.estimate(...)
(DESIGN.md section 7).
Estimator
dataclass
¶
One estimator.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
|
family |
str
|
|
designs |
tuple[str, ...]
|
For pair estimators: |
scales |
tuple[str, ...] | dict
|
Scales of the analysed values it accepts; a dict |
binary |
bool | None
|
True: needs a binary outcome; False: refuses one; None: either. |
functions |
dict
|
|
intervals |
dict
|
|
bounded |
bool
|
Values live in a bounded range (proportions, probabilities, correlations, ratios): the |
flip |
str | None
|
How the value changes when the pair is read the other way round ( |
n_eff_interval |
bool
|
The analytic interval accounts for serial correlation through an effective sample size, so it
stays valid with an ordered unit ( |
min_groups |
int
|
Omnibus estimators: the fewest groups they need (Kendall's W: 3). |
description |
str
|
|
get(name)
¶
The registry entry for name; an unknown name lists the estimators.
compute_estimate(question, name, ci='analytic', confidence=0.95, n_boot=2000, seed=0, interval='bca', replicates=None, assume_independent=False, return_draws=False)
¶
Computes estimator name on question. See Question.estimate for the parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
return_draws
|
bool
|
Also return, per row of the table, the bootstrap draws and the BCa acceleration ( |
False
|
Returns:
| Type | Description |
|---|---|
(table, method[, draws]): tuple
|
One row per group or per pair ( |
Raises:
| Type | Description |
|---|---|
ValueError
|
When the estimator doesn't suit the question (design, scale, binary outcome, ordered unit) or the settings are invalid, naming what to use instead. |