Learn R Programming

sstvars (version 1.1.0)

order_B: Reorder columns of a square matrix so that the first nonzero elements are in decreasing order

Description

order_B takes a square matrix B as input and reorders its columns so that the diagonal entries of B are in decreasing order. The function is designed to be computationally efficient and ensures that the input is a square matrix.

Usage

order_B(B)

Value

A square matrix B with columns reordered so that its diagonal entries are in a decreasing order.

Arguments

B

A square numeric matrix.