predict.smog: predict method for objects of the class smog

Description Usage Arguments Details Value Author(s) References See Also

View source: R/smog.R

Description

predict.smog can produce the prediction for user-given new data, based on the provided fitted model (object) in the S3method of smog. If the newdata omitted, it would output the prediction for the fitted model itself. The yielded result should match with the family in the provided model. See smog.

Usage

1
2
3
## S3 method for class 'smog'
predict(object, newdata = NULL, family = "gaussian",
  ...)

Arguments

object

a fitted object of class inheriting from smog.

newdata

a data frame containing the predictor variables, which are used to predict. If omitted, the fitted linear predictors are used.

family

a description of distribution family for which the response variable is to be predicted.

...

additional arguments affecting the predictions produced.

Details

If newdata = NULL, the fitted.value based on the object is used for the prediction. For family = "coxph", the returned prediction value is the risk score.

Value

If family = "gaussian", a vector of prediction for the response is returned. For family = "coxph", a vector of predicted risk score is returned. When family = ”binomial”, it outputs a data frame containing the predicted group labels and the corresponding probabilies.

Author(s)

Chong Ma, chongma8903@gmail.com.

References

\insertRef

ma2019structuralsmog

See Also

smog.default, smog.formula, cv.smog, plot.smog.


smog documentation built on Aug. 10, 2020, 5:07 p.m.