Stata Tutorial: Dealing with Dummy Variables

  Рет қаралды 48,994

Mike Jonas Econometrics

Mike Jonas Econometrics

Күн бұрын

How to create dummy variables in Stata, and a short review of how to interpret estimated dummy coefficients in a multiple linear regression model.
Creating dummy variables using 'encode' from text/string source variable:
• Stata Tutorial: Encode...
Slope-dummy and interaction effects:
• Slope-dummy and Intera...
Link to "Gentle Introduction to Stata"
www.amazon.com...
Link to the excellent Introduction to Econometrics Textbook by AH Studenmund:
www.amazon.com...
Link to Jeffrey Wooldridge Introductory Econometrics Textbook:
www.amazon.com...
My Twitter is:
/ michaelrjonas
My Google Scholar Page:
scholar.google...
ResearchGate:
www.researchga...

Пікірлер: 33
@AI_Masterpiece_
@AI_Masterpiece_ 2 жыл бұрын
Very helpful! Thank you very much. Have a great day!
@mikejonaseconometrics1886
@mikejonaseconometrics1886 2 жыл бұрын
Thanks, you too!
@surenperera7010
@surenperera7010 Жыл бұрын
Hey Mike. Thanks a lot for the well explanation.
@rjyuan7428
@rjyuan7428 4 жыл бұрын
Amazing! Works better than defining the variable in one command
@mikejonaseconometrics1886
@mikejonaseconometrics1886 4 жыл бұрын
Glad it helped!
@肖哲-i8w
@肖哲-i8w 2 жыл бұрын
Thank you Mike, you did a good job
@mikejonaseconometrics1886
@mikejonaseconometrics1886 2 жыл бұрын
Thank you too!
@دعاءعلى-ش9ن
@دعاءعلى-ش9ن 4 жыл бұрын
thanks , clear , simple & interesting
@Just_Another
@Just_Another 3 жыл бұрын
Hey Mike, congrats on your great work! One question: how do I compute p-value for the omitted dummy variable? Thanks
@scotthu9833
@scotthu9833 4 жыл бұрын
Another great video Mike! But for the first method you introduced, I do not suggest using it because it might cause some problems if there are missing values in the variable lotsize.
@nursesofyaalqahtaniy7424
@nursesofyaalqahtaniy7424 3 жыл бұрын
Thank you for this well explained video my question is how many observation minimally needed per each dummy variable ?
@dr.shumailameerperhiar1091
@dr.shumailameerperhiar1091 3 жыл бұрын
BEAUTIFUL VIDEO
@11Samyo
@11Samyo 4 жыл бұрын
Hey Mike, say you were testing whether the number of bedrooms have a higher return in colonial areas than in non-colonial ones, how would you do this? Is there a video for this?
@mikejonaseconometrics1886
@mikejonaseconometrics1886 4 жыл бұрын
You will need to create a slope-dummy variable that interacts 'bedrooms' with the colonial style dummy. Here is the video:kzbin.info/www/bejne/h5SceqWpl7-Jrdk Hope that helps!
@chiaragaribaldi6297
@chiaragaribaldi6297 4 жыл бұрын
Hi Mike, do you know how the interpretation would change if I have a log-log function? Cobb Douglas linearised? Thank you!!
@adelez9856
@adelez9856 4 жыл бұрын
Hi, Thank you for the video, but here 9010 is an integer, can we do it also to the string?
@suzanacvijanovic5011
@suzanacvijanovic5011 Жыл бұрын
Hey Mike, you are super! Can you help me? I need serie of volatility for gdp and inflation rate?I 'm working on my phd disertation.
@sudhakarmarri6027
@sudhakarmarri6027 4 жыл бұрын
Sir, I have a dataset in stata which has a string variable having names i want to list only those names which starts or contains a particular characters. Please help me out with the command My question in brief sir .. for example I have a dataset with two variables one string variable and another numeric variable i.e., name and age if i want to list people who are under age of 10 , the command is like list if age < 10 simply stata list out the data, but i want to list out the only people who's names are starting with "S" or a part of name with "ra".. Usually in mysql we write this command select * from xxxx where name like "S%" or name like "%ran%" Which is very simple... but i couldn't get in stata.. Please help me out.. Thank You Sir
@afaturo
@afaturo 5 жыл бұрын
Halo Mike..this is Fatur from Indonesia. I love your tutorial...How to make dummies with many categories? i.e. Primary school=1 juniorhigh=2 seniorhigh=3 etc.?
@mikejonaseconometrics1886
@mikejonaseconometrics1886 5 жыл бұрын
Hello Fatur. If you have a categorical variable such as "education" that takes on a value of 1=primary, 2=junior high, etc; then you can use the factor variable expansion option in Stata. for example: xi:reg y i.education will estimate the regression with m-1 dummy variables if your education variable has m categories. type "help xi" in stata for more info.
@Angie-wc1bu
@Angie-wc1bu 2 жыл бұрын
Thanks for this video Mike. In my regression result, the dummy variable has been omitted due to collinearity - please how can this be fixed? Thank you once again.
@mikejonaseconometrics1886
@mikejonaseconometrics1886 2 жыл бұрын
I would have to see the data to tell for sure, but this can happen when multiple dummy variables are used: the treatment/control groups may perfectly overlap. Check the correlation coefficients among all of your variables for perfect correlations.
@Angie-wc1bu
@Angie-wc1bu 2 жыл бұрын
@@mikejonaseconometrics1886 Thanks very much Mike for your quick and kind revert. My dependent variable is the gini coefficient and my independent variable is the fiscal adjustment size (scaled in GDP) and the dummy (the slope of the adjustment size) corresponds to 1 for years in which fiscal adjustments were implemented and 0 otherwise. I haven't yet introduced any control variables nor factored yet for country and fixed effects. Please what do you think could be wrong? Thank you so very much.
@pietislekker
@pietislekker 2 жыл бұрын
@@Angie-wc1bu Hey have you found a solution to this? I have the same issue..
@Angie-wc1bu
@Angie-wc1bu 2 жыл бұрын
@@pietislekker No I haven't.
@point4496
@point4496 2 жыл бұрын
ive created dummy variables for different years, gen y18=0, replace y18=1 if Year==2018. done that for 3 different years but when i add them to my regression y20 comes out as omitted
@mikejonaseconometrics1886
@mikejonaseconometrics1886 2 жыл бұрын
You must omit one of the dummy variables to avoid perfect multicolinearity. In general, if you have m categories, use m-1 dummy variables. The omitted category becomes the baseline.
@point4496
@point4496 2 жыл бұрын
@@mikejonaseconometrics1886 yeah i forgot that i have to use one year as the base. Thank you
@kaizoku4life
@kaizoku4life 4 жыл бұрын
thanks
@dayaniisaiahpaul245
@dayaniisaiahpaul245 2 жыл бұрын
I have an enquiry about dummy verable so please help nd how can I contact you
@mikejonaseconometrics1886
@mikejonaseconometrics1886 2 жыл бұрын
Hi, you can email me at mrjonas@usfca.edu. Let me know your question and I’ll see if I can help.
@ninapavlopoulos3697
@ninapavlopoulos3697 2 жыл бұрын
THANK YOU SO MUCH SIR JESUS WAS BORN TODAY
Your First .do File in Stata
6:11
Mike Jonas Econometrics
Рет қаралды 4,2 М.
Slope-dummy and Interaction Coefficients in Stata
12:56
Mike Jonas Econometrics
Рет қаралды 16 М.
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 19 МЛН
ПРИКОЛЫ НАД БРАТОМ #shorts
00:23
Паша Осадчий
Рет қаралды 5 МЛН
МАИНКРАФТ В РЕАЛЬНОЙ ЖИЗНИ!🌍 @Mikecrab
00:31
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 38 МЛН
Stata - How to create dummy variables in multiple ways!
9:34
Steffen's Classroom
Рет қаралды 17 М.
Statistics 101: Multiple Linear Regression, Dummy Variables
20:59
Brandon Foltz
Рет қаралды 341 М.
Stata Tutorial: Basic Panel Regression
19:10
Mike Jonas Econometrics
Рет қаралды 20 М.
Three Ways to Create Dummy Variables in Stata | Data Management | Stata Tutorials Topic 32
8:50
Dr. Bob Wen (Stata, Economics, Econometrics)
Рет қаралды 1,1 М.
Categorical Variables in Stata
7:56
SebastianWaiEcon
Рет қаралды 137 М.
Dummy Variable and Its Interpretation Part 1
25:35
Tanveer Ahmad
Рет қаралды 10 М.
The very basics of Logit and Probit models in Stata.
28:33
Mike Jonas Econometrics
Рет қаралды 23 М.
Multiple regression using dummy coding in Stata (June 2022)
36:38
Mike Crowson
Рет қаралды 22 М.
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 19 МЛН