getSummary.robust(tonymisc)
getSummary.robust()所属R语言包:tonymisc
getSummary Methods for Extending mtable()
getSummary方法扩展mtable()
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These functions are getSummary methods for extending the mtable() to report robust standard errors (.robust), IV regression estimates (.ivreg and .tonyiv), summary output from GLS fits (.gls), marginal effects for probit and logit (.mfx), and panel models output (.plm and .pgmm). The robust() command allows the user not only to specify the type of robust standard error correction, but also to specify the set of variables to be included in the summary output.
这些功能是getSummary的报告稳健标准误差(强劲),IV回归的估计(ivreg。tonyiv)的,从GLS的配合(GLS)的摘要输出,边际效应的概率和logit(,延长mtable()方法。 MFX),和面板模型的输出(PLM和。pgmm的)。强大的()命令允许用户不仅指定类型的稳健标准误差校正,而且要包含在总结输出到指定的变量集。
用法----------Usage----------
参数----------Arguments----------
参数:obj
An object of type that matches the method. These functions provide support for ivreg, plm, pgmm, gls and tonyiv objects as well as objects coerced to be of class "robust" and of class "mfx."
的类型相匹配的方法中的一个目的。这些功能提供了支持ivreg,PLM,pgmm,GLS和tonyiv对象以及对象强制转换为类“稳健”类“MFX”。
参数:alpha
Significance Level
显着性水平
参数:...
Arguments passed to getSummary
参数传递到getSummary的
值----------Value----------
Returns a list of objects to be referenced by mtable. Do not use these methods directly. Use mtable, which will automatically call these methods for class objects that have been implemented.
返回一个列表的对象被引用mtable。不要直接使用这些方法。使用mtable已实施的类对象,它会自动调用这些方法。
(作者)----------Author(s)----------
J. Anthony Cookson
参见----------See Also----------
toLatex mtable robust setTabDefault
toLatexmtablerobustsetTabDefault
实例----------Examples----------
## --------------------------------- ##[#---------------------------------##]
## Example 1: Extensions for Robust ##[例1:扩展的鲁棒##]
## --------------------------------- ##[#---------------------------------##]
library(tonymisc)
data(mktshare)
mkt.lm = lm(y~x1+x2+p+z1, data=mktshare)
mkt.rob = robust(mkt.lm) ## Default is hc3 heteroskedasticity corrrection[默认情况下是HC3的异方差性corrrection]
mkt.rob2 = robust(mkt.lm, type = "hc1") ## Can specify hc0, hc1, hc2, hc3[#指定HC0,HC1,HC2,HC3]
mkt.rob3 = robust(mkt.lm, type = "no") ## Can specify type = "no" for not corrected SEs[#指定type =“NO”不纠正社会企业]
mtable(mkt.rob, mkt.rob2, mkt.rob3) ## Coding Kludge: no correction is reported as type = hc9[#编码的kludge:不改正的,报告类型= HC9]
mkt.rob4= robust(mkt.lm, keep="p") ## keeps intercept by default[#默认情况下,保持拦截]
mkt.rob5= robust(mkt.lm, keep=c("x1","p")) ## can keep more than one[#可以保留一个以上的]
mkt.rob6= robust(mkt.lm, keep=c("x1", "p"), drop="(Intercept)") ## Drop intercept.[#删除拦截。]
mtable(mkt.rob4, mkt.rob5, mkt.rob6)
mkt.rob7= robust(mkt.lm, type="no", drop=c("x1","z1")) ## type="no": extends selective output to lm[#类型=“NO”:扩展选择输出流明]
mkt.rob8= robust(mkt.lm, drop="(Intercept)", keep=c("x1", "x2")) ## Can drop intercept and specify keep[#下降拦截,并指定保持]
mtable(mkt.rob7, mkt.rob8)
## ------------------------------- ##[#-------------------------------##]
## Example 2: Extensions for ivreg ##[例2:扩展ivreg##]
## ------------------------------- ##[#-------------------------------##]
library(tonymisc)
data(mktshare)
mkt.aer = ivreg(y~x1+x2+p|x1+x2+z1+z2,data=mktshare)
mkt.aer2 = ivreg(y~x1+x2+p|x1+z1+z2,data=mktshare)
mtable(mkt.aer,mkt.aer2)
## ----------------------------- ##[#-----------------------------##]
## Example 3: Extensions for gls ##[例3:扩展GLS##]
## ----------------------------- ##[#-----------------------------##]
library(tonymisc)
data(mktshare)
mkt.gls1 = gls(y~x1, data=mktshare,correlation=corAR1(form=~1))
mkt.gls2 = gls(y~x1+x2, data=mktshare,correlation=corAR1(form=~1))
mkt.gls3 = gls(y~x1, data=mktshare,correlation=corARMA(p=2,q=2,form=~1))
mtable(mkt.aer,mkt.aer2)
## ----------------------------- ##[#-----------------------------##]
## Example 4: Extensions for mfx ##[例4:扩展MFX##]
## Note: SEs are approximate ##[#注:SES近似##]
## ----------------------------- ##[#-----------------------------##]
library(tonymisc)
library(Ecdat)
data(Yogurt)
yop <- glm(I(choice=="yoplait")~price.yoplait+feat.yoplait, family=binomial, data=Yogurt)
yo_me <- mfx_me(yop) ## Create "mfx" object to trick mtable()[#创建“MFX”对象到招mtable()]
mtable(yop, yo_me) ## produces a table with nice output[#产生一个不错的输出的表]
toLatex(mtable(yop, yo_me)) ## Produces LaTeX code[#产生LaTeX代码]
## ----------------------------- ##[#-----------------------------##]
## Example 5: Extensions for plm ##[例5:扩展PLM##]
## and pgmm ##[#和pgmm##]
## ----------------------------- ## [#-----------------------------##]
library(tonymisc)
library(plm)
## plm Example ##[例如###PLM]
data("Produc", package = "plm")
zz <- plm(log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp, data = Produc, index = c("state","year"))
mtable(zz)
## pgmm Example ##[#pgmm【举例】##]
data("EmplUK", package = "plm")
## Arellano and Bond (1991), table 4b [#阿雷利亚诺和债券(1991年),表4b]
z1 <- pgmm(log(emp) ~ lag(log(emp), 1:2) + lag(log(wage), 0:1)
+ log(capital) + lag(log(output), 0:1) | lag(log(emp), 2:99),
data = EmplUK, effect = "twoways", model = "twosteps")
mtable(z1)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|