Learn R Programming

logicDT (version 1.0.5)

predict.linear: Prediction for linear models

Description

Use new input data and a fitted linear model to predict corresponding outcomes.

Usage

# S3 method for linear
predict(object, Z, ...)

Value

A numeric vector of predictions. For binary outcomes, this is a vector with estimates for

\(P(Y=1 \mid X = x)\).

Arguments

object

Fitted linear model

Z

Numeric vector of new input samples

...

Ignored additional parameters

Details

For binary outcomes, predictions are cut at 0 or 1 for generating proper probability estimates.