Learn R Programming

catalytic (version 0.1.0)

get_linear_predictor: Compute Linear Predictor

Description

This function computes the linear predictor from a matrix of predictor variables and a vector of coefficients. It handles cases with and without an intercept term.

Usage

get_linear_predictor(X, coefs)

Value

A vector of linear predictor values.

Arguments

X

A matrix of predictor variables.

coefs

A vector of coefficients. It should be either the same length as the number of columns in X (for models without an intercept) or one more than the number of columns in X (for models with an intercept).