过程逻辑回归和其他回归中的多项式项

发布于 2024-10-07 12:28:43 字数 126 浏览 0 评论 0原文

我想做以下回归

proc logistic data=abc
    model y = x x*x x*x*x ....;
run;

有生成这些多项式项的简写吗?谢谢。

I'd like to do the following regression

proc logistic data=abc
    model y = x x*x x*x*x ....;
run;

Is there a shorthand to generate these polynomial terms? Thanks.

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

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

发布评论

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

评论(1

誰ツ都不明白 2024-10-14 12:28:43

编辑:这将教会我在回答之前仔细研究问题。 BAR 运算符确实用于交互 - 而不是多项式效应。

据我所知,Logistic 还没有速记法来实现这一点 - 但 glimmix 确实有一种使用效果语句的实验技术。例如,这..

effect MyPoly = polynomial(x1-x3/degree=2);
       model y = MyPoly;

model y = x1 x2 x3 x1*x1 x1*x2 x1*x3 x2*x2 x2*x3 x3*x3;

Edit: That will teach me to look closer at the question before I answer. The BAR operator is indeed for interaction - not polynomial effects.

Logistic does not have shorthand to accomplish this yet that I know of - but glimmix does have an experimental technique using the effect statement. For example, this..

effect MyPoly = polynomial(x1-x3/degree=2);
       model y = MyPoly;

is the same as

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