Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Categorical variable and -nestreg-
From
David de Jong <[email protected]>
To
[email protected]
Subject
st: Categorical variable and -nestreg-
Date
Mon, 2 Sep 2013 20:09:46 -0400
Hello all,
New Stata user here. I'm trying to use -nestreg- to run a hierarchical
(not stepwise) regression. I'm having some trouble, and I was hoping
someone could lend a hand. This is the syntax:
nestreg: regress z_target_RT_c12 (condition) ///
(z_neutral_RT_c12 z_nonword_RT_c12 z_int_goals_c12 z_enhance_goals_c12) ///
(c.z_int_goals_c12#condition c.z_enhance_goals_c12#condition)
Condition is categorical, with 2 possible values. All other variables
are continuous.
When I run the syntax, I receive the error:
factor variables not allowed
r(101);
I've figured out nestreg can't handle factor variables, as indicated
by this error message. I've tried using "xi:" before "nestreg" and
appending "i." to "condition" but I still get the "factor variables
not allowed" error message. Is it simply the case that I cannot use
-nestreg- for categorical variables? If so, are there other ways to
deal with this?
Thanks so much,
David de Jong
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/