Skip to content

Commit

Permalink
update statsbase API (#282)
Browse files Browse the repository at this point in the history
* update statsbase API

model_response -> response, import modelmatrix

* also import/export model_response (to avoid breaking API change)
  • Loading branch information
kleinschmidt authored Feb 24, 2019
1 parent dbb0556 commit 49853b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/GLM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ module GLM
import Statistics: cor
import StatsBase: coef, coeftable, confint, deviance, nulldeviance, dof, dof_residual,
loglikelihood, nullloglikelihood, nobs, stderror, vcov, residuals, predict,
fit, model_response, r2, r², adjr2, adjr², PValue
fit, model_response, response, modelmatrix, r2, r², adjr2, adjr², PValue
import StatsFuns: xlogy
import SpecialFunctions: erfc, erfcinv, digamma, trigamma
export coef, coeftable, confint, deviance, nulldeviance, dof, dof_residual,
loglikelihood, nullloglikelihood, nobs, stderror, vcov, residuals, predict,
fit, fit!, model_response, r2, r², adjr2, adjr²
fit, fit!, model_response, response, modelmatrix, r2, r², adjr2, adjr²

export # types
Bernoulli,
Expand Down
2 changes: 1 addition & 1 deletion src/linpred.jl
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ end

modelframe(obj::LinPredModel) = obj.fr
modelmatrix(obj::LinPredModel) = obj.pp.X
model_response(obj::LinPredModel) = obj.rr.y
response(obj::LinPredModel) = obj.rr.y

fitted(m::LinPredModel) = m.rr.mu
predict(mm::LinPredModel) = fitted(mm)
Expand Down

0 comments on commit 49853b1

Please sign in to comment.