Skip to content

Correct the Fisher-Lee jackknife standard error - #23

Open
antonsoo wants to merge 1 commit into
circstat:mainfrom
antonsoo:fix/fisher-lee-jackknife-error
Open

antonsoo wants to merge 1 commit into
circstat:mainfrom
antonsoo:fix/fisher-lee-jackknife-error

Conversation

@antonsoo

Copy link
Copy Markdown

The Fisher–Lee jackknife test uses the variability of the leave-one-out estimates without converting it to the variability of the pseudovalues. This makes its confidence interval too narrow by a factor of n - 1.

A reproducible example uses the bundled Milwaukee wind measurements:

import numpy as np
from pycircstat2 import load_data
from pycircstat2.correlation import circ_corrcc

data = load_data("milwaukee", source="jammalamadaka")
a = np.deg2rad(data["theta"].to_numpy())
b = np.deg2rad(data["psi"].to_numpy())
print(circ_corrcc(a, b, method="fl", test=True).reject_null)

This prints True before the change and False afterward. The correlation remains 0.19103419343618408. Independently forming the delete-one pseudovalues gives a normal 95% interval of approximately [-0.08164, 0.46528], which contains zero.

Use (n - 1) * sqrt(var(leave_one_out, ddof=1) / n) for the standard error. The bias-corrected center, normal critical value, coefficient and other correlation methods stay unchanged. This follows the pseudovalue variance calculation in Sawyer's jackknife notes, equations 1–3.

The new measured-data regression fails before the change. The full suite passes 367 tests with hea==0.1.2, and the workflow's fatal Flake8 checks pass. The latest hea==0.1.10 currently fails collection on both unchanged main and this branch because regression.py imports its removed lm export. Separate scalar pair-sum/pseudovalue calculations verify 136 measured-data and transformed-control cases; 80 incorrect decisions are corrected, while coefficients and other-method outputs remain exact. The same reproduction still fails on #21's current head.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant