[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Dummies representing combinations of dummies, & conserving matsize
> For example, let the 14 dummies be represented by
> x1...x14. Then I want another variable x1x2 which
> equates to 1 if x1 and x2 both equal 1; 0 otherwise.
> And then I would need this done for all 14c2 ("14
> choose 2") combinations. I suppose I could do it
> manually, but there's gotta be a simpler way.
Simple: either -generate- an interaction term for x1x2 or use the -xi-
command; for example:
. xi: reg y x1 x2 x3 ... x14 x1*x2
Since x1 and x2 are dummy variables, the interaction term can _only_ take
the value of 1 when x1*x2 = 1 for any one case.
> Probably more importantly, is it possible to add these
> variables in a regression without eating into the 800
> max matsize that I get to use in Stata Intercooled?
Well, the solution offered merely calls for the addition of one term. I
guess it depends upon just how many degress of freedom your model consumes
(which you fail to mention), as well how large your dataset is. -set
matsize 800-, run the model and find out!
CLIVE NICHOLAS |t: 0(044)191 222 5969
Politics |e: firstname.lastname@example.org
Newcastle University |http://www.ncl.ac.uk/geps
* For searches and help try: