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: joint significance of categorical var


From   Maarten Buis <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index