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

break_up_matrix_term

Sometimes there can be terms in a formula that refer to a matrix instead of a single predictor. Because we can handle search_terms of predictors, this function breaks the matrix term into individual predictors to handle separately, as that is probably the intention of the user.


Description

Sometimes there can be terms in a formula that refer to a matrix instead of a single predictor. Because we can handle search_terms of predictors, this function breaks the matrix term into individual predictors to handle separately, as that is probably the intention of the user.

Usage

break_up_matrix_term(formula, data)

Arguments

formula

A formula for a valid model.

data

The original data frame with a matrix as predictor.

Value

a list containing the expanded formula and the expanded data frame.


projpred

Projection Predictive Feature Selection

v2.0.2
GPL-3
Authors
Juho Piironen [aut], Markus Paasiniemi [aut], Alejandro Catalina [cre, aut], Aki Vehtari [aut], Jonah Gabry [ctb], Marco Colombo [ctb], Paul-Christian Bürkner [ctb]
Initial release

We don't support your browser anymore

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