ensureSpecFullRank: Ensure that a regression specification is full rank

View source: R/matrix_helpers.R

ensureSpecFullRankR Documentation

Ensure that a regression specification is full rank

Description

Ensure that a regression specification is full rank

Usage

ensureSpecFullRank(spec_mat, col_names)

Arguments

spec_mat

An M by N regression specification matrix, where M > N.

col_names

Column names of the regression specification.

Details

Verifies if a regression specification is full-rank. If the input is rank-deficient, identifies and drops columns so that the remaining matrix is full-rank.

Value

A full-rank specification matrix. If the input is full-rank, returns the input unmodified. Otherwise, returns a matrix with a subset of the columns from the input.


be-green/quantspace documentation built on March 20, 2024, 5:30 p.m.