complexdqlrs {complexlm}R Documentation

An alternative to ⁠.Call(C_Cdqlrs, x * wts, y * wts, tol, FALSE))⁠ that is compatible with complex variables

Description

This serves as a wrapper for qr, replicating the behavior and output of the C++ function C_Cdqlrs. It is used in zlm.wfit, and is unlikely to be needed by end users.

Usage

complexdqlrs(x, y, tol = 1e-07, chk)

Arguments

x

a complex matrix (will also accept numeric, but in that case you might as well use C_Cdqlrs) whose QR decomposition is to be computed.

y

a complex vector or matrix of right-hand side quantities.

tol

the tolerance for detecting linear dependencies in the columns of x. Not used for complex x.

chk

not used. Included to better imitate C_Cdqlrs.

Value

A list that includes the qr decomposition, its coeffcionts, residuals, effects, rank, pivot information, qraux vector, tolerance, and whether or not it was pivoted. This is the same output as C_Cdqlrs.

See Also

base::qr, lm, zlm.wfit, rlm

Examples

set.seed(4242)
n <- 8
slope <- complex(real = 4.23, imaginary = 2.323)
intercept <- complex(real = 1.4, imaginary = 1.804)
x <- complex(real = rnorm(n), imaginary = rnorm(n))
y <- slope * x + intercept
complexdqlrs(x, y, 10^-4, 1.2)

[Package complexlm version 1.1.2 Index]