Hello,
I'm wondering if there is a way to save descriptive statistics in a local macro, in one line. I could use sum, detail and then use r(min) r(max), etc, or I could use egen var = min(var2) etc, but I would prefer to do this in one line if possible, because I don't need these variables, and I think keeping track of many tempvars will get messy.
Here's an example of what I'd like to do. Note that this won't run, it's just an example.
Or, something like:
Any ideas? Thanks!
I'm wondering if there is a way to save descriptive statistics in a local macro, in one line. I could use sum, detail and then use r(min) r(max), etc, or I could use egen var = min(var2) etc, but I would prefer to do this in one line if possible, because I don't need these variables, and I think keeping track of many tempvars will get messy.
Here's an example of what I'd like to do. Note that this won't run, it's just an example.
Code:
file write report "At Six Months, `=mean(incf6) if rain == 1', `=min(incf6) if rain ==1 & incf6 > 0' "
Code:
loc minvar = min(var)
Comment