effects.sem(sem)
effects.sem()所属R语言包:sem
Total, Direct, and Indirect Effects for Structural Equation Models
结构方程模型的全部,直接和间接影响
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The sem method for the standard generic function effects computes total, direct, and indirect effects for a fitted structural equation model according to the method described in Fox (1980).
sem方法标准的通用功能effects的拟合结构方程模型计算总的,直接的和间接的影响,根据福克斯(1980年)中所描述的方法。
用法----------Usage----------
## S3 method for class 'sem'
effects(object, ...)
## S3 method for class 'msem'
effects(object, ...)
## S3 method for class 'semeffects'
print(x, digits = getOption("digits"), ...)
## S3 method for class 'semeffectsList'
print(x, digits = getOption("digits"), ...)
参数----------Arguments----------
参数:object
a fitted structural-equation model object produced by the sem function.
合身的结构方程模型对象产生的sem功能。
参数:x
an object of class semeffects or semeffectsList, produced by effects.
类的一个对象semeffects或semeffectsList,产生的effects。
参数:digits
digits to print.
数字打印。
参数:...
not used.
不被使用。
值----------Value----------
effect.sem returns an object of class semeffects with Total, Direct, and Indirect elements.
effect.sem返回一个类的对象semeffectsTotal,Direct和Indirect元素。
(作者)----------Author(s)----------
John Fox <a href="mailto:jfox@mcmaster.ca">jfox@mcmaster.ca</a>
参考文献----------References----------
Effect analysis in structural equation models: Extensions and simplified methods of computation. Sociological Methods and Research 9, 3–28.
参见----------See Also----------
sem
sem
实例----------Examples----------
## Not run: [#不运行:]
# These examples are from Fox (1980)[这些例子都来自福克斯(1980年)]
# In the first pair of examples, readMoments() and specifyModel() read from the[在第一个例子,readMoments()和specifyModel()对读出的]
# input stream. These examples cannot be executed via example() but can be entered[输入流。这些实施例不能被执行通过例如(),但可以输入]
# at the command prompt. The Blau and Duncan example is repeated using file input;[在命令提示符下。布劳和邓肯的例子是重复使用的文件输入;]
# this example can be executed via example(). [这个例子中,可以执行通过例如()。]
# The recursive Blau and Duncan basic stratification model:[布劳和邓肯的递归基本分层模型:]
# x1 is father's education, x2 father's SES, y3 respondent's education,[X1 X2父亲的父亲的教育,SES,Y3答辩的教育,]
# y4 SES of respondent's first job, y5 respondent's SES in 1962[Y4,Y5答辩人在1962年SES SES答辩人的第一份工作]
R.bd <- readMoments(names=c("x1", "x2", "y3", "y4", "y5"))
1
.516 1
.453 .438 1
.332 .417 .538 1
.322 .405 .596 .541 1
mod.bd <- specifyModel()
y3 <- x1, gam31
y3 <- x2, gam32
y4 <- x2, gam42
y4 <- y3, beta43
y5 <- x2, gam52
y5 <- y3, beta53
y5 <- y4, beta54
sem.bd <- sem(mod.bd, R.bd, N=20700, fixed.x=c("x1", "x2"))
summary(sem.bd)
effects(sem.bd)
# The nonrecursive Duncan, Haller, and Portes peer-influences model for observed variables:[的非递归邓肯,哈勒,和波特斯对等观测变量的影响模型:]
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
model.dhp <- specifyModel()
RIQ -> ROccAsp, gam51, NA
RSES -> ROccAsp, gam52, NA
FSES -> FOccAsp, gam63, NA
FIQ -> FOccAsp, gam64, NA
FOccAsp -> ROccAsp, beta56, NA
ROccAsp -> FOccAsp, beta65, NA
ROccAsp <-> ROccAsp, ps55, NA
FOccAsp <-> FOccAsp, ps66, NA
ROccAsp <-> FOccAsp, ps56, NA
# Note: The following generates a warning because not all of the variables[注意:下面的命令生成一个警告,因为不是所有的变量]
# in the correlation matrix are used[的相关矩阵中的使用]
sem.dhp <- sem(model.dhp, R.DHP, 329,
fixed.x=c('RIQ', 'RSES', 'FSES', 'FIQ'))
summary(sem.dhp)
effects(sem.dhp)
## End(Not run)[#(不执行)]
## the following example may be executed via example()[#可以执行下面的例子,通过例子()]
etc <- file.path(.path.package(package="sem")[1], "etc") # path to data and model files[数据和模型文件的路径]
# The recursive Blau and Duncan basic stratification model:[布劳和邓肯的递归基本分层模型:]
# x1 is father's education, x2 father's SES, y3 respondent's education,[X1 X2父亲的父亲的教育,SES,Y3答辩的教育,]
# y4 SES of respondent's first job, y5 respondent's SES in 1962[Y4,Y5答辩人在1962年SES SES答辩人的第一份工作]
(R.bd <- readMoments(file=file.path(etc, "R-Blau-Duncan.txt"),
names=c("x1", "x2", "y3", "y4", "y5")))
(mod.bd <- specifyModel(file=file.path(etc, "model-Blau-Duncan.txt")))
sem.bd <- sem(mod.bd, R.bd, N=20700, fixed.x=c("x1", "x2"))
summary(sem.bd)
effects(sem.bd)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|