Introduction to Programming Loops in Stata

  Рет қаралды 19,120

Mike Jonas Econometrics

Mike Jonas Econometrics

Күн бұрын

Пікірлер: 27
@flavianepomuceno7465
@flavianepomuceno7465 3 жыл бұрын
Thank you very much, Mike! You make it seem so simple... I am much more confident now thanks to your guidance. Please post more videos like this when you can.
@mikejonaseconometrics1886
@mikejonaseconometrics1886 3 жыл бұрын
Thanks, will do!
@akakhbod
@akakhbod 4 жыл бұрын
Thanks a ton . please make more stata videos. They are really great ...
@marianafernandezdelcastill4673
@marianafernandezdelcastill4673 2 жыл бұрын
Hi, is there a way to use a loop to display multiple regression results as you did in the last section of the video but without using a time variable?
@yeuandylee1967
@yeuandylee1967 4 жыл бұрын
Hi Mike, Thank you for the posting. If I have data about unemployment rate (UNRATE) and corruption (CRP) across 20 countries (country id from 1 to 20) and if I want to run a regression "reg UNRATE CRP" for each country, how can I do this using the loops codes?
@luistato7437
@luistato7437 4 жыл бұрын
Incredible stuff. This really really helped me out in my thesis. I really appreciate it man. Thanks a lot and keep up the good work :D
@minhtran2723
@minhtran2723 3 жыл бұрын
Hi Mike, Could you give me an advice for my case? I have panel data of 100 companies with time frame from 2009 - 2017. Now, I need to run regression for each company and save coefficient of each regression. Thank you very much!
@gereleebat-erdene7096
@gereleebat-erdene7096 4 жыл бұрын
Thnk u so much. I rlly appreciated for this video. Do u have any book recommendation for this entire loop thing?
@mikejonaseconometrics1886
@mikejonaseconometrics1886 4 жыл бұрын
I added a link in the description for "An Introduction to Stata Programming" by Baum, which covers loops, as well as many, many other useful topics. The "Microeconometrics Using Stata" book (also linked in description) has some examples of loops as well.
@haimkichik
@haimkichik 4 жыл бұрын
Nice video!!! Thanks so much!
@mikejonaseconometrics1886
@mikejonaseconometrics1886 4 жыл бұрын
Thank you, Haim - I’m very glad you found the video to be helpful. Please let me know if there are other topics you’d like me to cover.
@LordFrega
@LordFrega 3 жыл бұрын
this really was very helpful! thank you so much
@jagatdave
@jagatdave 7 ай бұрын
@Mike Jonas___ Can you pelase share Federal reserve data with this video? If possible, Please upload a new video showing how to down load Federal reserve data into STATA through API Key.... Just a request.. Thanks for the video.
@johnaibinu683
@johnaibinu683 4 жыл бұрын
@ mike Jonas econometrics; I have a quarterly dataset (1999q1-2015q4) with several IDs. But I want to keep the data if the value of a variable (Total loans) >= 30000 irrespective of the year and quarter. How do I set the function for such exercise? I defined available =0, and replace available =1 if Total loans>= 30000. But along the lines, in Q1 for some ID they are =0 and in q4=1 but I want to keep All years and quarters as long as it is =1 in a single quarter. Does anyone have an idea?
@mikejonaseconometrics1886
@mikejonaseconometrics1886 4 жыл бұрын
Try this: By ID: egen maxloans=max(loans) // keep if maxloans >=30000
@a.hashmi3393
@a.hashmi3393 3 жыл бұрын
thanks a lot
@hagit_zivhagai9904
@hagit_zivhagai9904 4 жыл бұрын
there is problem with the sound
@tiffanypothapragada7156
@tiffanypothapragada7156 3 жыл бұрын
Thought it was just me!
@jimisunkissed6164
@jimisunkissed6164 3 жыл бұрын
Hello guys whoever you are reading this i would very appreciate it if you would let me know how i can solve this problem. So right now this is the command that i would like to repeat: _pctile expcap [fweight = wert] if province == "Aceh", p(20) replace p20prov = r(r1) if province == "Aceh" the command above works perfectly with the value "Aceh" is the variable in the list which has many values I was trying this line of command, however it just won't work: foreach prov of province { _pctile expcap [fweight = wert] if province == "'prov'", p(20) replace p20prov = r(r1) if province == "'prov'" } if you know how to solve it please reply in the comment section thank you
@Azam_Pakistan
@Azam_Pakistan 2 жыл бұрын
where is the audio? can hear just whispers.
@mikejonaseconometrics1886
@mikejonaseconometrics1886 2 жыл бұрын
Will delete the video, my apologies.
@FearfullySculpted
@FearfullySculpted 4 жыл бұрын
Hello, could you please help me with a Stata assignment? Could I schedule a zoom meeting with you? The assignment is due tomorrow and I’m truly lost with STATA.
@mikejonaseconometrics1886
@mikejonaseconometrics1886 4 жыл бұрын
I'm not available over zoom, but can try to respond to specific questions over email: mrjonas23@gmail.com
@refji8378
@refji8378 4 жыл бұрын
The thing I hate the most in stata. 😵
@jefersondeybi6923
@jefersondeybi6923 3 жыл бұрын
I cannot hear you bro, and I am not deaf.
Stata Tutorial: Intro Data Cleaning with Panel Data
22:07
Mike Jonas Econometrics
Рет қаралды 41 М.
The very basics of Logit and Probit models in Stata.
28:33
Mike Jonas Econometrics
Рет қаралды 24 М.
Life hack 😂 Watermelon magic box! #shorts by Leisi Crazy
00:17
Leisi Crazy
Рет қаралды 80 МЛН
Synyptas 4 | Арамызда бір сатқын бар ! | 4 Bolim
17:24
Basics of Loop in Stata | forvalues loop | foreach loop
10:01
The Data Hall
Рет қаралды 2,9 М.
How to Make Maps in Stata
21:09
Mike Jonas Econometrics
Рет қаралды 23 М.
Financial Data in Stata: Getsymbols, Lags, Differences and Returns
21:21
Mike Jonas Econometrics
Рет қаралды 8 М.
Using local macros in Stata
28:37
Alan Neustadtl
Рет қаралды 37 М.
Stata - How to use groups and loops
8:28
Steffen's Classroom
Рет қаралды 6 М.
Stata Tutorial: Basic Panel Regression
19:10
Mike Jonas Econometrics
Рет қаралды 20 М.
Stata Lecture 13: Understanding Foreach, Forvalues, and Levelsof Loop
8:51
Generative AI in a Nutshell - how to survive and thrive in the age of AI
17:57
Using local macros in a foreach loop
15:19
Alan Neustadtl
Рет қаралды 24 М.