操作员+ *和:在GLS功能中执行

发布于 2025-02-11 02:24:31 字数 201 浏览 2 评论 0原文

我的代码看起来像这样:

Endo.v.Mass_Extant_Stages<-gls(log.Endo~log.Mb+Stage, data = CrocOntogenyData)

我的结果根据我使用的是 +,*或:在log.mb(连续)和阶段(分类)之间更改。有人真的知道这些运营商在做什么吗?我似乎找不到任何东西。

My code looks like this:

Endo.v.Mass_Extant_Stages<-gls(log.Endo~log.Mb+Stage, data = CrocOntogenyData)

My results change based on whether I'm using a +,*, or : between log.Mb (continuous) and Stage (categorical). Does anyone actually know what these operators are doing? I can't seem to find anything on it.

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

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

发布评论

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

评论(1

离不开的别离 2025-02-18 02:24:31

R中的模型具有描述的特殊语法在这里/a>(您还可以在R中键入help(公式))。它们不仅在GLS函数中使用(例如,lm也使用它们)。

z〜x + y对于每个X和Y值的数学公式“ z = ax + by + c”,对于某些常数a,b,c。

z〜x * y对每个X和Y值的数学公式“ z = ax + by + cxy + d”,对于某些常数a,b,c,d。

z〜x / y < / code>对于每个X和Y值的数学公式“ z = ax + bxy + c”,对于某些常数a,b,c。

z〜x:y对每个常数a的数学公式“ z = axy”。

请参阅此堆栈交换发布有关更多信息

Models in R have a special syntax described here (you can also type help(formula) into R). They aren't only used in the gls function (lm also uses them, for instance).

Z ~ x + y corresponds to the mathematical formula "z = ax + by + c" for every x and y value, for some constants a, b, c.

Z ~ x * y corresponds to the mathematical formula "z = ax + by + cxy + d" for every x and y value, for some constants a, b, c, d.

Z ~ x / y corresponds to the mathematical formula "z = ax + bxy + c" for every x and y value, for some constants a, b, c.

Z ~ x:y corresponds to the mathematical formula "z = axy" for every x and y value, for some constant a.

See this Stack Exchange post for more information

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