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
Survival analysis - data management queryDear all, I have two variables in my dataset namely "date of birth" "date of death" and would like …
Error: cannot compute an improvement -- discontinuous region encounteredGood night, I am trying to perform a probit ordered model with panel data and the following error a…
issues with global macro windows code on macI am trying to use a Master do file that someone has sent me from their windows computer. I have a M…
Including breakpoint dates in SVAR commandDear Stata users, I would like to know how to specify the code for a SVAR model in a such way that …
Combining categoriesI would like to combine two categories for one of my variables but I am not sure whether there is a …
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