Hi statalist,

The following code is for my 2sls model. I wanted to store the results into a matrix as well as into a new stata data file. I would appreciate any clue. Thanks,

Code:
regress y1 i.(x1 x2 x3) x4
predict y1hat
mlogit y2 y1hat i.(x1 x2 x3) x4, baseoutcome(1) rrr

Note that x1, x2, x3, and y2 are categorical variables, while y1 and x4 are continuous variables.

Thanks,