-
Notifications
You must be signed in to change notification settings - Fork 193
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
Improve consistency of model API #280
Comments
I like all of this except that I'm not a fan of the |
This is probably a separate issue, but would it make sense to merge the |
Yeah. I guess whether to abbreviate
We've discussed this in the past, but I think it's still an open question. I think @kleinschmidt wanted to put only table-related functions in that package, which would mean modeling packages wouldn't even have to depend on it: it would just handle the transformation of formulas + data to a model matrix. Anyway, not really the place to discuss this. |
See also JuliaStats/Roadmap.jl#4. |
Our current
StatisticalModel
API is heavily inspired from R, adapted to match Julia rules (plus some improvements), but it is not really consistent (since R isn't either). Below is a summary of the situation. Names are considered OK if they are either a standard abbreviation, or are spelled in full (and the name is not too long).Names consistent with R and OK:
coef
,nobs
,deviance
,confint
,fitted
,residuals
,predict
,aic
,bic
,aicc
,r2
/r²
,adjr2
,adjr²
,stderr
Names that do not exist in R and are OK:
aicc
,r2
/r²
,adjr2
,adjr²
,stderr
,nulldeviance
Names different from R for good reasons:
dof
,dof_residual
(to avoid two-letter objects, limiting confusion withdf = DataFrame(...)
)Names not consistent with R for bad reasons, and proposed change:
loglikelihood
->loglik
(shorter, relatively standard abbreviation, and consistent with R)nullloglikelihood
->null_loglik
(shorter and more readable; if changed,nulldeviance
should be callednull_deviance
)Names consistent with R which should be changed:
vcov
->cov
model_response
->response
("model" is redundant with multiple dispatch)Name to add and which does not exist in R:
params
,param
orparameters
. The choice depends on whether we accept abbreviations, or prefer full names everywhere. Names which should be changed accordingly include potentiallycoef
,loglikelihood
/nullloglikelihood
,nobs
,adjr2
/adjr²
,confint
anddof
.The text was updated successfully, but these errors were encountered: