Repository navigation
Tidy the Next Steps Stata do-files - #12
Merged
Merged
Conversation
- Data discovery: build the lookup table from the three Next Steps subfolders only, so other .dta files under the working directory (such as datasets saved by the other scripts) are not listed. Put the temporary-file macros in double quotes, so the script also works when the path to Stata's temporary folder contains a space. - Household grid: remove a save of temp_mothers.dta that nothing used. - Combining data across sweeps: correct a comment (keep if, not drop if). - Reshape: reword the comment on the rename step, and create height and weight with gen double so no precision is lost. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four small changes to the downloadable Stata scripts for the Next Steps pages. The R code and the pages themselves are unchanged.
.dtafile under the working directory, which included datasets saved there by the other scripts. The temporary-file macros are now in double quotes, so the script also works when the path to Stata's temporary folder contains a space.save "temp_mothers.dta"that nothing used.keep if _merge == x, notdrop if).renamestep, andheightandweightare now created withgen doubleso no precision is lost.The Next Steps section being prepared for the Stata site (
CLS-Data/data-handling-stata) uses these same versions of the scripts, so the two sites stay identical.Testing: all six Next Steps do-files were run in Stata (StataNow 19.5, batch mode) on made-up data that has the real file and variable names, with no errors. They have not been run on the real data.
🤖 Generated with Claude Code