Learn R Programming

BayesianDisaggregation (version 0.1.2)

temporal_stability: Temporal stability (smoothness over time)

Description

Rewards smooth posteriors by penalizing average absolute period-to-period changes per sector. Maps to \([0,1]\) via \(1/(1 + \kappa \cdot \mathrm{mv})\).

Usage

temporal_stability(W, kappa = 50)

Value

Scalar temporal stability score in \([0,1]\). If \(T<2\), returns 0.8.

Arguments

W

Posterior matrix (\(T \times K\)).

kappa

Sensitivity to average absolute change (default 50).

Examples

Run this code
W <- matrix(runif(30), 6); W <- W/rowSums(W)
temporal_stability(W, kappa = 40)

Run the code above in your browser using DataLab