tsls(sem)
tsls()所属R语言包:sem
Two-Stage Least Squares
两阶段最小二乘法
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fits a regression equation, such as an equation in a structural-equation model, by two-stage least squares. This is equivalent to direct instrumental-variables estimation when the number of instruments is equal to the number of predictors.
适合的结构方程模型的方程的回归方程,如,通过两阶段最小二乘。这是相当于直接器乐变量估计,当仪器的数量是相等的预测变量数。
用法----------Usage----------
## S3 method for class 'formula'[类formula的方法]
tsls(formula, instruments, data, subset, weights,
na.action, contrasts=NULL, ...)
## Default S3 method:[默认方法]
tsls(y, X, Z, w, names=NULL, ...)
## S3 method for class 'tsls'
print(x, ...)
## S3 method for class 'tsls'
summary(object, digits=4, ...)
## S3 method for class 'tsls'
anova(object, model.2, s2, dfe, ...)
## S3 method for class 'tsls'
fitted(object, ...)
## S3 method for class 'tsls'
residuals(object, ...)
## S3 method for class 'tsls'
coef(object, ...)
## S3 method for class 'tsls'
vcov(object, ...)
参数----------Arguments----------
参数:formula
model formula for structural equation to be estimated; a regression constant is implied if not explicitly omitted.
结构方程模型公式进行估计的回归常数是隐含的,如果没有明确的省略。
参数:instruments
one-sided model formula specifying instrumental variables.
片面指定工具变量的模型公式。
参数:data
an optional data frame containing the variables in the model. By default the variables are taken from the environment from which tsls is called.
一个可选的数据框包含在模型中的变量。默认情况下,变量tsls被称为环境。
参数:subset
an optional vector specifying a subset of observations to be used in fitting the model.
一个可选的矢量指定的一个子集被用于拟合模型的观测。
参数:weights, w
an optional vector of weights to be used in the fitting process; if specified should be a non-negative numeric vector with one entry for each observation, to be used to compute weighted 2SLS estimates.
可选要用于在嵌合过程中,如果指定的权重向量,应该是一个非负的数值向量用一个条目为每个观测值,被用于计算加权2SLS估计。
参数:na.action
a function that indicates what should happen when the data contain NAs. The default is set by the na.action option.
一个函数,表示会发生什么,当数据包含NA的。 na.action选项的默认设置。
参数:contrasts
an optional list. See the contrasts.arg argument of model.matrix.default.
可选列表。请参阅contrasts.argmodel.matrix.default参数。
参数:y
Response-variable vector.
响应变量向量。
参数:X
Matrix of predictors, including a constant (if one is in the model).
矩阵的预测,其中包括一个常数(如果一个人在模型中)。
参数:Z
Matrix of instrumental variables, including a constant (if one is in the model).
矩阵的工具变量,包括一个常数(如果一个人在模型中)。
参数:names
optional character vector of names for the columns of the X matrix.
可选字符X矩阵的列向量的名称。
参数:x, object, model.2
objects of class tsls returned by tsls.formula, for anova containing nested models to be compared by an incremental F-test. One model should be nested in the other; the order of models is immaterial.
类的对象tsls返回tsls.formula,anova包含嵌套的增量F测试模型进行比较。一个模型应该被嵌套在另一个模型的顺序是无关紧要的。
参数:s2
an optional estimate of error variance for the denominator of the F-test. If missing, the error-variance estimate is taken from the larger model.
一个可选的估计误差方差的分母F测试。如果缺少,估计误差方差从更大的模型。
参数:dfe
optional error degrees of freedom, to be specified when an estimate of error variance is given.
可选的错误程度的自由度,将被指定时的估计误差方差给出。
参数:digits
number of digits for summary output.
摘要输出的数字。
参数:...
arguments to be passed down.
参数传递下来。
值----------Value----------
tsls.formula returns an object of class tsls, with the following components:
tsls.formula返回一个对象类tsls,有以下组件:
参数:n
number of observations.
若干意见。
参数:p
number of parameters.
数目的参数。
参数:coefficients
parameter estimates.
参数估计值。
参数:V
estimated covariance matrix of coefficients.
估计的协方差矩阵的系数。
参数:s
residual standard error.
剩余标准差。
参数:residuals
vector of residuals.
残差向量。
参数:response
vector of response values.
响应值的矢量。
参数:X
model matrix.
模型矩阵。
参数:Z
instrumental-variables matrix.
器乐变量矩阵。
参数:response.name
name of response variable, or expression evaluating to response.
响应变量或表达式响应的名称。
参数:formula
model formula.
模型公式。
参数:instruments
one-sided formula for instrumental variables.
片面的工具变量的公式。
(作者)----------Author(s)----------
John Fox <a href="mailto:jfox@mcmaster.ca">jfox@mcmaster.ca</a>
参考文献----------References----------
Simultaneous equation models and two-stage least-squares. In Schuessler, K. F. (ed.) Sociological Methodology 1979, Jossey-Bass.
Econometric Analysis, Second Edition, Macmillan.
参见----------See Also----------
sem
sem
实例----------Examples----------
summary(tsls(Q ~ P + D, ~ D + F + A, data=Kmenta)) # demand equation[需求方程]
summary(tsls(Q ~ P + F + A, ~ D + F + A, data=Kmenta)) # supply equation[供给方程]
anova(tsls(Q ~ P + F + A, ~ D + F + A, data=Kmenta),
tsls(Q ~ 1, ~ D + F + A, data=Kmenta))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|