semdiag(semdiag)
semdiag()所属R语言包:semdiag
The semdiag function
semdiag功能
译者:生物统计家园网 机器人LoveR
描述----------Description----------
A function to calculate distance and parameter estimates for SEM diagnostics
一个函数来计算距离和参数估计SEM诊断
用法----------Usage----------
参数----------Arguments----------
参数:x
Data frame or data matrix
数据框或数据矩阵
参数:ram.path
Ram path for R sem package
RAM的R SEM包的路径
参数:software
Software to be used. sem for R sem package and EQS for the use of EQS
软件来使用。 sem的R SEM包和EQS的使用EQS
参数:varphi
Percentage of data to be down-weighted
的百分比的数据向下加权
参数:EQSmodel
EQS input file name
EQS输入文件名
参数:EQSdata
Data file name used in EQS input file
数据文件名在EQS输入文件
参数:D
How to treat prediction error. E: errors; F: factors
如何把预测误差。 E:错误F:因素
参数:delete
A vector of data to be deleted. For example c(99,100) delete the 99th and 100th cases.
的矢量数据将被删除。例如c(99,100)删除第99和100的情况下。
参数:max_it
The maximum number of iterations
迭代的最大数量
参数:EQSprog
The path to where EQS program is installed.
的路径安装EQS程序。
参数:serial
Serial no. for EQS. This is a string with spaces. Currently, it does not need to be supplied.
序列号。 EQS。这是一个带有空格的字符串。目前,它并不需要被供给。
值----------Value----------
参数:d_f
Distance for f
距离为f
参数:d_r
Distance for r
距离为r
参数:mu
Mean
意味着
参数:p
Number of observed variables
观测变量的数量
参数:q
Number of factors used in calculating f and r
用来计算f和r的因素的数量
参数:res
Model fit and paramter estimates. nml: normal ML; tsr: two-stagte robust; dr: direct robust
模型拟合放慢参数估计。 NML:正常ML TSR:两stagte强大的博士:直接健壮的
参数:eqs
Full EQS output for the above three models
以上三种模式的全EQS输出
参数:x
Data
数据
(作者)----------Author(s)----------
Zhiyong Zhang and Ke-Hai Yuan
Maintainer: Zhiyong Zhang <zhiyongzhang@nd.edu>
参考文献----------References----------
实例----------Examples----------
## Not run: [#不运行:]
## Examples based on EQS[#示例的基础上EQS]
library(semdiag)
## Example 1. Normally distributed data[#示例1。正态分布数据]
data(N100)
## Not run[#不运行]
## The EQS input file is semplot.eqs[#EQS输入文件是semplot.eqs]
## Model 1: treating prediction errors as factors[#模式1:治疗预测误差的因素]
N100out.1<-semdiag(N100, 'semplot.eqs', D='F')
## Diagnostics plot[#诊断图]
semdiag.plot(N100out.1)
## Summary output [#摘要输出]
semdiag.summary(N100out.1)
## Model 0: treating prediction errors the same as measurement errors[#型号0:处理相同的测量误差预测误差]
N100out.0<-semdiag(N100, 'semplot.eqs')
## Diagnostics plot[#诊断图]
semdiag.plot(N100out.0)
## Summary output [#摘要输出]
semdiag.summary(N100out.0)
## Example 2. Contaminated data[#例2。污染数据]
data(N85)
## The EQS input file is semplot.eqs[#EQS输入文件是semplot.eqs]
## Model 1: treating prediction errors as factors[#模式1:治疗预测误差的因素]
N85out.1<-semdiag(N85, 'semplot.eqs', D='F')
## Diagnostics plot[#诊断图]
semdiag.plot(N85out.1)
## Summary output [#摘要输出]
semdiag.summary(N85out.1)
## Model 0: treating prediction errors the same as measurement errors[#型号0:处理相同的测量误差预测误差]
N85out.0<-semdiag(N85, 'semplot.eqs', D='E')
## Diagnostics plot[#诊断图]
semdiag.plot(N85out.0)
## Summary output [#摘要输出]
semdiag.summary(N85out.0)
## Case profile plot[#如果剖面图]
semdiag.cpp(N85out.0, cases=c(86, 90, 98:100))
## Delete the 99th and 100th observations[#删除第99和第100观察]
N85out.1.del<-semdiag(N85, 'semplot.eqs', D='F', delete=c(99,100))
## Examples based on the sem package[#根据扫描电镜包]
library(sem)
data(N100)
## path diagram for the model[#为模型的路径图]
sem1<-specify.model()
f1 -> y1, NA, 1
f1 -> y2, l1, NA
f1 -> y3, l2, NA
f2 -> y4, NA, 1
f2 -> y5, l3, NA
f2 -> y6, l4, NA
f3 -> y7, NA, 1
f3 -> y8, l5, NA
f3 -> y9, l6, NA
f1 -> f2, g1, NA
f1 -> f3, g2, NA
f2 -> f3, g3, NA
y1 <-> y1, e1, NA
y2 <-> y2, e2, NA
y3 <-> y3, e3, NA
y4 <-> y4, e4, NA
y5 <-> y5, e5, NA
y6 <-> y6, e6, NA
y7 <-> y7, e7, NA
y8 <-> y8, e8, NA
y9 <-> y9, e9, NA
f1 <-> f1, e10, NA
f2 <-> f2, e11, NA
f3 <-> f3, e12, NA
## Model 1: treating prediction errors as factors[#模式1:治疗预测误差的因素]
N100out.1<-semdiag(N100, ram.path=sem1, software='sem', D='F')
## Diagnostics plot[#诊断图]
semdiag.plot(N100out.1)
## Summary output [#摘要输出]
semdiag.summary(N100out.1)
## Model 0: treating prediction errors the same as measurement errors[#型号0:处理相同的测量误差预测误差]
N100out.0<-semdiag(N100, ram.path=sem1, software='sem')
## Diagnostics plot[#诊断图]
semdiag.plot(N100out.0)
## Summary output [#摘要输出]
semdiag.summary(N100out.0)
## Example 2. Contaminated data[#例2。污染数据]
data(N85)
## Model 1: treating prediction errors as factors[#模式1:治疗预测误差的因素]
N85out.1<-semdiag(N85, ram.path=sem1, software='sem', D='F')
## Diagnostics plot[#诊断图]
semdiag.plot(N85out.1)
## Summary output [#摘要输出]
semdiag.summary(N85out.1)
## Model 0: treating prediction errors the same as measurement errors[#型号0:处理相同的测量误差预测误差]
N85out.0<-semdiag(N85, ram.path=sem1, software='sem', D='E')
## Diagnostics plot[#诊断图]
semdiag.plot(N85out.0)
## Summary output [#摘要输出]
semdiag.summary(N85out.0)
## Case profile plot[#如果剖面图]
semdiag.cpp(N85out.0, cases=c(86, 90, 98:100))
## Delete the 99th and 100th observations[#删除第99和第100观察]
N85out.1.del<-semdiag(N85, ram.path=sem1, software='sem', D='F', delete=c(99,100))
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|