From addbe724eea6d7dc2af40d05010e0ac270f608e7 Mon Sep 17 00:00:00 2001 From: Michael Krabbe Borregaard Date: Fri, 10 Feb 2017 13:22:15 +0100 Subject: [PATCH] added docstring for predict (#227) * added docstring for predict --- src/statmodels.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/statmodels.jl b/src/statmodels.jl index a0e14a81c..97b69a514 100644 --- a/src/statmodels.jl +++ b/src/statmodels.jl @@ -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)).")