Learn R Programming

CovCorTest (version 1.1.0)

get_extended_matrix: Extend a matrix to full rank using identity columns

Description

This function extends a matrix V (assumed to have fewer than p columns) to full rank by iteratively appending standard basis vectors from the identity matrix, ensuring that each added column increases the rank.

Usage

get_extended_matrix(V)

Value

A numeric matrix of dimension p x p with full column rank.

Arguments

V

A numeric matrix with p rows and fewer than p columns.

Details

The function assumes that nrow(V) equals the intended dimension p of the parameter space. It adds columns from the identity matrix (i.e., standard basis vectors) only when they increase the rank, and stops when full rank is achieved.