Skip to content

K-S stat different on R2021b leads to different Pareto fit to \tau than other matlab releases #2

@mgcooper

Description

@mgcooper

Describe the bug
The K-S stat calculation and resulting Pareto distribution fit is different on R2021b than other matlab versions, all else equal, using the bfra_kuparuk.mlx example.

To Reproduce
Steps to reproduce the behavior:

  1. Type dbstop in bfra.plfitb at 68 in a matlab command window or open bfra.plfitb and place the dbstop
  2. Run the example in demos/bfra_kuparuk.mlx on Matlab R2021b and any other of the following releases: R2020b, R2022b
  3. When the code enters debug mode on line 68, evaluate line 68 and plot the K-S stat (variable D)
  4. Repeat in R2020b
  5. Alternatively, step into the function bfra.deps.plfit when in debug mode on line 68 of bfra.plfitb and run the code that computes the k-s stat and plot the result.

Expected behavior
The K-S stat should be identical leading to identical Pareto distribution fits to the example data in bfra_kuparuk.mlx

Screenshots
R2021b (y-axis is K-S stat):
image

R2020b (same as R2022b):
image

Desktop (please complete the following information):

  • OS: macos
  • Version 12.6.3

Additional context
Mainly relevant for replicating the results in bfra_kuparuk.mlx (and Cooper et al. 2023) but if you are conducting analysis in R2021b, results may be affected by this.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions