Analysis#

Specification of analyses that can be used to evaluate model fit.

Statistic definitions are used to define a set of statistical analyses that may be used to fit a model. Definitions of individual analyses are stored in Analysis objects, which specify how an analysis should be run and the expected output variables.

Definitions for a set of analyses are stored in a Statistics object. Statistics objects may be used to evaluate statistics on a given dataset, and can be used with fit_indiv() to fit parameters to specific statistics, rather than overall likelihood.

Statistic definitions may be saved to a JSON file to document exactly what statistics were fitted, in a form that can be loaded and reused.

Analysis definitions#

Analysis(function, independent, dependent, level)

Manage analysis specification.

Analysis.eval(data)

Evaluate an analysis on a dataset.

Statistic definitions#

Statistics([error_stat, weighting])

Manage statistics specifications.

Statistics.set_stat(stat, *args, **kwargs)

Configure an analysis to generate a statistic.

Statistics.eval_stats(data)

Evaluate all statistics.

Statistics.compare_stats(stats1, stats2)

Compare statistics.

Statistic definition files#

Statistics.to_json(json_file)

Write statistics definitions to a JSON file.

read_json(json_file)

Read statistics definition from a JSON file.