Read in a symmetric matrix from a data file containing the triangle of the matrix and the main diagonal
在从数据文件中含有的三角矩阵的主对角线对称矩阵阅读
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Produces a symmetric matrix (e.g., a covariance matrix) from a file that contains the triangle of the matrix and the main diagonal. Structural equation modeling (SEM) programs often report model-implied covariance matrices by reporting the lower triangle (containing covariances) and the diagonal (containing variances).
从一个文件,该文件包含的矩阵的主对角线的三角形,产生一个对称的矩阵(例如,一个协方差矩阵)。结构方程模型(SEM)方案报告的下三角(含协方差)和对角线(含方差)模型隐含的协方差矩阵。
用法----------Usage----------
ReadSymMatrixFromTriangle(file, n.vars)
参数----------Arguments----------
参数:file
Path to data file containing the triangle and main diagonal of the matrix
数据文件包含的三角形和矩阵的主对角线的路径
参数:n.vars
The number of number of rows and columns in the matrix (i.e., the number of variables)
在矩阵中的行和列的数量(即,变量的数目)的数目
值----------Value----------
A symmetric matrix with n.vars rows and n.vars columns
对称矩阵与n.vars行和n.vars的列
(作者)----------Author(s)----------
Roy Levy <a href="mailto:Roy.Levy@asu.edu">Roy.Levy@asu.edu</a>