DataFrame2Matrix4Regression: Prepares a matrix for regression from a data frame

View source: R/DataFrame2Matrix4Regression.R

DataFrame2Matrix4RegressionR Documentation

Prepares a matrix for regression from a data frame

Description

Prepares a matrix for regression from a data frame

Usage

DataFrame2Matrix4Regression(X, last = TRUE, Intercept = FALSE)

Arguments

X

A data frame

last

Logical to use the last category of nominal variabless as baseline.

Intercept

Logical to tell the function if a constant must be present

Details

Nominal variables are converted to a matrix of dummy variables for regression.

Value

A matrix ready to use as independent variables in a regression

Author(s)

Jose Luis Vicente Vilardon

Examples

##---- Should be DIRECTLY executable !! ----

MultBiplotR documentation built on Nov. 21, 2023, 5:08 p.m.