can you clarify the lag0 estimate? the estimates jump from from lead 2 to lag 0 and the cut line seems to fall 1 period prior. I'm normally accustomed to having the base period be set to zero and everything else based off of that period.
@tawilk3 ай бұрын
anyone else getting an error; "command matsort is unrecognized" when trying to run the eventdd command? I'm using state 18 so maybe there's an updated package for it. any help would be appreciated.
@lauragonzalez55845 ай бұрын
Is it possible to implement eventdd with a Poisson regression instead of an OLS?
@Learn-Coding-with-Us5 ай бұрын
Thank you so much for your question. But I don't know whether it is possible. When I asked ChatGPT, it gave me the following information. I do not know if that will be helpful: ............................................................................... The "eventdd" command in Stata is primarily designed to estimate dynamic treatment effects using an event study design, typically with OLS regression. However, if you're interested in running a Poisson regression (which is often used for count data) within an event study framework, you would need to adapt the approach. To implement an event study with Poisson regression, you would follow these general steps: 1. Manually create the event-time dummies: First, you would manually create the event-time dummies that correspond to the time periods before and after the event. These are the same variables that "eventdd" creates for OLS. 2. Run the Poisson regression: Once you have your event-time dummies, you can include them as independent variables in a Poisson regression using the poisson command in Stata. Here is an outline of how you might do this: stata Copy code * Create event-time dummies gen event_time_minus_2 = (time_since_event == -2) gen event_time_minus_1 = (time_since_event == -1) gen event_time_0 = (time_since_event == 0) gen event_time_plus_1 = (time_since_event == 1) gen event_time_plus_2 = (time_since_event == 2) * Run Poisson regression poisson outcome_var event_time_minus_2 event_time_minus_1 event_time_0 event_time_plus_1 event_time_plus_2 controls 3. Interpret coefficients: The coefficients from the Poisson regression on the event-time dummies will give you the relative rate of the outcome variable at each event time relative to the baseline period. This approach allows you to perform an event study with a Poisson model. However, keep in mind that this is not as straightforward as using eventdd with OLS, and interpreting the results from a Poisson regression can be more complex. ...................................................................................
@AAFREENKHAN-gb8xl7 ай бұрын
Hi, I followed the same steps but in the end, all of the values of the variables became 1. please let me know how to correct it
@savannahwalske10717 ай бұрын
thank you for this! what would change if you were converting from long-format to wide-format?
@rashid.alkhadhuri8 ай бұрын
You are a life saver
@NR-rf2bg8 ай бұрын
what about mac bro
@mubashirgc10 ай бұрын
wonderful
@Learn-Coding-with-Us10 ай бұрын
You are most welcome!
@atiquezaman7128 Жыл бұрын
This is amazing, thank you. Do you have a suggestion for dealing with data with multiple header rows?
@thalesromao2239 Жыл бұрын
Tks Man
@yonghyeon123 Жыл бұрын
This just saved hours of work. GG
@CarlJackson-w6j Жыл бұрын
Hello,I have a question.What are the connections and differences between eventdd and the event study that should calculates CAR?
@stephan8345 Жыл бұрын
Thanks, amazing!
@Learn-Coding-with-Us10 ай бұрын
You are most welcome!
@top10trendingitems88 Жыл бұрын
Thx for sharing. Any idea on how to add labels to table that results from createtableone in tableone package in r?
@mariusvdb7048 Жыл бұрын
My man
@chandankumarswain9919 Жыл бұрын
Vedio is very helpful for beginners. I have one doubt that is have health insurance or have not health insurance, taken for which period (before or after) in your study? In DiD outcome variable, which period considered?
@sabaaslam4766 Жыл бұрын
diff command shows error, could you please guide me what is the reason and how can I get results in form of before and after
@sabaaslam4766 Жыл бұрын
command diff is showing error please guide me
@아로-f6e Жыл бұрын
Hi, Thank you very much for your video. I tried exactly same thing but my stata will not plot the graph, after *eventdd asmrs pcinc asmrh cases i.year i.stfips, timevar(timeToTreat) ci(rcap) /// cluster(stfips) graph_op(ytitle("Suicide") xlabel(-20 (5) 25)) * command, Is there alternative way to plot it? (mine only shows the Linear regression result...)
@akashkovuri4202 Жыл бұрын
you just saved hours of time. Thanks bro.
@Learn-Coding-with-Us10 ай бұрын
You are most welcome!
@zodos94 Жыл бұрын
is there a difference between using diff command and didregress please?
@mangomilkshakelol2 жыл бұрын
what's the shortcut for mac for 0:44 to populate the pivot table window?
@prakashanisingh37752 жыл бұрын
Can you please provide your do file? It will be really helpful.
@Learn-Coding-with-Us2 жыл бұрын
Hi Prakashani, I believe you can create the same do file by watching my video. Thank you.
@adamsmith29662 жыл бұрын
Apu, Me, Tariq from Economics, IU 2010-11. Thank You & best wishes for your KZbin channel
@Learn-Coding-with-Us2 жыл бұрын
You are most welcome!
@c.comploj37752 жыл бұрын
Thank you! Please continue doing videos!
@Learn-Coding-with-Us2 жыл бұрын
Hi Comploj, you are most welcome, and thank you for your valuable comments.
@onyinyeekeagwu19932 жыл бұрын
This was super helpful and easy to follow
@Learn-Coding-with-Us2 жыл бұрын
Thank you so much for your wonderful comment!!
@LifeLearned4602 жыл бұрын
A nice one but next time type the commands as you go
@anthonygalka43262 жыл бұрын
Oh my Gosh you are AWESOME dude!!! I was looking at so many other methods to convert from Long to Wide and this by far..... by far the easiest way to do it! Thank you!
@Learn-Coding-with-Us2 жыл бұрын
You are most welcome!
@mdrashidulislam34692 жыл бұрын
Thanks
@mariadelpilarfloreshernand36462 жыл бұрын
I can't install the program, can you help me please?
@cristinaecheverri37242 жыл бұрын
Thank you so much. however, I cannot see the graph. it wasn't made by the command
@Alphaswifty2 жыл бұрын
this was great, it was simple and easy to understand. thank you so much for uploading this! :)
@florinemaan78382 жыл бұрын
Isn't using the "xtreg" command better because you have panel data? In stead of "reg"?
@Learn-Coding-with-Us2 жыл бұрын
my data is repeated cross-sectional data. it is good to use "xtreg" command if you have panel data
@priyankagoyal13312 жыл бұрын
Which is better- event study in Excel or stata? Which is less time consuming? I have to apply it on a large no. of companie. Kindly guide.
@fabiangodelitz73072 жыл бұрын
Hello! Thank you very much, the video was very helpful so I subscribed to your channel! I just have one question - the graph_op command doesn't work for me and I cannot install it either. How can I get such a nice graph like you?:) All the best
@Learn-Coding-with-Us2 жыл бұрын
Thank you so much for your support for our channel. Did you install "eventdd" command in your stata? If not, please install it following my video 2:23. If yes, you can try again by reinstalling the command using the command line I have mentioned 2:23 in my video. Please let me know if that solves your problem. Thank you again.
@fabiangodelitz73072 жыл бұрын
@@Learn-Coding-with-Us I had a bug in the dataset, now it gives me the graph automatically, just like it should. Thanks for your help! All the best, Fabian
@weixiaowu35432 жыл бұрын
@@fabiangodelitz7307 Hi Fabian, Mine also didn't show the graph. What kind of bug do you have? Please give me a clue so that I can clean up my data. Thx!
@sputnijk2 жыл бұрын
thanks atiq
@Learn-Coding-with-Us2 жыл бұрын
You are most welcome.
@Tvanlamoen2 жыл бұрын
hello madam, I noticed you removed the treatment and post dummy variables from the regression. I assume its because of collinearity. But does STATA not do this automatically, or do we have to do it manually?
@Tvanlamoen2 жыл бұрын
I have a xtset firm year when i run "xtreg diff post treat i.year , fe" it automically drop "treat" , but it doesnt drop "post"
@tinarolle34342 жыл бұрын
Great video! I´m working on similar data but I get the message "no baseline found". What could be the reason for this? I have tried to xtreg my data... but I still get the same error
@karthikasujatha7140 Жыл бұрын
How did you solve this? I am having the same issue
@MH-ov6sy2 жыл бұрын
By far the best tutorial on this subject! Keep up the good work! Congrats on a great tutorial
@Learn-Coding-with-Us2 жыл бұрын
Thank you so much for these beautiful comments!
@rithikpopat83222 жыл бұрын
Hi, Thank you very much for your video. Do you think that similar analysis could be used to conduct an event study analysis on the impact of 9/11 on airline stocks for my undergraduate dissertation?
@joshuaberman15642 жыл бұрын
Hello Mam, I just wanted to ask a general empirical question. Why when you control for state fixed effects there is no state1 included in the regression?
@Learn-Coding-with-Us2 жыл бұрын
In my video, when I run the regression, STATA dropped state1 because of collinearity.
@mikkelsommerlund19882 жыл бұрын
When I am running the command eventdd, I get an error "command matsort is unrecognized". Can you please explain me why, I am getting this error?
@Learn-Coding-with-Us2 жыл бұрын
run this one to install: ssc install matsort
@md.shahriyerahmed12452 жыл бұрын
In the whole internet there is only one video of "event study on stata"
@Learn-Coding-with-Us2 жыл бұрын
Thank you so much.
@yanvianna47372 жыл бұрын
I'm having difficulties applying the method when we have more than 1 time period before and after. Could you show an example like this?
@Learn-Coding-with-Us2 жыл бұрын
Hi Yan, Thank you so much for your comment and subscribe to our channel. Can you write a little bit details? I will explain to you if I know the method.
@okielyrics3 жыл бұрын
thank you so much, it is really helpful
@Learn-Coding-with-Us3 жыл бұрын
Thank you so much for watching this video. We are glad that you found it helpful. Please like this video. Share with your friends. Subscribe to our channel! Please stay tuned!
@rchanes403 жыл бұрын
i can´t do it. "egen ... std() may not be combined with by"
@Learn-Coding-with-Us3 жыл бұрын
Can you use "help egen" for confirmation of what kind of function you can use with "egen" command? Please do that. To my knowledge, "egen" can not do with the std() function. You need to use the basic variance formula: sigma^2 = E(x^2) - [E(x)]^2 to find the standard deviation. Please use "help egen" command to learn more. Thank you so much for watching our videos. Please like the video, share it with your friends, and subscribe to our channel. Stay tuned!
@michellekatarine27003 жыл бұрын
Thank you so much for your video! :) I am currently trying to do my own event study for an university seminar & I struggle a bit with it. But your video definitely helps!! But one question: Why don't we use the treatment dummy "post" in the regression? I think it is really important in order to account for differences before&after the new law has passed? Can you please explain why you don't include it in the regression. Thank you! :)
@Learn-Coding-with-Us3 жыл бұрын
Hello Michelle, I am so sorry for the late reply. An event study model is an advantageous tool in estimating the treatment effects of the pre-and post-treatment periods. However, since treatment can be staggered - where the treatment group are treated at different time periods in states, I create a new variable in this video, called "timeToTreat" to address this issue, and run the regression with this variable instead of treatment dummy "post" in the regression. I hope you understand. Thank you so much for watching our videos. Please like the video, share it with your friends. Thanks again.
@michellekatarine27003 жыл бұрын
@@Learn-Coding-with-Us Thank you for your reply! This makes totally sense to me :) Best wishes from Germany :)
@Learn-Coding-with-Us3 жыл бұрын
@@michellekatarine2700 You are most welcome!
@ebaifrancis14283 жыл бұрын
Great video. Are those stars added to variables we wish to keep?? I have tried but I get an error message that I have attempted to create an a matrix with too many rows.
@ebaifrancis14283 жыл бұрын
I figured it out. You have to adjust the matsize to a larger value by the command: set matsize 5000.
@Learn-Coding-with-Us3 жыл бұрын
I did not understand your question. Can you mention the minutes where you were watching?
@ebaifrancis14283 жыл бұрын
@@Learn-Coding-with-Us I figured out the solution. I just had to readjust the matsize of my Stata. Upon doing so, I got the output
@pollianylima133 жыл бұрын
Hey, thank you for the video. But can you put a subtitle on it? Cause english is not my first language, and I have some trouble to understand even when it comes from natives.
@Learn-Coding-with-Us3 жыл бұрын
Hi Polliany, you are most welcome, and thank you for your valuable comments. I have added the subtitle for you. Please visit the video. I think it will be very helpful for you now. Please like the video, share it with your friends. Thanks again.
@jinseokpark66643 жыл бұрын
Could you let me know the link to the data set so that I can follow your instruction better?
@Learn-Coding-with-Us3 жыл бұрын
Hi Jin, in my video, 2:48, you can find the link to the data set. Please go through the video. Thank you so much.