我正在尝试对我的论文进行一些回归。我有 4 个国家/地区的所有数据库的编码完全相同,并且可以单独运行 stargazer,但它不会让我在一张表上执行所有 4 个操作:当我向其中添加“modelouruguayedad”时,它会出现该错误。这是所有 lm 的代码(它们都是相同的,只是因为国家不同而有不同的数据库)。
我可以运行这个:
modelouruguayedad <- lm(age ~ religiosity + ideology,
data = Uruguay1)
stargazer::stargazer( modelouruguayedad,
type = 'text',
title = "" ,
no.space = T,
digits = 4,
star.cutoffs = c(.05, .01, .001),
dep.var.labels = 'Apoyo al matrimonio igualitario',
model.numbers = T,
model.names = F,
object.names = F,
column.labels = '',
omit.stat = c("f", "ser"))
但无法运行这个:
stargazer::stargazer( modelocolombiaedad, modelouruguayedad, modelobrasiledad, modelocolombiaedad,
type = 'text',
title = "" ,
no.space = T,
digits = 4,
star.cutoffs = c(.05, .01, .001),
dep.var.labels = 'Edad',
model.numbers = T,
model.names = F,
object.names = F,
column.labels = c("Argentina", "Brasil", "Colombia", "Uruguay"),
covariate.labels = c("Religiosidad", "Ideologia"),
omit.stat = c("f", "ser"))
因为它说:
Error in if (is.na(s)) { : the condition has length > 1"