2013-10-03 133 views
4

使用stargazer時,有一個參數omit.stat,但是我需要從下面的係數值中刪除測試統計信息,它不是stargazer package documentation (PDF) (pp. 14–15)中列出的參數。有誰知道我會怎麼做呢?Stargazer忽略測試統計

對於實施例:以上

install.packages('stargazer'); library(stargazer) 
linear.1 <- lm(rating ~ complaints + privileges + learning + raises + critical, 
       data=attitude) 
linear.2 <- lm(rating ~ complaints + privileges + learning, data=attitude) 
attitude$high.rating <- (attitude$rating > 70) 
probit.model <- glm(high.rating ~ learning + critical + advance, 
        data=attitude, family = binomial(link = "probit")) 

stargazer(linear.1, linear.2, probit.model, title="Regression Results", 
      align=TRUE, dep.var.labels=c("Overall Rating","High Rating"), 
      covariate.labels=c("Handling of Complaints","No Special Privileges", 
      "Opportunity to Learn","Performance-Based Raises","Too Critical", 
      "Advancement"), omit.stat=c("LL","ser","f"), no.space=TRUE) 

給我用測試統計數據,其中我想完全忽略的表。下面用置信區間替換它們,但這並不是更好。

stargazer(linear.1, linear.2, title="Regression Results", 
dep.var.labels=c("Overall Rating","High Rating"), 
covariate.labels=c("Handling of Complaints","No Special Privileges", 
        "Opportunity to Learn","Performance-Based Raises", 
        "Too Critical","Advancement"), omit.stat=c("LL","ser","f"), 
        ci=TRUE, ci.level=0.90, single.row=TRUE) 

的表可以被分別看到在R-statistics blog entry, Tailor Your Tables with stargazer: New Features for LaTeX and Text Output,如在第一和第二位。

+0

呃,智能報價取代。 –

回答

4

當前版本的stargazer不支持省略標準錯誤和/或置信區間(我認爲這就是'測試統計'所指的含義)。不過,我一直在考慮在未來的發行版中使stargazer的輸出變得更加可調 - 請隨時發送給我(軟件包作者)關於如何做到最好的想法。

現在,一個hackish的方式省略標準誤差可能涉及餵養se參數來港的列表:

stargazer(linear.1, linear.2, probit.model, title="Regression Results", 
align=TRUE, dep.var.labels=c("Overall Rating","High Rating"), 
covariate.labels=c("Handling of Complaints","No Special Privileges", 
"Opportunity to Learn","Performance-Based Raises","Too Critical","Advancement"), 
omit.stat=c("LL","ser","f"), no.space=TRUE, se=list(NA, NA, NA)) 

更新:

自從5.0版本,天文愛好者已經包含了「報告'允許用戶選擇要報告的統計數據的論據。例如,要僅報告具有顯着性明星的係數,用戶可以指定report = "c*"

+0

謝謝!非常有幫助的是,我使用醜陋的方法從輸出中刪除每個第n行 – DrewH

+0

傳遞se = list(NA,NA,NA)的作品,但是然後星星的重要性也消失了。有沒有解決方法? – Libby

+0

省略標準誤差和/或置信區間並保留顯着性星將會很好! –