Documentation
¶
Index ¶
- func ForestPlotSVG(run AnalysisRun) string
- func FunnelPlotSVG(run AnalysisRun) string
- func GenerateMetaforScript(run AnalysisRun) string
- func ValidateAnalysisRows(rows []InputRow) error
- type AnalysisResult
- type AnalysisRun
- func ExcludeByViSource(run AnalysisRun, viSource string) AnalysisRun
- func Prepare(id string, items []evidence.EvidenceItem) (AnalysisRun, error)
- func PrepareRawContinuous(id string, items []evidence.EvidenceItem, varianceFloor float64, ...) (AnalysisRun, error)
- func PrepareWithCalculator(id string, items []evidence.EvidenceItem, calc EffectSizeCalculator) (AnalysisRun, error)
- type Artifact
- type EffectSizeCalculator
- type FakeRunner
- type FisherZCorrelation
- type HeterogeneityMetrics
- type InputRow
- type LogOddsRatio
- type MeanDifference
- type RawContinuousOutcome
- type RawContinuousResult
- type ReadinessIssue
- type ReadinessReport
- type RiskDifference
- type RiskRatio
- type RscriptRunner
- type RunOutput
- type Runner
- type Scaffold
- type StandardizedMeanDifference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForestPlotSVG ¶
func ForestPlotSVG(run AnalysisRun) string
func FunnelPlotSVG ¶
func FunnelPlotSVG(run AnalysisRun) string
func GenerateMetaforScript ¶
func GenerateMetaforScript(run AnalysisRun) string
func ValidateAnalysisRows ¶
Types ¶
type AnalysisResult ¶
type AnalysisResult struct {
Versions map[string]string
ScriptChecksum string
OutputChecksum string
Warnings []string
ForestPlot Artifact
FunnelPlot Artifact
Metrics HeterogeneityMetrics
MetaRegression Scaffold
SubgroupAnalysis Scaffold
PublicationBias Scaffold
SensitivityAnalysis Scaffold
}
func RunMetafor ¶
func RunMetafor(dir string, run AnalysisRun, runner Runner) (AnalysisResult, error)
type AnalysisRun ¶
func ExcludeByViSource ¶
func ExcludeByViSource(run AnalysisRun, viSource string) AnalysisRun
ExcludeByViSource returns a copy of run omitting rows whose ViSource equals the given tag.
func Prepare ¶
func Prepare(id string, items []evidence.EvidenceItem) (AnalysisRun, error)
func PrepareRawContinuous ¶
func PrepareRawContinuous(id string, items []evidence.EvidenceItem, varianceFloor float64, moderatorFields []string) (AnalysisRun, error)
PrepareRawContinuous builds an AnalysisRun for scientific benchmarking meta-analysis. It records ViSource provenance per row and copies moderatorFields from evidence values.
func PrepareWithCalculator ¶
func PrepareWithCalculator(id string, items []evidence.EvidenceItem, calc EffectSizeCalculator) (AnalysisRun, error)
type EffectSizeCalculator ¶
type FakeRunner ¶
func (FakeRunner) ToolVersions ¶
func (f FakeRunner) ToolVersions() map[string]string
type FisherZCorrelation ¶
type FisherZCorrelation struct{}
type HeterogeneityMetrics ¶
func ParseHeterogeneity ¶
func ParseHeterogeneity(output string) (HeterogeneityMetrics, error)
type LogOddsRatio ¶
type LogOddsRatio struct{}
type MeanDifference ¶
type MeanDifference struct{}
type RawContinuousOutcome ¶
type RawContinuousOutcome struct {
VarianceFloor float64 // floor vi when no CI or SE is reported; defaults to 0.0025
}
RawContinuousOutcome pools a single continuous metric per study (e.g., STH efficiency %). It implements EffectSizeCalculator for use with PrepareWithCalculator and also exposes CalculateRaw for PrepareRawContinuous, which also records ViSource and Moderators.
func (RawContinuousOutcome) CalculateRaw ¶
func (r RawContinuousOutcome) CalculateRaw(values map[string]string) (RawContinuousResult, error)
CalculateRaw returns the full result including ViSource provenance tag.
type RawContinuousResult ¶
RawContinuousResult holds the output of a single raw-continuous effect calculation.
type ReadinessIssue ¶
type ReadinessIssue struct {
PaperID string `json:"paperId"`
MissingField string `json:"missingField"`
}
ReadinessIssue records a missing required field for one accepted evidence item.
type ReadinessReport ¶
type ReadinessReport struct {
RunID string `json:"runId"`
Ready bool `json:"ready"`
TotalItems int `json:"totalItems"`
ReadyItems int `json:"readyItems"`
Issues []ReadinessIssue `json:"issues"`
}
ReadinessReport summarises whether all accepted evidence items carry the required fields.
func BenchmarkingReadiness ¶
func BenchmarkingReadiness(runID string, items []evidence.EvidenceItem, requiredFields []string) ReadinessReport
BenchmarkingReadiness checks that every accepted evidence item has all requiredFields populated. Pass nil requiredFields to use the default STH% set.
type RiskDifference ¶
type RiskDifference struct{}
type RscriptRunner ¶
type RscriptRunner struct {
// Path is the Rscript binary to invoke; it defaults to "Rscript" (resolved
// from PATH) when empty.
Path string
// Timeout bounds a single Rscript execution; it defaults to 5 minutes.
Timeout time.Duration
}
RscriptRunner executes generated metafor scripts with a real Rscript binary. It implements Runner for opt-in R/metafor integration runs; the deterministic FakeRunner remains the default for normal, network-free tests.
func (RscriptRunner) Run ¶
func (r RscriptRunner) Run(script string) (RunOutput, error)
Run writes the metafor script to a temporary file and executes it with Rscript, capturing stdout and stderr. Arguments are passed directly (no shell), so the script content cannot inject extra commands.
func (RscriptRunner) ToolVersions ¶
func (r RscriptRunner) ToolVersions() map[string]string
ToolVersions reports the detected R version on a best-effort basis; it returns an empty map when the Rscript binary is unavailable.
type StandardizedMeanDifference ¶
type StandardizedMeanDifference struct{}