A utility function to transfer user defined models and estimation methods to an object of class modelObj.
1 2 3
An object of class formula; the model.
An object of class character specifying the name of the R function to be used to obtain parameter estimates. Or, the function to be used to obtain parameter estimates. For example, ‘lm’, ‘glm’, or ‘rpart’. The specified modeling function MUST have a corresponding predict method.
An object of class list containing additional arguments to be sent to solver.method. Arguments must be provided as a list, where the name of each element matches a formal argument of solver.method. For example, if a logistic regression using glm is desired,
solver.method = ``glm"
solver.args = list(``family"=binomial)
A solver.method can takes formal
arguments 'formula' and 'data' as inputs, such as
lm and glm. Some R methods do not use formal names
'formula' and 'data'; a user can indicate if a
different naming convention is used for these two
input arguments. For example, if a method expects
the formula object to be passed through input
A solver.method can also take formal
arguments 'x' and 'y' as inputs, such as glmnet.
Some R methods do not use formal names 'x' and 'y'
to indicate the covariate and response; a user can
indicate if a different naming convention is used
for these two input arguments. For example, if a
method expects the covariate matrix to be passed
through input variable
The name of the R function or the function to be used to obtain
For example, ‘predict.lm’, ‘predict’, or ‘predict.glm’.
If no function is explicitly
given, the generic
A list. Additional arguments to be sent to predict.method. This must be provided as a list, where the name of each element matches a formal argument of predict.method. For example, if a logistic regression using glm was used to fit the model formula object and predictions on the scale of the response are desired,
predict.method = ``predict.glm"
predict.args = list(``type"=``response").
It is assumed that the predict.method has formal arguments “object" and “newdata". If predict.method does not use these formal arguments, predict.args must explicitly indicate the variable names used for these inputs. For example, list(“newx"=“newdata") if the new data is passed to predict.method through input argument “newx".
Unless changed by the user in solver.args and/or predict.args, default settings are assumed for the specified regression and prediction methods.
An object of type modelObj, which contains a complete description of the model, the method to be used for parameter estimates, and the prediction method.
1 2 3 4 5 6 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.