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.