Stable API reference¶
- class geoestimate.Sample(data, *, cluster=None)[source]¶
Bind observations to an equal-probability sampling design.
Notes
Samplesupports equal-probability observations with iid or cluster-sandwich inference. It does not implement weights, strata, finite population corrections, PPS, or GRTS variance estimation.- Parameters:
data (DataFrame)
cluster (str | None)
- classmethod from_file(path, *, cluster=None)[source]¶
Read a Parquet, CSV, or TSV file and construct a sample.
- mean(variable, *, inference='design', confidence_level=0.95, bootstrap_reps=2000, seed=None)[source]¶
Estimate the population mean of a numeric variable.
- total(variable, *, population_size, inference='design', confidence_level=0.95, bootstrap_reps=2000, seed=None)[source]¶
Estimate a population total as population size times the sample mean.
- ratio(numerator, denominator, *, inference='design', confidence_level=0.95, bootstrap_reps=2000, seed=None)[source]¶
Estimate a ratio of population totals.
- class geoestimate.Estimate(estimand, variables, estimate, standard_error, confidence_interval, confidence_level, inference_method, n_observations, n_clusters, population_size, diagnostics)[source]¶
A scalar estimate with uncertainty and design diagnostics.