Skip to content

Commit 35893f3

Browse files
authored
Attach r2 and adjr2 docstrings to methods rather than functions (#13)
These docstrings describe particular methods rather than the whole functions. For some reason this prevents the docstrings for two-argument methods from being included in the StatsBase manual.
1 parent 6680786 commit 35893f3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/statisticalmodel.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ the likelihood of the model, ``k`` its number of consumed degrees of freedom
205205
"""
206206
bic(model::StatisticalModel) = -2loglikelihood(model) + dof(model)*log(nobs(model))
207207

208+
function r2 end
209+
208210
"""
209211
r2(model::StatisticalModel)
210212
r²(model::StatisticalModel)
@@ -214,7 +216,7 @@ Coefficient of determination (R-squared).
214216
For a linear model, the R² is defined as ``ESS/TSS``, with ``ESS`` the explained sum of squares
215217
and ``TSS`` the total sum of squares.
216218
"""
217-
function r2 end
219+
r2(model::StatisticalModel)
218220

219221
"""
220222
r2(model::StatisticalModel, variant::Symbol)
@@ -261,6 +263,8 @@ end
261263

262264
const= r2
263265

266+
function adjr2 end
267+
264268
"""
265269
adjr2(model::StatisticalModel)
266270
adjr²(model::StatisticalModel)
@@ -271,7 +275,7 @@ For linear models, the adjusted R² is defined as ``1 - (1 - (1-R^2)(n-1)/(n-p))
271275
the coefficient of determination, ``n`` the number of observations, and ``p`` the number of
272276
coefficients (including the intercept). This definition is generally known as the Wherry Formula I.
273277
"""
274-
function adjr2 end
278+
adjr2(model::StatisticalModel)
275279

276280
"""
277281
adjr2(model::StatisticalModel, variant::Symbol)

0 commit comments

Comments
 (0)