Does anyone have any ideas how to fix the following problem? After
estimating a logit I use the estimated coefficients in an nl routine but I
get the "type mismatch" error. I suspected the problem lies in the use of
scalars, so I first svmat the coefficients and then use those instead of
the scalars, but then I get the "RHS variables missing" error.
Thanks very much,
Kumiko
------------------------------------
. logit anycost age
.
. program define nlfcn
1. if "`1'"="?"{
2. global S_1 "b20 b21"
3. global b20=.1
4. global b21=.1
5. exit
6. }
7. replace `1'=exp((b10+$b20)+(b11+$b21)*age)/(1+exp(b10+b11*age))
8. end