[英]Stargazer: line type
I am struggling with working out how to control the line style settings in stargazer. 我正在努力研究如何在观星台中控制线条样式设置。 Below is my current working example.
以下是我当前的工作示例。 I like the double line at the top of the table, but I would like to replace the double line at the bottom of the table with a single line, and I would also like to replace the single solid line that separates the slope and intercept information from the summary information with a dashed/dotted line.
我喜欢表顶部的双线,但我想用单条线替换表底部的双线,并且我也想替换分隔斜率和截距信息的单条实线从摘要信息中以虚线表示。 For all steps up to this point I have been able to follow the stargazer documentation, but have become stuck at this point.
对于到目前为止的所有步骤,我都可以按照观星者文档进行操作,但是在这一点上已经陷入困境。
Any and all suggestions would be much appreciated. 任何和所有建议将不胜感激。
lobster.data<- data.frame(
distance= c(0, 2, 3, 4, 4, 5, 6, 7, 9, 12, 18, 20, 20, 23, 24, 26, 27, 28, 30),
size= c(116.89, 96.90, 120.97, 116.40, 89.86, 96.83, 116.18, 117.02, 79.03,
69.86, 105.60, 68.12, 78.12, 69.86, 66.64, 62.11, 59.11, 59.94, 44.43))
lm.lobster <- lm(size~distance, data = lobster.data) # create our model
stargazer(lm.lobster, type = 'latex', single.row = TRUE, omit.stat=c("ser","f", "adj.rsq"),
no.space=TRUE, title ="Lobster linear regression",
dep.var.caption="", digits =2, dep.var.labels ="Lobster size",covariate.labels=c("Distance", "Intercept") )
stargazer(lm.lobster, type = 'latex', single.row = TRUE,
omit.stat=c("ser","f", "adj.rsq"),
no.space=TRUE,
title ="Lobster linear regression",
dep.var.caption="",
digits =2,
table.layout ="-d-t-s=n",
dep.var.labels ="Lobster size",
covariate.labels=c("Distance", "Intercept") )
I added the line table.layout ="-dts=n",
with this you can control the layout, what elements the table should contain and which style of lines you like. 我添加了
table.layout ="-dts=n",
通过它您可以控制布局,表格应包含的元素以及喜欢的行样式。 With the -
you make single lines with the =
you make double lines. 用
-
单行,用=
双行。
here is the list of all options: 这是所有选项的列表:
"-" single horizontal line
"=" double horizontal line
"-!" mandatory single horizontal line
"=!" mandatory double horizontal line
"l" dependent variable caption
"d" dependent variable labels
"m" model label
"c" column labels
"#" model numbers
"b" object names
"t" coefficient table
"o" omitted coefficient indicators
"a" additional lines
"n" notes
"s" model statistics
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.