为什么观星者会为这两个模型产生不同的因变量标签?

时间:2019-03-24 14:13:02

标签: r stargazer

我想知道是否有人可以告诉我为什么观星者为以下两种模型生产不同的因变量标签:

j <- "hp"
i <- "cyl"

lm1 <- lm(paste(j, "~", i), mtcars)
stargazer(lm1, header = FALSE, type = "text")

产生因变量 j

而:

model <- paste(j, "~", i)
lm2 <- lm(model, mtcars)
stargazer(lm2, header = FALSE, type = "text")

产生正确的因变量 hp

1 个答案:

答案 0 :(得分:1)

似乎 private void SaveDinosaur_Btn_Click(object sender, EventArgs e) { Dino d = new Dino(); textBoxName.Text = d.name; textBoxDiet.Text = d.diet; textBoxHeight.Text = Convert.ToString(d.height); textBoxAttribute.Text = d.attribute; textBoxPower.Text = Convert.ToString(d.power); DinoList.Add(d); } private void listBoxDinoListDisplay_SelectedIndexChanged(object sender, EventArgs e) { } private void BtnDisplayAllCreated_Click(object sender, EventArgs e) { foreach (Dino d in DinoList) { } } 从模型的stargazer属性中选择了因变量标签,因此当执行内部代码(https://github.com/cran/stargazer/blob/master/R/stargazer-internal.R)的第51行时,它将读取{{1 }},而不是call

您可以看到,如果现在将j属性从lm2复制到lm1,则会得到它:

hp