找回密码
 注册
查看: 2006|回复: 0

R语言 sem包 bootSem()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 00:47:09 | 显示全部楼层 |阅读模式
bootSem(sem)
bootSem()所属R语言包:sem

                                        Bootstrap a Structural Equation Model
                                         引导结构方程模型

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Bootstraps a structural equation model in an sem object (as returned by the sem function).
白手起家结构方程模型在sem对象(返回的sem功能的)。


用法----------Usage----------


bootSem(model, R=100, cov=cov, data=model$data, ...)

## S3 method for class 'bootsem'
print(x, digits=getOption("digits"), ...)

## S3 method for class 'bootsem'
summary(object,
    type=c("perc", "bca", "norm", "basic", "none"), level=0.95, ...)



参数----------Arguments----------

参数:model
an sem object, produced by the sem function.
sem对象,产生的sem功能。


参数:R
the number of bootstrap replications; the default is 100, which should be enough for computing standard errors, but not confidence intervals (except for the normal-theory intervals).
引导复制的数量,默认是100,应该是足够的计算标准错误,但没有信心间隔(除正常理论间隔)。


参数:cov
a function to compute the input covariance or moment matrix; the default is cov. Use cor if the model is fit to the correlation matrix. The function hetcor in the  polycor package will compute product-moment, polychoric, and polyserial correlations among mixed continuous and ordinal variables (see the example below for an illustration).
一个函数来计算的输入协方差或者矩矩阵,默认为cov。使用cor如果模型拟合的相关系数矩阵。的功能hetcor中polycor包将计算的产品时刻,polychoric,并polyserial的相关性之间的连续和有序变量(见下面的例子中的插图)。


参数:data
a data frame or numeric matrix containing the data to which the model was fit; note that the original observations are required, not just the covariance  matrix of the observed variables in the model. The default is the data set stored in the sem object, which will be present only if the model was fit to a data set rather than a covariance or moment matrix.
数据框或数字矩阵包含的数据的模型是合适的,注意的原始观测值,而不仅仅是所观察到的变量在模型中的协方差矩阵。数据集中存放在sem对象,这将是目前只有适用于该模型的数据的协方差矩矩阵,而不是默认的。


参数:x, object
an object of class bootsem.
对象类bootsem。


参数:digits
controls the number of digits to print.
控制打印的位数的数目。


参数:type
type of bootstrapped confidence intervals to compute; the default is "perc" (percentile); see  boot.ci for details.
的自举置信区间的计算类型,默认为"perc"(百分位数); boot.ci的详细信息。


参数:level
level for confidence intervals; default is 0.95.
置信区间,默认为0.95。


参数:...
in bootSem, arguments to be passed to  sem; otherwise ignored.  
在bootSem,sem,否则忽略的参数传递。


Details

详细信息----------Details----------

bootSem implements the nonparametric bootstrap, assuming an independent random sample. Convergence failures in the bootstrap resamples are discarded (and a warning printed); 10 consecutive convergence failures result in an error. You can use the boot function in the boot package for more complex sampling schemes and additional options.
bootSem实现的非参数引导,假设一个独立的随机样本。在引导重采样被丢弃的收敛失败(警告打印); 10个连续的收敛失败将导致错误。您可以使用boot功能在开机包更复杂的抽样方案和其他选项。

Bootstrapping is implemented by resampling the observations in data, recalculating the input covariance matrix with cov, and refitting the model with sem, using the parameter estimates from the original sample as start-values.
自举是通过重采样的观测data,重新计算输入与cov,协方差矩阵和模型sem重新安装,使用参数估计,从原始样本值。

Warning: the bootstrapping process can be very time-consuming.
警告:引导过程是非常耗时的。


值----------Value----------

bootSem returns an object of class bootsem, which inherits from class boot, supported by the boot package. The returned object contains the following components:
bootSem返回一个类的对象bootsem,它继承自类boot,支持的boot包。返回的对象包含以下组件:


参数:t0
the estimated parameters in the model fit to the original data set.
模型中的参数的估计适合原始数据集。


参数:t
a matrix containing the bootstrapped estimates, one bootstrap replication per row.
矩阵中的自举的估计,每行一个引导复制。


参数:data
the data frame containing the data to which the model was fit.
数据框包含的数据的模型适合。


参数:seed
the value of .Random.seed when bootSem was called.   
值.Random.seedbootSem被称为。


参数:statistic
the function used to produce the bootstrap replications; this is always the local function refit from bootSem.
功能用于生产的引导复制,这始终是本地函数refitbootSem。


参数:sim
always set to "ordinary"; see the documentation for the boot function.
始终设置为"ordinary",参见的文档boot功能。


参数:stype
always set to "i"; see the documentation for the boot function.
始终设置为"i",参见的文档boot功能。


参数:call
the call of the bootSem function.
的呼唤bootSem功能。


参数:strata
always a vector of ones.  
始终是一个向量。


(作者)----------Author(s)----------


John Fox <a href="mailto:jfox@mcmaster.ca">jfox@mcmaster.ca</a>



参考文献----------References----------

Bootstrap Methods and their Application. Cambridge.
An Introduction to the Bootstrap. Chapman and Hall.

参见----------See Also----------

boot, sem
boot,sem


实例----------Examples----------


    ## Not run: [#不运行:]

# A simple confirmatory factor-analysis model using polychoric correlations.[一个简单的验证性因素分析模型中使用polychoric的相关性。]
#  The polycor package is required for the hetcor function.[polycor包需要的HETCOR功能。]

library(polycor)

# The following function returns correlations computed by hetcor,[下面的函数返回的HETCOR的相关性计算,]
#   and is used for the bootstrapping.[并用于自举。]

hcor <- function(data) hetcor(data, std.err=FALSE)$correlations

model.cnes <- specifyModel()
F -> MBSA2, lam1
F -> MBSA7, lam2
F -> MBSA8, lam3
F -> MBSA9, lam4
F <-> F, NA, 1
MBSA2 <-> MBSA2, the1
MBSA7 <-> MBSA7, the2
MBSA8 <-> MBSA8, the3
MBSA9 <-> MBSA9, the4

R.cnes <- hcor(CNES)

sem.cnes <- sem(model.cnes, R.cnes, N=1529)
summary(sem.cnes)

#  Note: this can take a couple of minutes:[注意:这可能需要几分钟的时间:]

system.time(boot.cnes <- bootSem(sem.cnes, R=100, cov=hcor, data=CNES))
summary(boot.cnes, type="norm")  
# cf., standard errors to those computed by summary(sem.cnes)[CF,标准差计算的摘要(sem.cnes)]
   
## End(Not run)[#(不执行)]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-5-19 04:26 , Processed in 0.024034 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表