您如何使用Interactive(未组合)预测指标调用模型?

发布于 2025-01-22 17:26:11 字数 1026 浏览 0 评论 0原文

您如何使用Interactive(未组合)预测指标调用模型?

我有一个很好的回归模型:

lm_comb1 <- lm(cbind(MD_EARN_WNE_P10, X40.year.NPV) ~ SAT_AVG*TUITIONFEE_OUT*AVGFACSAL* RET_FT4_POOLED*INEXPFTE*C100_4_POOLED,data = training_set_NORM)

当我要求摘要(LM_COMB1)时,我遇到没问题。我希望检查添加多项式如何影响事物,因此我适合:

lm_comb1_POLY2 <- lm(formula = cbind(training_set_NORM$MD_EARN_WNE_P10, training_set_NORM$X40.year.NPV) ~ poly(training_set_NORM$SAT_AVG,2,raw=TRUE)*poly(training_set_NORM$TUITIONFEE_OUT,2,raw=TRUE)*poly(training_set_NORM$AVGFACSAL,2,raw=TRUE)*poly(training_set_NORM$RET_FT4_POOLED,2,raw=TRUE)*poly(training_set_NORM$INEXPFTE,2,raw=TRUE)*poly(training_set_NORM$C100_4_POOLED,2,raw=TRUE))

当我添加摘要(LM_COMB1_POLY2)时,R-MarkDown不会编织输出。它一直达到100%,但从未产生实际输出。我尝试编织HTML以及PDF。我没有收到错误消息,但是当我删除摘要(LM_COMB1_POLY2)输出是编织并恰好产生的。

有什么想法吗?我如何称呼m_comb1_poly2有什么些什么? *而不是+操作员以某种方式拧紧事情吗?

注意:我没有提供数据,因为这个问题似乎并不要求可重复性。

干杯!

How do you call a model using interactive (not combined) predictors?

I've got a regression model that works great:

lm_comb1 <- lm(cbind(MD_EARN_WNE_P10, X40.year.NPV) ~ SAT_AVG*TUITIONFEE_OUT*AVGFACSAL* RET_FT4_POOLED*INEXPFTE*C100_4_POOLED,data = training_set_NORM)

When I call for summary(lm_comb1) I encounter no problem. I wish to check how adding a polynomial will affect things, so I fit:

lm_comb1_POLY2 <- lm(formula = cbind(training_set_NORM$MD_EARN_WNE_P10, training_set_NORM$X40.year.NPV) ~ poly(training_set_NORM$SAT_AVG,2,raw=TRUE)*poly(training_set_NORM$TUITIONFEE_OUT,2,raw=TRUE)*poly(training_set_NORM$AVGFACSAL,2,raw=TRUE)*poly(training_set_NORM$RET_FT4_POOLED,2,raw=TRUE)*poly(training_set_NORM$INEXPFTE,2,raw=TRUE)*poly(training_set_NORM$C100_4_POOLED,2,raw=TRUE))

When I add summary(lm_comb1_POLY2), however, R-markdown will not knit an output. It goes all the way to 100% but never produces an actual output. I've tried knitting to HTML as well as PDF. I do not receive an error message, but when I remove summary(lm_comb1_POLY2) the output is knit and produced just fine.

Any ideas? Is there something flakey about how I've called m_comb1_POLY2? Do the * rather than + operators screw things up somehow?

Note: I've provided no data as the question does not seem to call for reproducibility.

Cheers!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

So要识趣 2025-01-29 17:26:12

它使我意识到尝试

lm_comb1_POLY2 <- lm(cbind(MD_EARN_WNE_P10, X40.year.NPV) ~ poly(SAT_AVG*TUITIONFEE_OUT*AVGFACSAL* RET_FT4_POOLED*INEXPFTE*C100_4_POOLED,2,raw=TRUE), data = training_set_NORM)
summary(lm_comb1_POLY2.1)

,这似乎有效。但是,如果有任何专家来,请纠正我。希望这对别人有帮助!

It dawned on me to try

lm_comb1_POLY2 <- lm(cbind(MD_EARN_WNE_P10, X40.year.NPV) ~ poly(SAT_AVG*TUITIONFEE_OUT*AVGFACSAL* RET_FT4_POOLED*INEXPFTE*C100_4_POOLED,2,raw=TRUE), data = training_set_NORM)
summary(lm_comb1_POLY2.1)

and this appears to work. If any experts come along, please do correct me, though. Hope this helps someone else!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文