Hello, I am making changes to a data file then saving under a different name. The file with the new name "demo_working" is not being saved in the same directory (I don't know where it is being saved) from which I took the original file "DEMO_CHARGE_RAW_jm"
Below is my code. When I open up the demo_working file in the folder "jm_working" it is not saved with the changes that I made.
Any suggestions?
use "/Users/u0521032/Library/CloudStorage/OneDrive-UniversityofPittsburgh/LeaRRn-Jake/jm_working/DEMO_CHARGE_RAW_jm.dta", clear
format %16.0f PAT_ENC_CSN_ID // format enc id
rename *, lower // all lower case
capture drop dos_rc //making into usable date
gen dos_rc = date(orig_service, "DM20Y")
format dos_rc %td
keep pat_enc_csn_id - race visit_number dos_rc
sort pat_enc_csn_id visit_number dos_rc
order visit_number, after (pat_enc_csn_id)
capture drop n_1
by pat_enc_csn_id: gen n_1 = _n
keep if n_1 == 1
save demo_working, replace /// removed payment variable
Related Posts with Stata not saving correctly
how to find matched pairs (treatments & controls) when running Coarsened Exact Matching (CEM)I've been studying CEM and was wondering if there's any way to find out which treatments is matched …
Latent Class Analysis QuestionHello All, I have a "rookie" LCA in Stata question. I usually do this type of analysis in Mplus. I …
matching one variable with another variable?Dear All, I found this question here (https://bbs.pinggu.org/thread-7419648-1-1.html). The data is …
Resetting Different Locals for each loop Hello, I am trying to create a loop using the following data. The 'destination', 'originau' variab…
Standard Deviation /Volatility of Sales Growth Dear all I need to take the standard deviation of every realization of annual sales growth over the…
Subscribe to:
Post Comments (Atom)
0 Response to Stata not saving correctly
Post a Comment