this may be a very simple problem and I am just not getting it, but here's what I am trying to do. I want to use -mlogit- on a 4-category dependent variable. The plan is to estimate the model, save the coefficients, fix the value of some of the b's to the value obtained in the previous regression, then run a new model. My problem is I cannot seem to find any syntax that will fix the value. I tried the following:
Method 1:
mlogit depvar age c.age#c.age . . . ;The constraint is ignored (because the second mlogit has standard errors for the coefficient, instead of just saying the value and then saying (constrained).
constraint 1 [#2]age = [#2]_b[age] ;
mlogit depvar age c.age##c.age . . . , constraints(1) ;
Method 2
mlogit depvar age c.age##c.age . . . ;This produces error r(111).
gen c01 = [#2]_b[age]] ;
constraint 1 [#2]_cons = c01;
mlogit depvar age c.age##c.age . . ., constraints(1) ;
Method 3 (I knew this would not work, but it was nice confirmation):
mlogit depvar age c.age#c.age . . . ;This constrains the coefficient, but other coefficients change their values, which just shows I don't have "all" (or enough of) the digits.
constraint 1 [#2]age = .0296174 ;
mlogit depvar age c.age##c.age . . . , constraints(1) ;
I think I could display "enough" of the digits and copy them one-by-one into the code, but 1)I am likely to make mistakes; 2)I want to do this for too many variables in a model for it to be feasible, 3)I want to do this for too many models for it to be feasible, and 4)I find it very hard to believe stata has no way for me to use some elements in _b to constrain coefficients in the next regression. I just can't seem to find my way to the write (no pun intended) syntax. I've looked at the manual entries for a)mlogit, b)constraints, c)matrix operations, and a few others. I googled various terms, and I searched the forum as well (google turned up some listserv era discussions, but I could find nothing on my question). It may be a very simple thing I am just missing. But I'm nowhere near converging to a solution. I appreciate any help anyone can offer.
Thanks!
Sam
0 Response to Fix a coefficient to the value it had in previous mlogit
Post a Comment