Comments (2)
Sorry this is confusing. The two main utilities are naxMerge and naxJoinby, and their points are really just to print more information to the log file than the built-in Stata commands do; their outputs are the same.
More specifically these commands also print how many records end up not included in the joined/merged dataset--if not performing a full (outer) join/merge.
For example, at line 36 in etlIpumsCzOcc.do, we could have actually used:
merge m:1 year occ using occ1990ddAssembled, keep(master match)
Had we done so, Stata would have printed the following to the log:
Result # of obs. ----------------------------------------- not matched 24,932,304 from master 24,932,304 (_merge==1) from using 0 (_merge==2) matched 55,647,994 (_merge==3) -----------------------------------------
Yet I find this deceiving--the '0' on the 'from using' line is actually not accurate; for some reason Stata prints a 0 here whenever we ask it to not keep any unmatched 'using' records (i.e. whenever we specify keep(master match)
).
Yet not wanting to keep these records doesn't mean we wouldn't have liked to know how many there were--for debugging and quality control.
Alternatively, naxMerge prints the following:
Result # of obs. ----------------------------------------- not matched 24,932,313 from master 24,932,304 (_merge==1) from using 9 (_merge==2) matched 55,647,994 (_merge==3)
Notice the '9' next to 'from using'--there were 9 records in occ1990ddAssembled that weren't matched and which we ended up dropping.
Syntax
As for the syntax, the first part in quotes is no different than what we would have given the built-in merge command: m:1 year occ using occ1990ddAssembled
. The 1 0 1
is like writing keep(master match)
: the first 1 means we keep any unmatched 'master' records, the 0 means we don't keep any unmatched 'using' records, and the last 1 means we keep all matched records. Finally, the last part in quotes is just a description that is also printed to the log.
Other utilities
As for the other utilities, subfile_occ1990dd_occgroups is Dorn's occupation grouping file ([A8] from his data page) and naxSaveOutput saves whatever fitted regression parameters may be in memory to outputs.dta (discussed more here).
Does this help at all?
from ad-replication.
Thanks Neil! Now, it is clear what your utilities do and they are definitely helpful!
from ad-replication.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ad-replication.