Stata Basics #7: How to Use Local Macros in Stata (using COVID-19 data)

  Рет қаралды 7,600

Statastic!

Statastic!

Күн бұрын

Пікірлер: 18
@Burak_verner
@Burak_verner 4 ай бұрын
Excellent video! A short contribution: Instead of the 5 lines from 13 to 17, one line of command gets the job done: g newdate=date(date,"YMD")
@TheGeoeconomicsGuy
@TheGeoeconomicsGuy 2 жыл бұрын
Your videos are fantastic. They helped me a lot. Please post more.
@plokijuh5830
@plokijuh5830 3 жыл бұрын
Thanks for your videos. Hope you will post more this year!
@edoardocattaneo4279
@edoardocattaneo4279 2 жыл бұрын
Thanks! This finally made me understand macros!
@jerryho6120
@jerryho6120 Жыл бұрын
Excellent and very helpful!
@elisamasiakwala3168
@elisamasiakwala3168 4 жыл бұрын
Thank you for your helpful tutorials, may you please do a tutorial on how to merge multiple datasets
@statastic
@statastic 4 жыл бұрын
Yes, I think I will do something soon. This seems to be quite the hot topic. :)
@brzydkareka
@brzydkareka 3 жыл бұрын
These are super helpful
@MissSunny426
@MissSunny426 3 жыл бұрын
Dear Sir, May I ask why do we generate the local macro final_vars with `final_vars' `var'_world? Thank you.
@statastic
@statastic 3 жыл бұрын
Hi Ziqing, we do this to define which variables should be shown eventually in the line graph. Again, it's one way for being more lazy while making the code more flexible. :)
@mathewosmuke5495
@mathewosmuke5495 3 жыл бұрын
What is the problem with the followin command to draw a line graph? *5. Draw Line graph line `final_vars' date
@statastic
@statastic 3 жыл бұрын
Seems correct. Make sure to always run the entire do file though. For local macros, you cant just execute one line, because stata "forgets" a local macro as soon as it stops executing. So in the do editor, always go ctrl+a --> ctrl+d.
@tiveavorn7408
@tiveavorn7408 2 жыл бұрын
Hello author. I follow your vdo instruction and practice until the end. it was good but at the end to draw the line it seems something wrong or different. The total death world seems not appear. Can help check me out. I used the data as 14 Sep 2022.
@Thejohnster1012
@Thejohnster1012 3 жыл бұрын
great vid, but I am confused, what stops the final date truncation code from continually dropping 5 extra days each time you run it? as of course after the first time the max date is now 5 days shorter than it was. Thanks!
@statastic
@statastic 3 жыл бұрын
That's because when we run the entire do file, it always loads the full data set in the beginning, so that only 5 days are dropped in total.
@zdavirandimuhammad1515
@zdavirandimuhammad1515 3 жыл бұрын
dear sir, we even cant hear your voice
@statastic
@statastic 2 жыл бұрын
Yes agreed, need to pump up the volume. xD I recorded this with 0 equipment... thanks for your feedback.
@zdavirandimuhammad1515
@zdavirandimuhammad1515 2 жыл бұрын
@@statastic please do notify us if you do have another video with audio. already subsrice you. thank you sir
Using local macros in Stata
28:37
Alan Neustadtl
Рет қаралды 37 М.
How Strong is Tin Foil? 💪
00:25
Brianna
Рет қаралды 57 МЛН
兔子姐姐最终逃走了吗?#小丑#兔子警官#家庭
00:58
小蚂蚁和小宇宙
Рет қаралды 15 МЛН
Smart Sigma Kid #funny #sigma
00:14
CRAZY GREAPA
Рет қаралды 92 МЛН
Каха и лужа  #непосредственнокаха
00:15
Stata: Reshaping Data using World Bank Open Data Sets
11:59
Todd R. Yarbrough, Ph.D.
Рет қаралды 23 М.
Using local macros in a foreach loop
15:19
Alan Neustadtl
Рет қаралды 24 М.
Stata Tips: Macros
14:24
Ajay Shenoy
Рет қаралды 10 М.
Local and Global Macros in Stata
15:35
The Data Hall
Рет қаралды 7 М.
Stata Tutorial: Intro Data Cleaning with Panel Data
22:07
Mike Jonas Econometrics
Рет қаралды 41 М.
Multilevel modeling using STATA (updated 2/9/18)
33:20
Mike Crowson
Рет қаралды 58 М.
6. Stata loop (foreach) combined with local and levelsof functionality
22:16
Learn data analytics with us
Рет қаралды 8 М.
Review of Panel data & Cross sectional data in Stata
27:46
Andrea Walters
Рет қаралды 19 М.
How Strong is Tin Foil? 💪
00:25
Brianna
Рет қаралды 57 МЛН