[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Help building an ado file from a do file

From   Thomas Jacobs <>
To   StataList <>
Subject   st: Help building an ado file from a do file
Date   Fri, 20 Feb 2009 16:10:29 -0600

I am trying to convert a called do file to an ado with little success.
 Besides inserting the program line at the top and end line at the
bottom, I have made no changes to the working called do version which
is executed with a number of arguments passed from the calling
program.  The error I keep getting is

variable NewCompanyNum not found
(error occurred while loading CalledPooledModel.ado)

without pasting the entire program here, the variable NewCompanyNum is
created within the ado itself with the following steps:

*Create contiguous variable
egen NewCompanyNum = group(CompanyNum)
summ NewCompanyNum
local Count = r(max)
dis `Count'

where CompanyNum is a numeric variable assigned to the starting
company data well upstream of this program.  Is there some restriction
on creating a new variable in the ado?  Do all the variables it uses
have to exist prior to its execution?  Thanks for any suggestion
anyone might have.


Thomas Jacobs

*   For searches and help try:

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