Get coefficients estimated by maximum likelihood into a stargazer table

Stargazer produces very nice latex tables for lm (and other) objects. Suppose I've fit a model by maximum likelihood. I'd like stargazer to produce a lm-like table for my estimates. How can I do this? Although it's a bit hacky, one way might be to create a "fake" lm object containing my estimates -- I think this would work as long as summary(my.fake.lm.object) works. I

通过最大可能性将系数估计到一个观星表中

Stargazer为lm(和其他)物体生产非常好的乳胶桌子。 假设我已经最大可能地拟合了一个模型。 我想要观星者为我的估计制作一个类似lm的桌子。 我怎样才能做到这一点? 虽然这有点冒险,但一种方法可能是创建一个包含我的估计的“虚假”lm对象 - 我认为只要汇总(my.fake.lm.object)有效就会工作。 这很容易做到吗? 一个例子: library(stargazer) N <- 200 df <- data.frame(x=runif(N, 0, 50)) df$y <- 10 + 2

Converting LME4 model result to latex (with longtable support)

It seems that the getSummary function for LME4 objects no longer plays well with the memisc package, and outputting LME4 model results to latex no longer works. The only alternative for exporting objects through stargazer however does not allow longtables. Has anyone come up with either a fix for the mtable format, or an alternative way to output these results into a longtable? Edit: Here i

将LME4模型结果转换为胶乳(具有长期支持)

看来LME4对象的getSummary函数不再适合memisc包,并且将LME4模型结果输出到latex不再适用。 然而,通过观星者导出对象的唯一选择是不允许长表。 有没有人想出了mtable格式的修正或者将这些结果输出成longtable的替代方法? 编辑: 这是一个可重现的例子。 library(lme4) library(memisc) fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy) mtable(fm1) 这用于工作,但我相信lme4现在会生成一个不再被mta

Is it possible to report NAs in stargazer table?

Stargazer package gives me really nice descriptive table to include in latex document. library(stargazer) stargazer(attitude) Is it possible to add a column reporting number of NAs for each of the variables? 这段代码将为您提供数据框中每行和每列的NAs数量# make some data count <- 10 data <- data.frame( a=runif(count), b=runif(count)) # add some NAs data[data$a>0.5,]$a <- NA data[dat

是否有可能在Stargazer表中报告NAs?

Stargazer包给了我非常好的描述性表格以包含在latex文档中。 library(stargazer) stargazer(attitude) 是否可以为每个变量添加一个列报告数量的NAs? 这段代码将为您提供数据框中每行和每列的NAs数量# make some data count <- 10 data <- data.frame( a=runif(count), b=runif(count)) # add some NAs data[data$a>0.5,]$a <- NA data[data$b>0.5,]$b <- NA # NAs per row data$NACount <- apply(data

How extract regression results from lme, lmer, glmer to Latex?

I'm fitting models with lme, lmer and glmer. I need to construct tables with the summary() objects and export to Latex showing my results. xtable, mtable, and apsrtable do not work. I saw a previous post (link below) with a solution for lme4 objects, but not for these ones. http://leftcensored.skepsi.net/2011/03/13/code-latex-tables-for-lme4-models/ These are two examples of the models

如何从lme,lmer,glmer向Latex提取回归结果?

我是适合lme,lmer和glmer的模特。 我需要使用summary()对象构造表并将其导出到Latex来显示我的结果。 xtable,mtable和apsrtable不起作用。 我看到一个以前的帖子(下面的链接)和一个针对lme4对象的解决方案,但不是针对这些。 http://leftcensored.skepsi.net/2011/03/13/code-latex-tables-for-lme4-models/ 这些是我适合的模型的两个例子: lme(y ~ time, data, na.action=na.omit, method="REML", random = ~ 1

R data.frame with stacked specified titles for latex output with xtable

> w<-data.frame(c(0,0,1,1.3,2.1), c(0,0.6,0.9,1.6091,1.6299), c(258,141,206.4,125.8,140.5), c(162,162.7,162.4,162,162)) > colnames(w) <- c('Worst Cum', 'Best Cum', 'Worst Points', 'Best Points' ) Wrong (the code) Worst Cum Best Cum Worst Points Best Points 1 0.0 0.0000 258.0 162.0 2 0.0 0.6000 141.0 162.7 3 1.0 0.9000 206.4

R data.frame与xtable胶乳输出堆叠指定标题

> w<-data.frame(c(0,0,1,1.3,2.1), c(0,0.6,0.9,1.6091,1.6299), c(258,141,206.4,125.8,140.5), c(162,162.7,162.4,162,162)) > colnames(w) <- c('Worst Cum', 'Best Cum', 'Worst Points', 'Best Points' ) 错(代码) Worst Cum Best Cum Worst Points Best Points 1 0.0 0.0000 258.0 162.0 2 0.0 0.6000 141.0 162.7 3 1.0 0.9000 206.4 1

