Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

DataFrame2Matrix4Regression

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

Multivariate Analysis Using Biplots in R

v1.3.30
GPL (>= 2)
Authors
Jose Luis Vicente-Villardon
Initial release
2021-03-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.