If anyone can help it would be great. I'm trying to do a logistic MLE. I've written an ado with the log-likelihood function, but it keeps giving me an 'invalid name' error. Here's my program:
program mylogit_lf
version 15.0
args lnf xb
quietly replace 'lnf' = ln(invlogit( 'xb')) if $ML_y1 == 1
quietly replace 'lnf' = ln(invlogit(-'xb')) if $ML_y1 == 0
end
Here's the error after ml check:
------------------------------------------------------------------------------
-> mylogit_lf __000008 __000009
- `begin'
= capture noisily version 15: mylogit_lf __000008 __000009
---------------------------------------------------------------------------- begin mylogit_lf ---
- version 15.0
- args lnf xb
- quietly replace 'lnf' = ln(invlogit( 'xb')) if $ML_y1 == 1
= quietly replace 'lnf' = ln(invlogit( 'xb')) if FO_label == 1
' invalid name
------------------------------------------------------------------------------ end mylogit_lf ---
- `end'
= set trace off
------------------------------------------------------------------------------
I've tried with another more complicated program using the args -> tempvar -> gen double -> replace format, but this gives me the same error.
Some one please help?
Related Posts with 'invalid name' error in logit MLE program
Would using the Wald Chi2 be appropriate to choose between xtprobit and xtlogit results?I've run xtlogit and xtprobit regressions that yield very similar results. Would it be fine if I use…
xtivreg2 and interpretation of post estimation resultsHi, I am running an xtivewg2 command using some instrumental variables. I would like to reconfirm m…
My nl equation has an error, please help!Hello everyone, I am trying to estimate the parameters a and c of a nonlinear equation. The nonline…
Problem with calculating particular percentages of flowsGood morning, first of all these are the first times I am using Stata, so this could be a very eleme…
tab command in Stata 17Hi everybody, just a quick general question: the new Stata 17 modifies the command table, suppressi…
Subscribe to:
Post Comments (Atom)
0 Response to 'invalid name' error in logit MLE program
Post a Comment