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: Re: st: Question about sqreg


From   [email protected] (Wesley D. Eddings, StataCorp)
To   [email protected]
Subject   Re: Re: st: Question about sqreg
Date   Wed, 08 Sep 2010 12:24:11 -0500

Alberto Osella <[email protected]> used -mi estimate: sqreg- and
received an error:

> mi estimate, noisily dftable: sqreg BMI Etarecl Num_nucleo i.Sesso ///
> i.GrammiAlc_G_C i.NewStatCiv i.Professione1 i.scalacat, q(.47 .83) reps(400)
>
> (running sqreg on m=1)
> factor variables and time-series operators not allowed
> an error occurred when mi estimate executed sqreg on m=1
> r(101);

And Neil Shephard <[email protected]> replied:

> You can't use the new way of specifying factor variables with -mi-
> instead you should use the old way of specigyin them.  Try...

> xi : mi estimate, noisily dftable: sqreg BMI Etarecl Num_nucleo ///
>        i.Sesso i.GrammiAlc_G_C  i.NewStatCiv i.Professione1 ///
>        i.scalacat, q(.47 .83) reps(400)

(snip)

> So for the time being if you're using -mi- or -sw-/-stepwise- you have
> to use the old way of specifying factor variables.

Alberto received an error because -sqreg- does not support factor variables.
Alberto should not use -xi- instead, though, because -xi- is not supported by
-mi estimate-.  (Factor variables actually are supported by -mi estimate-.)

If Alberto would like to use -mi estimate: sqreg- with categorical predictors,
therefore, neither -xi- nor factor-variable syntax is appropriate.  Alberto may
instead use -mi passive: generate- to create indicator variables for "Sesso,"
"scalacat", and the other categorical predictors.  He may then include the
indicator variables in -mi estimate: sqreg- and omit both -xi- and the
factor-variable operator "i.".

-- Wes                  
[email protected]      
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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