predict.GLM.RdSimilar to other predict methods, this function predicts fitted values from a fitted "GLM" object.
# S3 method for GLM predict( model, data, key, features = NULL, prediction.type = NULL, significance.level = NULL, handle.missing = NULL )
| model |
|
|---|---|
| data |
|
| key |
|
| features |
|
| prediction.type |
|
| significance.level |
|
| handle.missing |
Defaults to "remove". |
S3 methods
Dataframe Predicted values, structured as follows. The following two columns are always populated:
ID column, with same name and type as data's ID column.
PREDICTION, type NVARCHAR(100), representing predicted values.
The following five columns are only populated for IRLS:
SE, type DOUBLE. Standard error, or for ordinal regression, the probability that the data point belongs to the predicted category.
CI_LOWER, type DOUBLE. Lower bound of the confidence interval.
CI_UPPER, type DOUBLE. Upper bound of the confidence interval.
PI_LOWER, type DOUBLE. Lower bound of the prediction interval.
PI_UPPER, type DOUBLE. Upper bound of the prediction interval.
DataFrame data2 for prediction:
> data2$Collect()
ID X
1 1 -1
2 2 0
3 3 1
4 4 2
Call the function and obtain the result:
> predict(glm, data2, key="ID")$Collect()
ID PREDICTION
1 1 0.25543735346197155
2 2 0.744562646538029
3 3 2.1702915689746476
4 4 6.32608352871737