Skip to content

Commit

Permalink
fix f distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
nhirschey committed Nov 23, 2023
1 parent 21ea829 commit 290a6ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/NovaSBE.Finance/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.4.0 - 2023-11-23

### Changed
* Updated FSharp.Stats to 0.5.0

## 0.3.0 - 2023-07-10

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/NovaSBE.Finance/Ols.fs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ type RegressionResults(df_model: int, df_resid: int, endog, exog, endog_names, e
let fvalue' = ((ss - ssr') / float df_model) / (ssr' / float df_resid) |> float

let f_pvalue' =
let fdist = ContinuousDistribution.f df_model df_resid
let fdist = Continuous.F.Init df_model df_resid
1.0 - fdist.CDF fvalue'

let r2 = 1.0 - ssr' / ss |> float
Expand Down

0 comments on commit 290a6ab

Please sign in to comment.