Skip to content

Commit

Permalink
Merge pull request #53 from nalimilan/patch-1
Browse files Browse the repository at this point in the history
Fix reference to saturated model
  • Loading branch information
yufongpeng authored Sep 12, 2022
2 parents 657919b + ecff455 commit 0ebdb71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/GLM.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This result is a little bit different from [`GLM.ftest`](https://juliastats.org/
```@example glm
ftest(getproperty.(lms[2:end], :model)...)
```
In `anova`, the F value is calculated by dividing [MSR](https://en.wikipedia.org/wiki/Mean_squared_error) (mean of ΔDeviance) with mean of [RSS](https://en.wikipedia.org/wiki/Residual_sum_of_squares) of saturated model just like [`anova` in R](https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/anova), while in [`GLM.ftest`](https://juliastats.org/GLM.jl/stable/api/#GLM.ftest), the denominator is replaced by [RSS](https://en.wikipedia.org/wiki/Residual_sum_of_squares) of subsequant model.
In `anova`, the F value is calculated by dividing [MSR](https://en.wikipedia.org/wiki/Mean_squared_error) (mean of ΔDeviance) with mean of [RSS](https://en.wikipedia.org/wiki/Residual_sum_of_squares) of the most complex model just like [`anova` in R](https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/anova), while in [`GLM.ftest`](https://juliastats.org/GLM.jl/stable/api/#GLM.ftest), the denominator is replaced by [RSS](https://en.wikipedia.org/wiki/Residual_sum_of_squares) of subsequent model.
## Generalized linear models
```julia
quine = dataset("MASS", "quine")
Expand Down Expand Up @@ -72,4 +72,4 @@ lrtest(glm1, glm2)
```
This function works identically as [`StatsModels.lrtest`](https://juliastats.org/StatsModels.jl/stable/api/#StatsModels.lrtest).
!!! note
We can also specify test by keword arguments `test` or putting test in the first argument.
We can also specify test by keword arguments `test` or putting test in the first argument.

0 comments on commit 0ebdb71

Please sign in to comment.