这有点连线。 观星者省略了一些我没有指定的系数。相比之下,我希望这些系数显示在输出表中。以下是代码。
首先,这里是整个模型输出的代码,没有任何遗漏。
stargazer(modeltt,modelintt,modelintt1,modelintt2,modelintt3,
title = "Panel data with averaged climate variables part two",
model.names = F, object.names = F, dep.var.caption = "Yield",
dep.var.labels.include = F,
column.labels = c("Only Ozone","Ozone and SPEI","Ozone and tem",
"Ozone and preci","All together"),
dep.var.labels = "Yield", digits = 3,
align = T, no.space = T, column.sep.width = "3pt",
omit.stat = "f", header = F)
上面的代码生成了下面的 Latex 代码。
begin{table}[!htbp] centering
caption{Panel data with averaged climate variables part two}
label{}
begin{tabular}{@{extracolsep{3pt}}lD{.}{.}{-3} }
\[-1.8ex]hline
hline \[-1.8ex]
& multicolumn{1}{c}{Yield} \
cline{2-2}
hline \[-1.8ex]
tm_fall & -0.007 \
& (0.016) \
I(tm_fall$hat{mkern6mu}$2) & 0.0001 \
& (0.0001) \
tm_winter & 0.022^{***} \
& (0.004) \
I(tm_winter$hat{mkern6mu}$2) & -0.0003^{***} \
& (0.0001) \
tm_spring & 0.042^{***} \
& (0.011) \
I(tm_spring$hat{mkern6mu}$2) & -0.0005^{***} \
& (0.0001) \
pc_fall & 0.008^{**} \
& (0.003) \
I(pc_fall$hat{mkern6mu}$2) & -0.0005^{***} \
& (0.0001) \
pc_winter & 0.006^{**} \
& (0.002) \
I(pc_winter$hat{mkern6mu}$2) & -0.0002^{***} \
& (0.0001) \
pc_spring & -0.012^{*} \
& (0.007) \
I(pc_spring$hat{mkern6mu}$2) & -0.001^{***} \
& (0.0001) \
oz_spring & -0.005 \
& (0.006) \
I(oz_spring textasteriskcentered sp_spring) & -0.0002^{*} \
& (0.0001) \
I(tm_spring textasteriskcentered oz_spring) & 0.00003 \
& (0.0001) \
I(pc_spring textasteriskcentered oz_spring) & 0.001^{***} \
& (0.0001) \
lt & 0.005^{***} \
& (0.001) \
qt & 0.0001^{**} \
& (0.00004) \
hline \[-1.8ex]
Observations & multicolumn{1}{c}{4,960} \
R$^{2}$ & multicolumn{1}{c}{0.127} \
Adjusted R$^{2}$ & multicolumn{1}{c}{0.031} \
hline
hline \[-1.8ex]
textit{Note:} & multicolumn{1}{r}{$^{*}$p$<$0.1; $^{**}$p$<$0.05; $^{***}$p$<$0.01} \
end{tabular}
end{table}
然后在这里我指定了一些要省略的系数。最后,观星者省略了比我指定的更多。
stargazer(modeltt,modelintt,modelintt1,modelintt2,modelintt3,
title = "Panel data with averaged climate variables part two",
model.names = F, object.names = F, dep.var.caption = "Yield",
dep.var.labels.include = F,
omit = c("tm_fall","I(tm_fall^2)","tm_winter","I(tm_winter^2)",
"tm_spring","I(tm_spring^2)","pc_fall","I(pc_fall^2)",
"pc_winter","I(pc_winter^2)","pc_spring","I(pc_spring^2)",
"lt","qt"),
column.labels = c("Only Ozone","Ozone and SPEI","Ozone and tem",
"Ozone and preci","All together"),
dep.var.labels = "Yield", digits = 3,
align = T, no.space = T, column.sep.width = "3pt",
omit.stat = "f", header = F)
上面的代码生成了下面的 Latex 代码。
begin{table}[!htbp] centering
caption{Panel data with averaged climate variables part two}
label{}
begin{tabular}{@{extracolsep{3pt}}lD{.}{.}{-3} }
\[-1.8ex]hline
hline \[-1.8ex]
& multicolumn{1}{c}{Yield} \
cline{2-2}
hline \[-1.8ex]
oz_spring & -0.005 \
& (0.006) \
I(oz_spring textasteriskcentered sp_spring) & -0.0002^{*} \
& (0.0001) \
hline \[-1.8ex]
Observations & multicolumn{1}{c}{4,960} \
R$^{2}$ & multicolumn{1}{c}{0.127} \
Adjusted R$^{2}$ & multicolumn{1}{c}{0.031} \
hline
hline \[-1.8ex]
textit{Note:} & multicolumn{1}{r}{$^{*}$p$<$0.1; $^{**}$p$<$0.05; $^{***}$p$<$0.01} \
end{tabular}
end{table}
有人可以为我解释这一点???
尝试改用keep
。然后,选择要显示的变量。然后你的代码将变成:
stargazer(modeltt,modelintt,modelintt1,modelintt2,modelintt3,
title = "Panel data with averaged climate variables part two",
model.names = F, object.names = F, dep.var.caption = "Yield",
dep.var.labels.include = F,
keep = c("first variable you want to keep", "second variable", "and so on"),
column.labels = c("Only Ozone","Ozone and SPEI","Ozone and tem",
"Ozone and preci","All together"),
dep.var.labels = "Yield", digits = 3,
align = T, no.space = T, column.sep.width = "3pt",
omit.stat = "f", header = F)