Learn R Programming

MASSExtra (version 1.2.2)

gs_orth_modified: Gram-Schmidt orthogonalization

Description

Either classical or modified algorithms. The modified algorithm is the more accurate.

Usage

gs_orth_modified(X)

gs_orth(X)

Value

A list with two components, Q, R, as usually defined.

Arguments

X

a numerical matrix with ncol(X) <= nrow(X)

Examples

Run this code
set.seed(1234)
X <- matrix(rnorm(10*7), 10)
gs_orth_modified(X)
all.equal(gs_orth(X), gs_orth_modified(X))
all.equal(gs_orth_modified(X), givens_orth(X))

Run the code above in your browser using DataLab