estimators

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetaRegressionValuesFromEvidence

func MetaRegressionValuesFromEvidence(items []evidence.EvidenceItem, field string) (map[string]float64, error)

func PooledEstimate

func PooledEstimate(rows []core.InputRow) (float64, float64, int, error)

func SubgroupValuesFromEvidence

func SubgroupValuesFromEvidence(items []evidence.EvidenceItem, field string) (map[string]string, error)

Types

type BayesianEngine

type BayesianEngine interface {
	Name() string
	Run(core.AnalysisRun, BayesianEngineOptions) (BayesianReport, error)
}

type BayesianEngineOptions

type BayesianEngineOptions struct{ PriorMean, PriorVariance float64 }

type BayesianReport

type BayesianReport struct {
	RunID          string  `json:"runId"`
	Method         string  `json:"method"`
	Engine         string  `json:"engine,omitempty"`
	Studies        int     `json:"studies"`
	PriorMean      float64 `json:"priorMean"`
	PriorVariance  float64 `json:"priorVariance"`
	PosteriorMean  float64 `json:"posteriorMean"`
	PosteriorVar   float64 `json:"posteriorVariance"`
	CredibleLow95  float64 `json:"credibleLow95"`
	CredibleHigh95 float64 `json:"credibleHigh95"`
}

BayesianReport records a lightweight normal-normal Bayesian meta-analysis approximation.

func BayesianNormalApproximation

func BayesianNormalApproximation(run core.AnalysisRun, priorMean, priorVariance float64) (BayesianReport, error)

BayesianNormalApproximation computes a conjugate normal fixed-effect approximation.

func RunBayesianEngine

func RunBayesianEngine(run core.AnalysisRun, engine BayesianEngine, opts BayesianEngineOptions) (BayesianReport, error)

type GridBayesianEngine

type GridBayesianEngine struct{ GridPoints int }

func (GridBayesianEngine) Name

func (GridBayesianEngine) Name() string

func (GridBayesianEngine) Run

type InfluenceReport

type InfluenceReport struct {
	RunID            string         `json:"runId"`
	BaselineEstimate float64        `json:"baselineEstimate"`
	BaselineVariance float64        `json:"baselineVariance"`
	Rows             []InfluenceRow `json:"rows"`
}

func InfluenceDiagnostics

func InfluenceDiagnostics(run core.AnalysisRun) (InfluenceReport, error)

type InfluenceRow

type InfluenceRow struct {
	PaperID       string  `json:"paperId"`
	LeaveOneOut   float64 `json:"leaveOneOut"`
	Delta         float64 `json:"delta"`
	AbsoluteDelta float64 `json:"absoluteDelta"`
	Weight        float64 `json:"weight"`
}

type LeaveOneOutRow

type LeaveOneOutRow struct {
	OmittedPaperID string  `json:"omittedPaperId"`
	Estimate       float64 `json:"estimate"`
	Variance       float64 `json:"variance"`
	Delta          float64 `json:"delta"`
	AbsoluteDelta  float64 `json:"absoluteDelta"`
	Studies        int     `json:"studies"`
}

LeaveOneOutRow is one leave-one-study-out sensitivity result.

type MetaRegressionReport

type MetaRegressionReport struct {
	RunID     string  `json:"runId"`
	Moderator string  `json:"moderator"`
	Studies   int     `json:"studies"`
	Intercept float64 `json:"intercept"`
	Slope     float64 `json:"slope"`
}

MetaRegressionReport records a simple weighted meta-regression diagnostic.

func MetaRegression

func MetaRegression(run core.AnalysisRun, moderator string, values map[string]float64) (MetaRegressionReport, error)

MetaRegression fits a weighted linear regression of effect size on a numeric moderator.

type ModeratorField

type ModeratorField struct {
	Name        string `json:"name"`
	Papers      int    `json:"papers"`
	Numeric     bool   `json:"numeric"`
	Categorical bool   `json:"categorical"`
}

type ModeratorPreview

type ModeratorPreview struct {
	Fields []ModeratorField `json:"fields"`
}

func ModeratorPreviewFromEvidence

func ModeratorPreviewFromEvidence(items []evidence.EvidenceItem) ModeratorPreview

type PublicationBiasReport

type PublicationBiasReport struct {
	RunID      string  `json:"runId"`
	Method     string  `json:"method"`
	Studies    int     `json:"studies"`
	Intercept  float64 `json:"intercept,omitempty"`
	Slope      float64 `json:"slope,omitempty"`
	KendallTau float64 `json:"kendallTau,omitempty"`
	Warning    string  `json:"warning,omitempty"`
}

PublicationBiasReport records a lightweight publication-bias diagnostic.

func BeggRankCorrelation

func BeggRankCorrelation(run core.AnalysisRun) (PublicationBiasReport, error)

func EggerRegression

func EggerRegression(run core.AnalysisRun) (PublicationBiasReport, error)

EggerRegression computes an Egger-style regression of standardized effects on precision.

type SensitivityReport

type SensitivityReport struct {
	RunID            string           `json:"runId"`
	Method           string           `json:"method"`
	BaselineEstimate float64          `json:"baselineEstimate"`
	BaselineVariance float64          `json:"baselineVariance"`
	MaxAbsoluteDelta float64          `json:"maxAbsoluteDelta"`
	Rows             []LeaveOneOutRow `json:"rows"`
}

SensitivityReport records deterministic sensitivity-analysis artifacts.

func LeaveOneOut

func LeaveOneOut(run core.AnalysisRun) (SensitivityReport, error)

LeaveOneOut computes inverse-variance fixed-effect estimates after omitting each study.

type SubgroupEstimate

type SubgroupEstimate struct {
	Group    string  `json:"group"`
	Studies  int     `json:"studies"`
	Estimate float64 `json:"estimate"`
	Variance float64 `json:"variance"`
}

SubgroupEstimate is one inverse-variance pooled subgroup estimate.

type SubgroupReport

type SubgroupReport struct {
	RunID    string             `json:"runId"`
	Variable string             `json:"variable"`
	Groups   []SubgroupEstimate `json:"groups"`
}

SubgroupReport records pooled estimates split by a categorical moderator.

func SubgroupAnalysis

func SubgroupAnalysis(run core.AnalysisRun, variable string, groups map[string]string) (SubgroupReport, error)

SubgroupAnalysis computes fixed-effect inverse-variance pooled estimates per group.

Jump to

Keyboard shortcuts

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