qraux(base)
qraux()所属R语言包:base
Reconstruct the Q, R, or X Matrices from a QR Object
从QR对象重建的Q,R或X矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Returns the original matrix from which the object was constructed or the components of the decomposition.
返回从该对象,构建了原矩阵或分解的组成部分。
用法----------Usage----------
qr.X(qr, complete = FALSE, ncol =)
qr.Q(qr, complete = FALSE, Dvec =)
qr.R(qr, complete = FALSE)
参数----------Arguments----------
参数:qr
object representing a QR decomposition. This will typically have come from a previous call to qr or lsfit.
反对较QR分解。这通常来自以前调用qr或lsfit。
参数:complete
logical expression of length 1. Indicates whether an arbitrary orthogonal completion of the \bold{Q} or \bold{X} matrices is to be made, or whether the \bold{R} matrix is to be completed by binding zero-value rows beneath the square upper triangle.
长度为1的逻辑表达。指示是否任意正交完成\bold{Q}或\bold{X}矩阵,或是否\bold{R}矩阵是要通过有约束力的零值下方的广场上三角行完成。
参数:ncol
integer in the range 1:nrow(qr$qr). The number of columns to be in the reconstructed \bold{X}. The default when complete is FALSE is the first min(ncol(X), nrow(X)) columns of the original \bold{X} from which the qr object was constructed. The default when complete is TRUE is a square matrix with the original \bold{X} in the first ncol(X) columns and an arbitrary orthogonal completion (unitary completion in the complex case) in the remaining columns.
整数范围1:nrow(qr$qr)。列数是在重建\bold{X}。默认时complete是FALSE是第一个min(ncol(X), nrow(X))原\bold{X}QR对象从构建列。默认时complete是TRUE是一个与原\bold{X}第一ncol(X)列和任意正交(酉在复杂的情况下完成)完成在方阵其余列。
参数:Dvec
vector (not matrix) of diagonal values. Each column of the returned \bold{Q} will be multiplied by the corresponding diagonal value. Defaults to all 1s.
向量(矩阵)的对角线值。每列返回\bold{Q}将乘以相应的对角线值。所有1的默认。
值----------Value----------
qr.X returns \bold{X}, the original matrix from which the qr object was constructed, provided ncol(X) <= nrow(X). If complete is TRUE or the argument ncol is greater than ncol(X), additional columns from an arbitrary orthogonal (unitary) completion of X are returned.
qr.X返回\bold{X},提供原始矩阵QR对象,构建了ncol(X) <= nrow(X)的。如果complete是TRUE或参数ncol比ncol(X),从任意一个正交(酉)完成X返回额外的列。
qr.Q returns part or all of Q, the order-nrow(X) orthogonal (unitary) transformation represented by qr. If complete is TRUE, Q has nrow(X) columns. If complete is FALSE, Q has ncol(X) columns. When Dvec is specified, each column of Q is multiplied by the corresponding value in Dvec.
qr.Q回报部分或全部的Q,订单NROW的(X)的正交(酉)qr代表的改造。 complete如果是TRUE,问有nrow(X)列。 complete如果是FALSE,问有ncol(X)列。当Dvec指定,每列的Q乘以相应的值在Dvec。
qr.R returns R. The number of rows of R is either nrow(X) or ncol(X) (and may depend on whether complete is TRUE or FALSE.
qr.R返回R. R的行数是要么nrow(X)或ncol(X)(可能取决于是否complete是TRUE或FALSE 。
参见----------See Also----------
qr, qr.qy.
qr,qr.qy。
举例----------Examples----------
p <- ncol(x <- LifeCycleSavings[,-1]) # not the 'sr'[不是SR]
qrstr <- qr(x) # dim(x) == c(n,p)[昏暗的(X)== C(N,P)]
qrstr $ rank # = 4 = p[= 4 = P]
Q <- qr.Q(qrstr) # dim(Q) == dim(x)[昏暗(问)==暗淡(X)]
R <- qr.R(qrstr) # dim(R) == ncol(x)[暗淡(R)的== NCOL(X)]
X <- qr.X(qrstr) # X == x[X == X]
range(X - as.matrix(x))# ~ < 6e-12[〜<6E-12]
## X == Q %*% R if there has been no pivoting, as here.[#X == Q%*%R如果没有枢轴这里,一直。]
Q %*% R
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|