Hi all,
I'm trying to create a list of observation counts, across a subset of data [census tracts] using an "if" command. I'd like Stata to return "0" for observations that don't satisfy the "if" command.
Currently:
collapse (count) x if x>50, by(tract)
gives a list of tracts that satisfy the if command, but excludes tracts that don't. I'd like to include the tracts that don't satisfy the command with value of "0"
Any recommendations? Many thanks.
Jay
I'm trying to create a list of observation counts, across a subset of data [census tracts] using an "if" command. I'd like Stata to return "0" for observations that don't satisfy the "if" command.
Currently:
collapse (count) x if x>50, by(tract)
gives a list of tracts that satisfy the if command, but excludes tracts that don't. I'd like to include the tracts that don't satisfy the command with value of "0"
Any recommendations? Many thanks.
Jay
Comment