twosample

package
v1.0.0-alpha.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package twosample is the one reading of the explicit per-side inputs the Compose two-sample overlays (OVERLAY_T_VS_REF, OVERLAY_Z_VS_REF, OVERLAY_T_CELL, OVERLAY_Z_CELL) take when a side's mean arrives as a bare scalar: its variance and its sample size, from the spec's params.

A side whose mean comes from the slot's Components (an AGG_WELFORD row or a crosstab cell whose components carry mean and variance) needs no params. A scalar side does, and there is NO default: the var = 1, n = 2 fallback once computed p-values from figures nobody supplied (U46 E4-S16). Predict (internal/descriptor) and the runtime handlers (internal/processing) both read params through Inputs, so what one refuses the other refuses.

Leaf: stdlib only. No-execute.

Index

Constants

View Source
const (
	SymmetricVarianceKey   = "variance"
	SymmetricSampleSizeKey = "sample_size"
)

Symmetric keys: one value for both sides, read when the per-side key is absent.

Variables

This section is empty.

Functions

func Inputs

func Inputs(params map[string]any, side Side) (variance, n float64, missing []string)

Inputs reads side's (variance, sample size) from params: the per-side key when present, else the symmetric one. A value counts only when it is a finite number > 0; a per-side key that is present but unusable does not fall through to the symmetric key. missing names, in that order, the per-side key of every input that is absent or unusable — nil when both are usable.

func SampleSizeKey

func SampleSizeKey(s Side) string

SampleSizeKey is side's sample-size param ("sample_size_target" / "sample_size_ref").

func VarianceKey

func VarianceKey(s Side) string

VarianceKey is side's variance param ("variance_target" / "variance_ref").

Types

type Side

type Side string

Side is one leg of a two-sample overlay.

const (
	// Target is the scored slot (the spec's targets).
	Target Side = "target"
	// Reference is the spec's reference slot.
	Reference Side = "reference"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL