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
How teffects ipwra on binary outcome works?I was trying to understand how exactly Stata command teffects ipwra works on a binary outcome Y by m…
Moving percentile rankHi Everyone, I was hoping somebody could help me with my following problem: I have an unbalanced pa…
Exporting results to excel or LaTeX after -estat impact- command following spxregressHello I run a spatial regression using spxregress and after the actual estimation I use the -estat …
Differences between command and do-fileHi, I am a beginner in Stata. Recently, I am suffering from some errors that happen only on do-file.…
How to solve a problem of XSMLE that requires strongly balanced panel data without missing valuesDear everyone, I'm estimating spatial panel data models using XSMLE command. This command requires …
Subscribe to:
Post Comments (Atom)
0 Response to 'invalid name' error in logit MLE program
Post a Comment