Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linear regression (R2) fails when boostrapping on very few data points #124

Open
IAlibay opened this issue Aug 22, 2024 · 0 comments
Open

Comments

@IAlibay
Copy link
Member

IAlibay commented Aug 22, 2024

What happens?

  1. When plotting dGs, the statistics calculations attempt to generate 1000 boostraps (with replacements) of the input dataset.

  2. If one of the boostraps yields the same number for all the values, the linear regression fails (because you can analyze a flat line).

  3. If you have 4 data points, this means that there is a 0.39% chance that you will pick the same number 4 times in a row. I.e. ~ 3 boostraps will have the same value for all the data points.

Should this even happen?

Probably not, calculating correlation metrics on so few data points is probably not sensible. It may be that the answer here is to just not report correlation metrics when there are fewer than a set number of data points (at least 10?).

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

No branches or pull requests

1 participant