Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: joint significance of categorical var


From   Maarten Buis <maartenlbuis@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: joint significance of categorical var
Date   Thu, 29 Nov 2012 15:35:52 +0100

On Thu, Nov 29, 2012 at 3:11 PM, Constantin Alba wrote:
> i am trying to find a way to calculate joint significance of
> categorical variable in case when there are many categories.
>
> one way i know  is to use "test" command and enter all categories manually e.g.
> if variable type has 3 categories then i use:
>
> test 1.type 2.type 3.type
>
>
> but what if i have few such categorical variables and there are much
> more categories. how i can avoid manual entry of all of them?

*------------ begin example ------------
sysuse auto
reg price i.rep78 i.foreign c.weight##c.weight
_ms_extract_varlist i.rep78 i.foreign
test `r(varlist)'
*------------- end example -------------
(For more on examples I sent to the Statalist see:
<http://www.maartenbuis.nl/example_faq> )

Hope this helps,
Maarten
---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index