楼主: wck2112
11331 17

[数据管理求助] stata11对连续变量的处理 [推广有奖]

  • 14关注
  • 2粉丝

已卖:24份资源

院士

35%

还不是VIP/贵宾

-

威望
0
论坛币
12538 个
通用积分
252.5804
学术水平
2 点
热心指数
2 点
信用等级
1 点
经验
86287 点
帖子
771
精华
0
在线时间
6497 小时
注册时间
2009-6-5
最后登录
2026-2-7

楼主
wck2112 在职认证  发表于 2011-5-19 11:14:23 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
正在学stata,用的是stata11, 在运行命令“anova drink belong gender gpa, continuous(gpa)"出错,提示为:
option continuous(gpa) not allowed
    Option continuous(gpa) only allowed under version control with version < 11.  Or, use the c. factor variable
    operator on your continuous variables.
请问,在stata11中对连续变量如何处理?
谢谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Stata11 Stata 连续变量 tata Continuous continuous version control factor option

沙发
蓝色 发表于 2011-5-19 12:55:20
wck2112 发表于 2011-5-19 11:14
正在学stata,用的是stata11, 在运行命令“anova drink belong gender gpa, continuous(gpa)"出错,提示为:
option continuous(gpa) not allowed
    Option continuous(gpa) only allowed under version control with version < 11.  Or, use the c. factor variable
    operator on your continuous variables.
请问,在stata11中对连续变量如何处理?
谢谢!
为什么不看stata的help呢?


Stata11的help:没有你的选项吧,说明不需要了
Title
    [R] anova -- Analysis of variance and covariance

Syntax
        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.

    options                  description
    -----------------------------------------------------------------------------------------------------------
    Model
      repeated(varlist)      variables in terms that are repeated-measures variables
      partial                use partial (or marginal) sums of squares
      sequential             use sequential sums of squares
      noconstant             suppress constant term
      dropemptycells         drop empty cells from the design matrix
    Adv. model
      bse(term)              between-subjects error term in repeated-measures ANOVA
      bseunit(varname)       variable representing lowest unit in the between-subjects error term
      grouping(varname)      grouping variable for computing pooled covariance matrix
    -----------------------------------------------------------------------------------------------------------
    bootstrap, by, jackknife, and statsby are allowed; see prefix.
    aweights and fweights are allowed; see weight.
    See [R] anova postestimation for features available after estimation.

Menu
    Statistics > Linear models and related > ANOVA/MANOVA > Analysis of variance and covariance

Description
    The anova command fits analysis-of-variance (ANOVA) and analysis-of-covariance (ANCOVA) models for balanced
    and unbalanced designs, including designs with missing cells; for repeated-measures ANOVA; and for
    factorial, nested, or mixed designs.
    The regress command will display the coefficients, standard errors, etc., of the regression model
    underlying the last run of anova.
    If you want to fit one-way ANOVA models, you may find the oneway or loneway command more convenient; see
    [R] oneway and [R] loneway.  If you are interested in MANOVA or MANCOVA, see [MV] manova.



Stata10的help:
Title
    [R] anova -- Analysis of variance and covariance

Syntax
        anova varname [term [/] [term [/] ...]] [if] [in] [weight] [, options]
        where term is of the form   varname[{*||}varname[...]]

    options                  description
    ---------------------------------------------------------------------------------------------------------
    Model
      category(varlist)      variables in terms that are categorical or class
      class(varlist)         synonym for category(varlist)
      continuous(varlist)    variables in terms that are continuous
      repeated(varlist)      variables in terms that are repeated-measures variables
      partial                use partial (or marginal) sums of squares
      sequential             use sequential sums of squares
      noconstant             suppress constant term
    Adv. model
      bse(term)              between-subjects error term in repeated-measures ANOVA
      bseunit(varname)       variable representing lowest unit in the between-subjects error term
      grouping(varname)      grouping variable for computing pooled covariance matrix
    Reporting
      regress                display the regression table
      [no]anova              display or suppress the ANOVA table
      detail                 show mapping from values to level numbers for categorical variables
    ---------------------------------------------------------------------------------------------------------
    by is allowed; see prefix.
    aweights and fweights are allowed; see weight.
    See [R] anova postestimation for features available after estimation.

Description
    The anova command fits analysis-of-variance (ANOVA) and analysis-of-covariance (ANCOVA) models for
    balanced and unbalanced designs, including designs with missing cells; for repeated-measures ANOVA; and
    for factorial, nested, or mixed designs.  anova can also be used to produce regression estimates by those
    who have no interest in ANOVA and ANCOVA output.
    If you want to fit one-way ANOVA models, you may find the oneway or loneway command more convenient; see
    [R] oneway and [R] loneway.  If you are interested in MANOVA or MANCOVA, see [MV] manova.
已有 1 人评分学术水平 信用等级 收起 理由
SpencerMeng + 1 + 1 精彩帖子

总评分: 学术水平 + 1  信用等级 + 1   查看全部评分

藤椅
wck2112 在职认证  发表于 2011-5-19 18:44:40
十分感谢版主,我明白了,11版的对连续变量的处理方式是在c.var,即c.后加变量名。

板凳
caoliping842 发表于 2011-6-20 10:26:44
wck2112 发表于 2011-5-19 18:44
十分感谢版主,我明白了,11版的对连续变量的处理方式是在c.var,即c.后加变量名。
不行啊,
. anova drink belong gender belong#gender gpa,c.gpa
option c.gpa not allowed
r(198);

我的也是Stata11,求解,谢谢!

报纸
caoliping842 发表于 2011-6-20 10:29:59
自己弄明白了,呵呵。不用解了!

地板
micky 发表于 2012-3-9 22:28:20
连续变量在11中表示为c.变量

7
脚印印~~~ 发表于 2012-7-28 22:19:38
我也在做这个anova,虽然stata11里面介绍c.相当于其他版本里continuous的功能,但是,同样的数据在不同的stata版本里做出的结果不一样
比如在stata9里
anova  wage children married children*married education, c(education)
做出来F值是99
但在stata11里
anova  wage children married children* married c. education
做出来的F值有133
请问各位学友如何解释?

8
脚印印~~~ 发表于 2012-7-28 22:32:38
我明白了,是#不是*

9
whmshufe 发表于 2013-10-25 11:12:33
我也是疑惑啊

10
ljq8433101 发表于 2014-8-24 16:03:05
caoliping842 发表于 2011-6-20 10:29
自己弄明白了,呵呵。不用解了!
咋回事呀?

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-2-8 20:45