Any way to produce a LaTeX table from an lme4 mer model fit object?

Does anyone know a way to produce a nice publication quality LaTeX table from an lme4 mer object? Neither the xtable method (package xtable ) nor the latex method (package Hmisc ) know how to deal with mer objects. For example, given this fit: library(lme4) fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy) Are there any options for producing a nice LaTeX table of the coefficie

任何方式从lme4 mer模型适合对象生成LaTeX表格?

有没有人知道从lme4 mer对象中产生出色质量的LaTeX表格的方法? xtable方法(包xtable )和latex方法(包Hmisc )都不知道如何处理mer对象。 例如,考虑到这一点: library(lme4) fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy) 对于固定效应和随机效应,是否有任何选项可以生成系数估计的良好LaTeX表格? 编辑: 由于这些内容隐藏在下面的评论主题中,所以请注意,R LaTeX表中正在开发一个社区wik

sorting a table for latex output with xtable

I´m trying to produce a sorted table and export in to latex. However it seems xtable cannot cope with sorted tables. Suggestions? a<-sample(letters,500,replace=T) b<-table(a) c<-sort(table(a),decreasing=T) xtable(b) xtable(c) //M Pretty easy: sort() does not return a table, but an array. Use as.table() to solve your problem : a<-sample(letters,500,replace=T)

用xtable对乳胶输出进行排序

我正尝试生成一个已排序的表并将其导出到latex中。 但是,它似乎xtable无法应付排序表。 建议? a<-sample(letters,500,replace=T) b<-table(a) c<-sort(table(a),decreasing=T) xtable(b) xtable(c) //中号 很简单:sort()不返回一个表,而是一个数组。 使用as.table()解决您的问题: a<-sample(letters,500,replace=T) b<-table(a) class(b) c<-sort(table(a),decreasing=T)

Rreport/LaTeX quality output package

I'm looking for some LaTeX template for creating quality output. On R-bloggers I've bumped on Frank Harrel's Rreport package. Due to my quite modest LaTeX abilities, only a user-friendly (and noob-friendly) interface should suffice. Here's a link to an official website. I'm following the instructions, but I cannot manage to install an app. I use Ubuntu 9.10, R version is

Rreport / LaTeX质量输出包

我正在寻找一些用于创建高质量输出的LaTeX模板。 在R-bloggers上,我碰到了Frank Harrel的Rreport软件包。 由于我的LaTeX技能非常适中,只有用户友好的界面(以及友好的界面)才能满足需求。 这是一个官方网站的链接。 我按照说明操作,但无法安装应用程序。 我使用Ubuntu 9.10,R版本是2.10.1(定期从UCLA的CRAN服务器更新),当然,我的系统上安装了CVS。 现在,我想知道是否有一些用户友好的LaTeX模板包(Sweave对我来

Suggestion for R/LaTeX table creation package

I've been using xtable package for a long time, and looking forward to writting my first package in R... so I reckon that if I have some "cool" idea that's worth carying out, there's a great chance that somebody got there before me... =) I'm interested in functions/packages specialized for LaTeX table creation (through R, of course). I bumped on quantreg package which

对R / LaTeX表创建包的建议

我一直在使用xtable软件包,并期待在R中写下我的第一个软件包......所以我认为,如果我有一些值得注意的“酷”想法,那么有人很可能会到达那里在我之前... =) 我对专门用于LaTeX表格创建的函数/包感兴趣(当然,通过R)。 我遇到了具有latex.table功能的quantreg包。 对类似功能/包装有何建议? PS我正在考虑构建一个web应用程序,在这个应用程序中用户可以定义他们自己的表格模板,选择样式,统计数据等等。尽管这是一个早

Specify Font type on R Markdown

How can I specify a font type ie Tahoma on R Markdown. I am using the following to define my document --- bibliography: bibliography.bib csl: nature.csl documentclass: article fontsize: 12pt linkcolor: blue mainfont: Arial output: pdf_document: fig_caption: Yes --- How can I also specify the font size of figure captions -- like for the figure below ![Figure 2: The impact of malaria di

在R Markdown上指定字体类型

如何指定字体类型,即R Markdown上的Tahoma 。 我正在使用以下来定义我的文档 --- bibliography: bibliography.bib csl: nature.csl documentclass: article fontsize: 12pt linkcolor: blue mainfont: Arial output: pdf_document: fig_caption: Yes --- 我怎样才能指定数字字幕的字体大小 - 如下图所示 ![Figure 2: The impact of malaria disease the factors within the bednet that in turn affect infections a