Fama Macbeth Regression in R
13:39
Calculate Portfolio Return in R
11:15
Download Financial Data in R
5:08
Working With Missing Values in R
8:04
Generate Sample Data in R
5:10
2 ай бұрын
Download Stock Data in R
4:56
2 ай бұрын
Two-way interaction Using R Part4
10:03
Margins and Margins Plot in Stata
11:12
Working with Dates in R
15:42
3 ай бұрын
Пікірлер
@victorgallegos-rejas6238
@victorgallegos-rejas6238 3 күн бұрын
Thanks for the video. It went straight to the point. You saved lots of time while cleansing my dataset. Awesome video!
@thedatahall
@thedatahall 3 күн бұрын
Welcome. Please keep sharing
@DrSunilKumar-k2w
@DrSunilKumar-k2w 4 күн бұрын
very informative and helpful video lecture. I have query that there are 20 companies in my sample whose stock split occurred in a specific year e.g., 2020, but their stock split happened on different dates in that year. in this case how indexlist (BSE Sensex) data will be stagged.
@tanushreedash5139
@tanushreedash5139 6 күн бұрын
Very nice explanation
@thedatahall
@thedatahall 5 күн бұрын
Thanks. Keep sharing
@sauravmedhi1407
@sauravmedhi1407 11 күн бұрын
it would be better if you share the do file of fama french 5 factor model as the file showing the panel data analysis in R
@thedatahall
@thedatahall 11 күн бұрын
Please email me at [email protected]
@bhuyashitalukdar2685
@bhuyashitalukdar2685 12 күн бұрын
sir can you please tell me how to change the stars and significance level for the correlation matrix, like if I want only 10, 5 and 1 % sig level?
@Lily-cl6zk
@Lily-cl6zk 14 күн бұрын
You are a great explainer thank you
@thedatahall
@thedatahall 13 күн бұрын
Thanks. Keep sharing
@KrishnenduJ-hc5fg
@KrishnenduJ-hc5fg 17 күн бұрын
Is there a way I could overlay one graph over another in Stata?
@thedatahall
@thedatahall 17 күн бұрын
U can do line graphs, like one line over another
@MOHDZAID-pj7hi
@MOHDZAID-pj7hi 22 күн бұрын
great video ..thank you for explaining it so lucidly. i am running an event study to check the impact of CEO change on stock prices. i have put everything according to your format but on running the command i am getting the following error- "variable date does not uniquely identify observations in the using data." how this error can be rectified. Please help
@debanjandas7006
@debanjandas7006 23 күн бұрын
Can we include both regression and panel regression in the same output table in stata?
@thedatahall
@thedatahall 22 күн бұрын
Yes u can
@debanjandas7006
@debanjandas7006 22 күн бұрын
@@thedatahall can you show it?
@thedatahall
@thedatahall 22 күн бұрын
Search for outreg2 command on my channel. There is already a video explaining the process
@debanjandas7006
@debanjandas7006 21 күн бұрын
I need to store the estimates of various model and show in the horizontal row while dependent variable needs to show in the column. Can it be done?
@najmehmoradi5122
@najmehmoradi5122 24 күн бұрын
It's really hard to find a word to show my appreciation. Great explanation and insightful. Thank you!
@thedatahall
@thedatahall 24 күн бұрын
Thanks. Keep sharing
@adriennesmith3654
@adriennesmith3654 29 күн бұрын
This was helpful - thank you!
@thedatahall
@thedatahall 29 күн бұрын
Keep sharing
@MiguelVanEs
@MiguelVanEs 29 күн бұрын
Thanks for the video. I was wondering how you should interpret the final coefficients you obtain after running both stages? Do the coefficients represent risk premia? or rather the effect on returns?
@kwizeralambert1316
@kwizeralambert1316 Ай бұрын
Thank you for your teaching videos. They are very helpful. I was wondering if you have a video on how to combined more than one observations into one single observation in stata. To be clear, let us assume this scenario on disability types: 1- Difficulty in seeing : Yes = 1, No = 0 2- Difficulty in walking : Yes = 1, No = 0 3- Difficulty in speaking: Yes = 1, No = 0 4- Difficulty in hearing : Yes = 1, No = 0 Then we want to combine all these 4 observations into one single observation. This single observation can be named Persons with disability ( Yes: 1, No:0), Any guidance will be appreciated.
@thedatahall
@thedatahall Ай бұрын
Check this link m.kzbin.info/www/bejne/pn6riYeEi7uBpLc
@Vyquach0
@Vyquach0 Ай бұрын
after concluding that we have time and entity fixed effect in the model, I test Autocorrelation and heteroscedasticity both exist in FEM, what should I do next, please replyyyyyyy
@bhuyashitalukdar2685
@bhuyashitalukdar2685 Ай бұрын
Could not have asked for a more comprehensive video. Thanks a lot
@thedatahall
@thedatahall Ай бұрын
Welcome. Keep sharing
@bhuyashitalukdar2685
@bhuyashitalukdar2685 Ай бұрын
@@thedatahall Sure. Can i contact you i needed some help?
@bhuyashitalukdar2685
@bhuyashitalukdar2685 Ай бұрын
Is there a way we can report t stat in a different row using asdoc? Or we need to use outreg for that?
@HelloThere-lo3qi
@HelloThere-lo3qi Ай бұрын
super informative, thank you sir, I was confused why I can't see my command history, turns out I need to save it in log/do file :"
@thedatahall
@thedatahall Ай бұрын
Welcome
@NicklasAndersenBL
@NicklasAndersenBL Ай бұрын
Really good and thorough explanation. Easy to follow
@thedatahall
@thedatahall Ай бұрын
Thanks
@usamaahmed6056
@usamaahmed6056 Ай бұрын
You are so brilliant and your effort is great thank you
@thedatahall
@thedatahall Ай бұрын
Thanks. Keep sharing
@mariadelpilarriverafranco6429
@mariadelpilarriverafranco6429 Ай бұрын
Thanks for the video! It's really clear and helpful. However, I have a different situation and I'm struggling to use margins command correctly. In my case, the independent variable is a dummy (0/1) and the moderator is a continuous variable. Can you tell me which command I should use to perform margins for this two-way interaction? Thank you in advance.
@stephenhilton2255
@stephenhilton2255 Ай бұрын
If you group_by the stock, would that prevent you from needing to run it in a loop? Or would these not recognize the grouping?
@frankmeier7595
@frankmeier7595 Ай бұрын
I am new in working with R, so you might correct me but I was not able to get it working by grouping for stocks. Maybe @The Data Hall can demonstrate how to use rolling regression on more then 1 company with multiple Facots like HML, SMB and Mkt-Rf on a month base.
@thedatahall
@thedatahall Ай бұрын
@frankmeier7595 you can email me your data and code i will look into it
@viisoreanuoana79
@viisoreanuoana79 Ай бұрын
Can you please make an example for daily prices? I have daily data downloaded from Refinitiv so I don’t have that same variables and it is confusing how to create the spreadsheet to upload to stata and also the code part with fiscal year is difficult to understand having daily prices. Thanks
@thedatahall
@thedatahall Ай бұрын
Can you please send me the data at [email protected] i will look into it and guide you
@viisoreanuoana79
@viisoreanuoana79 Ай бұрын
@@thedatahall Thank you! I now sent the email with the data set
@Khanh_00
@Khanh_00 Ай бұрын
I still cant understand how to calculate CAR, CAAR :(( where can I find how to do these on excel
@thedatahall
@thedatahall Ай бұрын
There r tons of videos on doing event study in excel
@Kuntal20052011
@Kuntal20052011 Ай бұрын
Sir please provide the data set for practice purpose
@thedatahall
@thedatahall Ай бұрын
Thanks for identifying. I have added it in the description.
@frankmeier7595
@frankmeier7595 Ай бұрын
can you share the complete code?
@thedatahall
@thedatahall Ай бұрын
Thanks for identifying. I have added it in the description.
@nikolasandikaharyo9826
@nikolasandikaharyo9826 Ай бұрын
Thank you very much for your explanation. You've helpeme me doing my thesis
@thedatahall
@thedatahall Ай бұрын
Thanks for the kind words. Please share our videos among your academic circle
@edwinsaavedra9518
@edwinsaavedra9518 2 ай бұрын
Thanks a lot for the explanation
@thedatahall
@thedatahall 2 ай бұрын
Thanks
@DB-kv3wu
@DB-kv3wu 2 ай бұрын
Great thanks! It is very informative❤
@thedatahall
@thedatahall 2 ай бұрын
Thanks
@carolineogbonne2360
@carolineogbonne2360 2 ай бұрын
Thanks for this tutorial.
@thedatahall
@thedatahall 2 ай бұрын
Welcome
@jagathrohan-kr4nl
@jagathrohan-kr4nl 2 ай бұрын
Excellent explanations. Great work. Thank you so much for your clear explanations.
@thedatahall
@thedatahall 2 ай бұрын
Thanks
@Asadkhan-xt8gs
@Asadkhan-xt8gs 2 ай бұрын
Good job. It is very helpful
@thedatahall
@thedatahall 2 ай бұрын
Thanks
@arsec42
@arsec42 2 ай бұрын
I was wondering if its possible to use this method to analyse the risk premium for a specific risk factor through time, and see if there is a signficant risk premium present in specific time periods. Is there a way to do this?
@thedatahall
@thedatahall 2 ай бұрын
Theoretically we can use this technique but i have to look at some paper that might have done this kind of analysis. If you have paper of this kind please share
@naynay7495
@naynay7495 2 ай бұрын
I get the error "too many filenames" when running the local files : dir.. line. I have 11,000 files to combine. Any idea how to get over this error?
@thedatahall
@thedatahall 2 ай бұрын
Thats the first time I came across this issue. Can u email me ur code and few files i will look into this ([email protected])
@masintalanana2390
@masintalanana2390 2 ай бұрын
Great video! Could you also show how to calculate the standard deviation of the value-weighted portfolios?
@wantinggan8960
@wantinggan8960 2 ай бұрын
Thank you for the video. It is very helpful!
@wantinggan8960
@wantinggan8960 2 ай бұрын
Is there has the part 2 of the video currently?
@thedatahall
@thedatahall 2 ай бұрын
Thanks. Yes the 2nd and 3rd part discusses how to perform FF model in Stata and R. Please search fama and french in stata.
@anlanhnguyen-ly9vi
@anlanhnguyen-ly9vi 2 ай бұрын
Very well explained! Thank you for saving my time :)
@thedatahall
@thedatahall 2 ай бұрын
Thanks
@zori4877
@zori4877 2 ай бұрын
Super helpful thanks!
@thedatahall
@thedatahall 2 ай бұрын
Thanks
@MrTobisonson
@MrTobisonson 2 ай бұрын
Can I use this code to calculate the CAR or BHAR an then to analyze the over-or underperformance of IPOs in comparison to a market index? I am not quite sure since there is obviously no data pre IPO.
@thedatahall
@thedatahall 2 ай бұрын
You can do car and bhar but i am sure how you would do it in case of ipo's. The best source would be past papers related to event studies on ipo.
@naimatkadha817
@naimatkadha817 2 ай бұрын
Always very helpful videos on Stata. Thanks for your time and efforts, and instead generosity.
@thedatahall
@thedatahall 2 ай бұрын
Thanks for the kind words.
@flynndavies3544
@flynndavies3544 3 ай бұрын
Great video, I was just wondering how you could alter the code to use Logit regressions instead?
@thedatahall
@thedatahall 3 ай бұрын
You can try with statsby command, asreg will not work in this case.
@petermcadam8415
@petermcadam8415 3 ай бұрын
great video. how would one incorporate fixed effects?
@ariunajou2318
@ariunajou2318 3 ай бұрын
Hello, thank you for your video! It is very helpful and informative. You are a real lifesaver 😅 I have a question regarding CARs, Is there a formula how can I check CARs’ t-test significance (139 deals) because I get the data for CAAR (p-value) and AAR(p-value), but not for the CARs
@thedatahall
@thedatahall 3 ай бұрын
Thanks for the kind words. The car values are in the crossfile.dta
@LeoFIN3
@LeoFIN3 2 ай бұрын
@@thedatahall How about t-tests and p-values of those invidual CARs?
@thedatahall
@thedatahall 2 ай бұрын
For these you will have to execute the eventstudy2 command separately for each event
@shwetaagarwal6240
@shwetaagarwal6240 3 ай бұрын
Your videos are awesome. Thank you for uploading them. Can you please make a video on regression discontinuity design and instrumental variables?
@thedatahall
@thedatahall 3 ай бұрын
Thanks for appreciation. Sure will keep this topic in my to do list
@shwetaagarwal6240
@shwetaagarwal6240 3 ай бұрын
@@thedatahall Thank you😀
@BilalHassan-zv8wh
@BilalHassan-zv8wh 3 ай бұрын
Hi. Thanks for the video. I want to run bivariate logistic reg with factor variable such educational or income levels for each year. May you please tell me how this type of loop would work work? Thanks
@thedatahall
@thedatahall 3 ай бұрын
U can use bys year: logistics etc etc . U may not need loop
@BilalHassan-zv8wh
@BilalHassan-zv8wh 3 ай бұрын
Thanks for quick reply l. have twenty years/countries. It looks more handy to use loops than bys years to draw coefficient plots of bivariate and multivariate models
@BilalHassan-zv8wh
@BilalHassan-zv8wh 3 ай бұрын
Hi. Thanks for the video. I want to run bivariate logistic reg with factor variable such educational or income levels for each year. May you please tell me how this type of loops would work work? Thanks
@lingcao1301
@lingcao1301 3 ай бұрын
Hello, great thanks for the video. It is a life saver for me in completing my thesis of event study. However, I encountered a problem as my M&A deals event date are spanning in 15 year with a total of 350 companies worldwide. I intend to use S&P 500 as market index (single factor model) with a separate estimation window for each acquirer of -150 days before event date (each acquirer has its own event date). In this case, my factors.dta instead of having one unique date for market returns for all, there are 350 different date spanning for each acquirer. In this case, how should i conduct forward with your coding? Furthermore, I would love to continue a cross-sectional analysis with CARs from event study by adding firm-level, industry-level and deal characteristics. Would be proactive to set up the code or data in advance along the event study? Thanks so much and I sincerely looking forward to your guidance!
@thedatahall
@thedatahall 3 ай бұрын
Thanks. With regards to the different event and estimation window, the code take care of this automatically. I couldn't understand the next question. May be you can email me along with some research paper or material and i can guide you.
@rodrigomota3369
@rodrigomota3369 3 ай бұрын
@thedatahall Great explanation! I used the statsby command and I got the coefficients of the factors in the end but I wanted to know how can I obtain the r-squared or the adjusted r-squared in this first approach. Is it possible in the statsby approach or only in the other methods (asreg, xtfmb, etc)?
@thedatahall
@thedatahall 3 ай бұрын
Try this command statsby _b _se e(r2), by(foreign): regress mpg gear turn
@bhagyabhutani7752
@bhagyabhutani7752 3 ай бұрын
Hello, My data has 250 companies and the stock return of each company is in each column making it a separate variable, what could be the function used? Plus I would want to save the value of the residuals too. How can I do that?
@thedatahall
@thedatahall 3 ай бұрын
Check the reshape command
@Lucenne
@Lucenne 3 ай бұрын
Very well explained, thank you!
@thedatahall
@thedatahall 3 ай бұрын
Welcome
@abdulmateen6101
@abdulmateen6101 3 ай бұрын
simple but beautifully explained.
@thedatahall
@thedatahall 3 ай бұрын
Thanks
@abdulmateen6101
@abdulmateen6101 3 ай бұрын
Excellent and precise video, please clarify what is the difference between "bys firm (year) and bys firm year"
@thedatahall
@thedatahall 3 ай бұрын
Thanks. By firm year means perform the command (whatever command comes after colon ":") for each firm and each year. By firm (date) mean perform the command on each firm but first sort data within each firm based on year