Bookmark and Share

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]

Re: st: Categorical variable and -nestreg-


From   William Buchanan <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Categorical variable and -nestreg-
Date   Mon, 2 Sep 2013 19:21:05 -0500

Check your syntax again.  The issue is probably with the interaction terms that you include using factor variable notation.  Create the interactions first as new variables and try using those instead.

HTH,
Billy

Sent from my iPhone

On Sep 2, 2013, at 19:09, David de Jong <[email protected]> wrote:

> 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/

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index