Closed austinbean closed 3 years ago
I can’t figure this one out.. What is the error?
From: Austin Bean @.> Date: Thursday, April 15, 2021 at 2:21 PM To: austinbean/bpci @.> Cc: mollycandon @.>, Mention @.> Subject: [austinbean/bpci] can't run analysis twice (#9)
@mollycandonhttps://github.com/mollycandon @odirienzhttps://github.com/odirienz
The merge variable county was renamed and then save, replace executed.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/austinbean/bpci/issues/9, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMIJIKP5EZDGVO6RHFJ5I5TTI5DBXANCNFSM43AF6BPQ.
@mollycandon
The error is that BPCI_analysis_pt2.do
starts w/ the following:
Use x
rename old_variable new_variable
merge new_variable using y
save, replace
Now suppose you hit an error later in BPCI_analysis_pt2.do.
You fix the error.
You want to rerun it.
You either have to re-run the entire BPCI_analysis.do
(i.e., part 1) or manually rename new_variable
because you renamed it and saved.
It will say cannot find old_variable
because (since you save, replace
-d) there is now no more old_variable
.
Got it got it ok I think I have an idea.
From: Austin Bean @.> Date: Friday, April 16, 2021 at 9:20 AM To: austinbean/bpci @.> Cc: mollycandon @.>, Mention @.> Subject: Re: [austinbean/bpci] can't run analysis twice (#9)
@mollycandonhttps://github.com/mollycandon
The error is that BPCI_analysis_pt2.do starts w/ the following: Use x rename old_variable new_variable merge new_variable using y save, replace
Now suppose you hit an error later in BPCI_analysis_pt2.do.
You fix the error.
You want to rerun it.
You have to re-run the entire BPCI_analysis.do (i.e., part 1) or manually rename new_variable because you renamed it and saved.
It will say cannot find old_variable because (since you save, replace-d) there is now no more old_variable.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/austinbean/bpci/issues/9#issuecomment-821251324, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMIJIKNIJQNOOZR4MSHX7PDTJBITNANCNFSM43AF6BPQ.
Olivia is a “save, replace” enthusiast so I just renamed the merged files and took out at least 5 lines of saving/replacing.
From: Candon, Molly Molly.Candon@Pennmedicine.upenn.edu Date: Friday, April 16, 2021 at 10:54 AM To: austinbean/bpci @.***> Subject: Re: [austinbean/bpci] can't run analysis twice (#9) Got it got it ok I think I have an idea.
From: Austin Bean @.> Date: Friday, April 16, 2021 at 9:20 AM To: austinbean/bpci @.> Cc: mollycandon @.>, Mention @.> Subject: Re: [austinbean/bpci] can't run analysis twice (#9)
@mollycandonhttps://github.com/mollycandon
The error is that BPCI_analysis_pt2.do starts w/ the following: Use x rename old_variable new_variable merge new_variable using y save, replace
Now suppose you hit an error later in BPCI_analysis_pt2.do.
You fix the error.
You want to rerun it.
You have to re-run the entire BPCI_analysis.do (i.e., part 1) or manually rename new_variable because you renamed it and saved.
It will say cannot find old_variable because (since you save, replace-d) there is now no more old_variable.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/austinbean/bpci/issues/9#issuecomment-821251324, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMIJIKNIJQNOOZR4MSHX7PDTJBITNANCNFSM43AF6BPQ.
@mollycandon @odirienz
*merge with Area Resource File data rename county fips merge m:1 fips using "${datadir}DiRienz_ahrf.dta" drop _merge save "${datadir}DiRienz_data_all.dta", replace
The merge variable
county
was renamed and thensave, replace
executed.