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, 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 <>
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:
<> )

Hope this helps,
Maarten L. Buis
Reichpietschufer 50
10785 Berlin
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index