matinv(rms)
matinv()所属R语言包:rms
Total and Partial Matrix Inversion using Gauss-Jordan Sweep Operator
完全和部分矩阵反转使用高斯 - 约旦扫描的操作
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function inverts or partially inverts a matrix using pivoting (the sweep operator). It is useful for sequential model-building.
此功能反转或部分反转矩阵,利用旋转(扫运营商)。它是有用的序列模型建立。
用法----------Usage----------
matinv(a, which, negate=TRUE, eps=1e-12)
参数----------Arguments----------
参数:a
square matrix to invert or partially invert. May have been inverted or partially inverted previously by matinv, in which case its "swept" attribute is updated. Will un-invert if already inverted.
方形矩阵倒置或部分反转。可能已被反转或部分反转先前由matinv更新,在这种情况下,它的“扫掠”属性。未反转,如果已经倒。
参数:which
vector of column/row numbers in a to invert. Default is all, for total inverse.
矢量在一个颠倒的行/列号。默认是全部,总的逆。
参数:negate
So that the algorithm can keep track of which pivots have been swept as well as roundoff errors, it actually returns the negative of the inverse or partial inverse. By default, these elements are negated to give the usual expected result. Set negate=FALSE if you will be passing the result right back into matinv, otherwise, negate the submatrix before sending back to matinv.
因此,该算法可以跟踪的支点已经风靡以及舍入误差,它实际上返回的负面的逆或部分的逆。默认情况下,这些因素都否定了,给通常预期的结果。设置否定= FALSE,否则,如果你将结果传递回matinv否定的子阵前发送回matinv。
参数:eps
singularity criterion </table>
奇异标准</ TABLE>
值----------Value----------
a square matrix, with attributes "rank" and "swept".
一个方阵,属性“等级”和“横扫”。
参考文献----------References----------
with detection of collinearity. Appl Statist 31:166–9.
The Gauss-Jordan sweep operator with detection of collinearity. Appl Statist 38:420–2.
参见----------See Also----------
lrm, solve
lrm,solve
实例----------Examples----------
a <- diag(1:3)
a.inv1 <- matinv(a, 1, negate=FALSE) #Invert with respect to a[1,1][反转相对于一个[1,1]]
a.inv1
a.inv <- -matinv(a.inv1, 2:3, negate=FALSE) #Finish the job[完成作业]
a.inv
solve(a)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|