Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: re: ML program and ML maximize help


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: ML program and ML maximize help
Date   Mon, 8 Sep 2008 19:47:15 -0400

< >
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/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index