楼主: updavid
2594 3

[其他] stata11方差分析时 无法识别交互项 [推广有奖]

  • 5关注
  • 4粉丝

学前班

已卖:149份资源

讲师

85%

还不是VIP/贵宾

-

威望
0
论坛币
11477 个
通用积分
16.8542
学术水平
23 点
热心指数
40 点
信用等级
20 点
经验
23868 点
帖子
491
精华
0
在线时间
712 小时
注册时间
2009-4-6
最后登录
2025-11-14

楼主
updavid 在职认证  发表于 2015-12-16 23:09:41 |AI写论文
5论坛币
anova  education  married  children married*children
给出结果
variable married*children not found
r(111);

这个错误帮助意思是没有定义这个变量,但是我学习的电子教程,课堂视频是STATA10.0,和我一个数据库,也没有定义这个交互项,但是他可以运行,有知道的么?谢谢了

最佳答案

夏目贵志 查看完整内容

anova的语法是不支持使用星号表示交叉的。应该使用#。请看
关键词:Stata11 Stata 方差分析 tata 交互项 factor

回帖推荐

杨叉叉 发表于2楼  查看完整内容

按理说应该是可以的,因为我之前用anova做是可以的,你看看是不是要检查一下married和children这两个变量的类型。另外,你可以用回归分析(reg)跑一下数据,看是否还是会出现你现在的这种错误提示。
不忘初心,方得始终。

沙发
夏目贵志 发表于 2015-12-16 23:09:42
anova的语法是不支持使用星号表示交叉的。应该使用#。请看
        anova varname [termlist] [if] [in] [weight] [, options]

    where termlist is a factor-variable list with the following additional features:

        o Variables are assumed to be categorical; use the c. factor-variable operator to override this.
        o The | symbol (indicating nesting) may be used in place of the # symbol (indicating interaction).
        o The / symbol is allowed after a term and indicates that the following term is the error term for the
            preceding terms.

藤椅
杨叉叉 发表于 2015-12-17 22:41:22
按理说应该是可以的,因为我之前用anova做是可以的,你看看是不是要检查一下married和children这两个变量的类型。另外,你可以用回归分析(reg)跑一下数据,看是否还是会出现你现在的这种错误提示。

板凳
updavid 在职认证  发表于 2015-12-23 22:50:30
谢谢两位的回答,用#就OK了

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-1 18:30