全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
11522 17
2011-05-19
正在学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中对连续变量如何处理?
谢谢!
二维码

扫码加我 拉你入群

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

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

全部回复
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.
二维码

扫码加我 拉你入群

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

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

2011-5-19 18:44:40
十分感谢版主,我明白了,11版的对连续变量的处理方式是在c.var,即c.后加变量名。
二维码

扫码加我 拉你入群

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

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

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,求解,谢谢!
二维码

扫码加我 拉你入群

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

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

2011-6-20 10:29:59
自己弄明白了,呵呵。不用解了!
二维码

扫码加我 拉你入群

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

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

2012-3-9 22:28:20
连续变量在11中表示为c.变量
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群