readMoments(sem)
readMoments()所属R语言包:sem
Input a Covariance, Correlation, or Raw Moment Matrix
输入的协方差,相关,或原始矩矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This functions makes it simpler to input covariance, correlation, and raw-moment matrices to be analyzed by the sem function. The matrix is input in lower-triangular form on as many lines as is convenient, omitting the above-diagonal elements. The elements on the diagonal may also optionally be omitted, in which case they are taken to be 1.
此功能使得它简单的输入协方差,相关,与原始矩矩阵进行分析,sem功能。该矩阵是下三角形式的输入一样多的行上是方便,省略了上述的对角元素。在对角线上的元素也可以任选被省略,在这种情况下,它们被取为1。
用法----------Usage----------
readMoments(file="", diag=TRUE,
names=as.character(paste("X", 1:n, sep = "")))
参数----------Arguments----------
参数:file
The (quoted) file from which to read the model specification, including the path to the file if it is not in the current directory. If "" (the default), then the specification is read from the standard input stream, and is terminated by a blank line.
(引用)文件,从中读取的模型规范,包括文件的路径,如果它不是在当前目录中。如果""(默认值),然后该规范从标准输入流中读取,并用一个空行终止。
参数:diag
If TRUE (the default), then the input matrix includes diagonal elements.
如果TRUE(默认值),然后输入矩阵对角线元素。
参数:names
a character vector containing the names of the variables, to label the rows and columns of the moment matrix.
字符向量含有的变量的名称,标记的时刻矩阵的行和列。
值----------Value----------
Returns a lower-triangular matrix (i.e., with zeroes above the main diagonal) suitable for input to sem.
返回一个下三角矩阵(即零以上的主对角线)适用于输入到sem。
(作者)----------Author(s)----------
John Fox <a href="mailto:jfox@mcmaster.ca">jfox@mcmaster.ca</a>
参见----------See Also----------
sem
sem
实例----------Examples----------
## Not run: [#不运行:]
R.DHP <- readMoments(diag=FALSE, names=c("ROccAsp", "REdAsp", "FOccAsp",
"FEdAsp", "RParAsp", "RIQ", "RSES", "FSES", "FIQ", "FParAsp"))
.6247
.3269 .3669
.4216 .3275 .6404
.2137 .2742 .1124 .0839
.4105 .4043 .2903 .2598 .1839
.3240 .4047 .3054 .2786 .0489 .2220
.2930 .2407 .4105 .3607 .0186 .1861 .2707
.2995 .2863 .5191 .5007 .0782 .3355 .2302 .2950
.0760 .0702 .2784 .1988 .1147 .1021 .0931 -.0438 .2087
R.DHP
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|