Hi all,
I'm creating a STATA program that will:
1. open a dataset,
2. keep a user defined list of variables,
3. save these to a temporary file,
4. loop through numerous other datasets, repeating the above, appending the users variables to the temporary file.
The program runs fine when no variables are specified in the programs command (i.e. getdata, options) as I have the following in my program:
if "`varlist'" == "" {
local varlist "x y z"
}
However, when the user includes a list of variables when entering the programs command (i.e. getdata x y z, options), STATA returns a "no variables defined" error message.
No dataset is open when the user runs the program and I think that is the problem I'll need to get around.
Thanks for any help.
Related Posts with Problem with a program that will open a dataset with a user defined list of variables
Is beta regression model best for panel data type of data?Hello everyone, I am a newly registered member here, but I have been using this site already for th…
Changing structure of Data setI have an excel data set in the format having first Column as Date, and following Columns have daily…
What is the base category when two variables will interact with year dummy?Dear Stata User, I have one continuous independent variable (i.e., hhi), and other two variables d_n…
Checking merges over a very large number of filesMy apologies in advance if this has been covered - I have looked but haven't found anything quite th…
endogeneityDear researchers, I am using the generalized DID model “Two way-fixed effect”. I have more than two …
Subscribe to:
Post Comments (Atom)
0 Response to Problem with a program that will open a dataset with a user defined list of variables
Post a Comment