I'm trying to stack several datasets. Each dataset has roughly 50 variables.
Some of these are string and some numeric. The source of my problem is that
any given variable could be numeric in one dataset and string in another.
When these two fields are stacked, Stata ignores the values of this variable
in the using dataset.
I thought that one way around this problem would be to string all variables
in the data, then stack them, and then destring those that I want to be
numeric, at the end. Can anyone think of code that would string all
variables that are not already string, keeping the same name variable names?
I have had no luck so far.
Probably you should use the -unab- command to get a list of all variables,
and -confirm- to check their types. Something like: