您如何使用Interactive(未组合)预测指标调用模型?
您如何使用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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它使我意识到尝试
,这似乎有效。但是,如果有任何专家来,请纠正我。希望这对别人有帮助!
It dawned on me to try
and this appears to work. If any experts come along, please do correct me, though. Hope this helps someone else!