Skip to content

Commit

Permalink
added docstring for predict (#227)
Browse files Browse the repository at this point in the history
* added docstring for predict
  • Loading branch information
mkborregaard authored and andreasnoack committed Feb 10, 2017
1 parent ca89b28 commit addbe72
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/statmodels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@ abstract RegressionModel <: StatisticalModel
fitted(obj::RegressionModel) = error("fitted is not defined for $(typeof(obj)).")
model_response(obj::RegressionModel) = error("model_response is not defined for $(typeof(obj)).")
residuals(obj::RegressionModel) = error("residuals is not defined for $(typeof(obj)).")

"""
predict(obj::RegressionModel, [newX])
Form the predicted response of model `obj`. An object with new covariate values `newX` can be supplied,
which should have the same type and structure as that used to fit `obj`; e.g. for a GLM
it would generally be a `DataFrame` with the same variable names as the original predictors.
"""
predict(obj::RegressionModel) = error("predict is not defined for $(typeof(obj)).")
predict!(obj::RegressionModel) = error("predict! is not defined for $(typeof(obj)).")
dof_residual(obj::RegressionModel) = error("dof_residual is not defined for $(typeof(obj)).")
Expand Down

0 comments on commit addbe72

Please sign in to comment.