Skip to content

Split AnalyticWeights into several types #758

Open
@ParadaCarleton

Description

@ParadaCarleton

As mentioned when working on #754, it might make sense to split AnalyticWeights into two separate types of weights:

  1. PrecisionWeights, which represent observations with a known variance. The weight for each observation should be equal to 1/σ^2.
  2. BatchWeights, which represent observations that are themselves averages of several observations (as used in e.g. meta-analysis). Each weight should be an integer equal to the number of observations in the batch.

It's possible to break these down further -- BatchWeights might be broken down based on whether they're homogenous (identical means) or heterogenous (differing means), and PrecisionWeights could be broken down based on whether each observation has a variance that is completely known or known only up to a constant.

This would solve the current problem where the ambiguity of AnalyticWeights can result in nonsense answers -- for instance, var currently returns an estimate that assumes a sample size equal to length(weights), which is incorrect if each observation is actually an average of several sub-observations (the way the docstring for AnalyticWeights says they should be used).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions