|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: re: ML program and ML maximize help
< >
global stock
program define lesmond
version 10.1
args todo b lnf
tempvar alpha1 alpha2 beta sigma last
mleval `alpha1' = `b', eq(1)
mleval `alpha2' = `b', eq(2)
mleval `beta' = `b', eq(3)
mleval `sigma' = `b', eq(4)
// MY_panel contains the panel ID
local by $stock
sort `by'
I don't think this has anything to do with ML. Your 'global stock'
defines the macro $stock as empty, and then you say
local by $stock
which will cause the local to be empty, and then you
sort `by'
which evaluates to
sort
It is true that sort requires a varlist. This is why you're getting a
`varlist required' error. Define the stock macro as having some
content and it should work (or at least give you a new, interesting
error message).
Cheers
Kit
Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/