楼主: janyiyi
1055 0

R to Latex packages: Coverage [推广有奖]

  • 3关注
  • 17粉丝

讲师

27%

还不是VIP/贵宾

-

威望
0
论坛币
3206 个
通用积分
5056.6800
学术水平
539 点
热心指数
537 点
信用等级
538 点
经验
10157 点
帖子
300
精华
2
在线时间
90 小时
注册时间
2010-10-3
最后登录
2024-4-6

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
By Will

There are now quite a few R packages to turn cross-tables and fitted models into nicely formatted latex. In a previous post I showed how to use one of them to display regression tables on the fly. In this post I summarise what types of R object each of the major packages can deal with.

Unsurprisingly, there’s quite some variation…

The packages I’m looking at here are: apsrtable (v0.8-8), xtable(v1.7-1), stargazer (v3.0.1), memisc (v0.96-3) and texreg (v1.22).

I should note that all of these packages also allow users to add their own latex representation for new R objects. For example, here’s an addition to memisc to cover mer objects from the lme4 package(now included in memisc). However, I couldn’t be bothered to track down all these additions, so this post only deals with what each package can do without any extra work.

Also, several of these packages can typeset data.frame and matrixobjects too. While that can be incredibly handy, it is outside the focus of this post so I’ve left it out. Cross-tables are only just processed enough to deserve a mention. And we won’t even talk about generating HTML (well, not until the notes anyway).

Finally, I haven’t checked all of this information. The table is filled on the basis of my experience and the package documentation. If something is wrong or incomplete then please let me know in the comments.

PACKAGEMODELXTABLEMEMISCTEXREGSTARGAZERAPSRTABLE
AERivregYY
tobitYYYY
basetableYY
ftableY
betaregbetaregYY
dynlmdynlmYY
ehaaftregY
phregY
weibregY
ergmergmYY
geegeeYYY (in ‘skeleton’ form)
gmmgmmY
lme4glmerModYY
lmerModYY
nlmerModYY
MASSpolrYYY
rlmYY
negbinYYY
mgcvgamY
nlmeglsYY
lmeY
nnetmultinomYY
ordinalclmYYY
sclmY
plmplmYY
pmgYY
psclhurdleYY
zeroinflYY
quantregrqY
releventrem.dyadY
rmslrmYY
robustbaselmrobYY
simexsimexYY
snalnamY
statsglmYYYYY
lmYYYYY
aovY
anovaY
prcompY
tsY
surveysvyglmYYY (in ‘skeleton’ form)
survivalcoxphYYYY
clogitYYY
survregYY
coxph.penalY
systemfitsystemfitY
termgmstergmY
ZeligzeroinflY
cloglog.netY
gamma.netY
probit.netY
logit.netY
RelogitY

Notes

In case you are curious, a first version of this table was generated using the print.xtable function of the xtable package with type=html before being adjusted in place. If these posts haven’t given you the idea yet: I detest doing this sort of thing by hand.

Liviu (in the comments) also mentions the estout package. I’ve never used it, but apparently it deals with lm and plm models and is modeled after a Stata command of the same name.


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Packages coverage package cover LaTeX variation previous display should showed

已有 1 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
oliyiyi + 100 + 80 + 5 + 5 + 5 精彩帖子

总评分: 经验 + 100  论坛币 + 80  学术水平 + 5  热心指数 + 5  信用等级 + 5   查看全部评分

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

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-27 04:58