Thanks again! I happened to notice that at 5:10 you entered 'tsset time company' but shouldn't 'company' be set as the panel variable such it becomes 'tsset company time'?
Awesome video professor. Thanks for uploading. I have a query regarding the unbalanced panel with a lot of missing variables...Please inform me which Stata command shall I use when panel data is unbalanced....
Dear Jingnan. Thank you for the question. As Stata signals, I suspect that you may have multiple observations for the same date. In which case you would have to find and remove potential duplicates. You can see my video on how to do that. I hope I understood your questions correctly.
Hello thank you for this vid, but what should I do if my data is weekly? my stata keeps saying " time variable: weekly, 28jan2018 to 26feb2023, but with gaps delta: 1 day"
What does it mean that a panel is unbalanced? In short, at least one panel member is not observed each period. When running a OLS, that observations will thus not be there. If these missing observations are random, then it should not give any problems. Further info can be found here: th-cam.com/video/UCPeF01LFwY/w-d-xo.html I discuss this early on. Hope this helps!
When I attempt this STATA tells me that the time value is repeated even when i use the command: tsset Location Quarter. I don't suppose you know a way around this ?
Dear Ikhlas, There are a few things you can try and do here. First, do your time and entity identifier uniquely identify your data? Try and use isid Location Quarter. If you get nothing back, well that is good. Otherwise, you should check for duplicates, which can be done using duplicates report Location Quarter. This will give you a report to see if you have any duplicates your dataset. If that if the case, you will have to remove any of such duplicates, and then try tsset again. Hope this works! Lmk,
@@SteffensClassroom I previously used the tsset command and it worked but after filling in gaps in the panel data and duplicating my quarter variable it no longer works. I tried your suggestion and command doesn't work. Do you think using tsset, then filling in missing obvs then using tsfill will work ?
Thanks again! I happened to notice that at 5:10 you entered 'tsset time company' but shouldn't 'company' be set as the panel variable such it becomes 'tsset company time'?
You are of course right! That is a mistake. Nicely spotted :)
Fortunately, it the example still works.
Very informative dear Dr, many thanks
thank you very much sir. it is absolutely clear!
Really great video. Thank you
Awesome video professor. Thanks for uploading. I have a query regarding the unbalanced panel with a lot of missing variables...Please inform me which Stata command shall I use when panel data is unbalanced....
Hi Adil!
Thank you for your comment.
An alternative to the tsset command is xtset for panel data. Go and try that one out :)
thank u sir. your final step tsset bcal_date. in my case, it shows "repeated time values in sample". how to deal with? thank you
Dear Jingnan. Thank you for the question. As Stata signals, I suspect that you may have multiple observations for the same date. In which case you would have to find and remove potential duplicates. You can see my video on how to do that.
I hope I understood your questions correctly.
Hello thank you for this vid, but what should I do if my data is weekly? my stata keeps saying " time variable: weekly, 28jan2018 to 26feb2023, but with gaps
delta: 1 day"
Stata date cannot be after Dec 31, 9999 -it says this after the bcal thing
In short. If you have weekly data then it is not a business calendar you need, you use option weekly for tsset.
Does an unbalanced panel influence OLS regression in STATA? (We assume missing observations to be random)
What does it mean that a panel is unbalanced? In short, at least one panel member is not observed each period. When running a OLS, that observations will thus not be there. If these missing observations are random, then it should not give any problems. Further info can be found here: th-cam.com/video/UCPeF01LFwY/w-d-xo.html
I discuss this early on.
Hope this helps!
When I attempt this STATA tells me that the time value is repeated even when i use the command: tsset Location Quarter. I don't suppose you know a way around this ?
Dear Ikhlas,
There are a few things you can try and do here. First, do your time and entity identifier uniquely identify your data? Try and use isid Location Quarter. If you get nothing back, well that is good.
Otherwise, you should check for duplicates, which can be done using duplicates report Location Quarter. This will give you a report to see if you have any duplicates your dataset. If that if the case, you will have to remove any of such duplicates, and then try tsset again.
Hope this works! Lmk,
@@SteffensClassroom I previously used the tsset command and it worked but after filling in gaps in the panel data and duplicating my quarter variable it no longer works. I tried your suggestion and command doesn't work. Do you think using tsset, then filling in missing obvs then using tsfill will work ?
tsfill is generally used after tsset, so that is fine. The Stata file will also explain you this: www.stata.com/manuals/tstsfill.pdf
Hope this helps
@@SteffensClassroom thank you for the help Steffen
Happy to help!
file calendar.stbcal could not be opened for output
i don't understand why ...
I am.also not certain to be honest. Does this error appear after you use tsset?
@@SteffensClassroom yes but i try to change the directory with : File -> Change directory and it is good. I think it is a file problem
@@cyrilfilezac8115 This would be nice to figure out. Would you mind mail me about the issue (see my mail on the about page on the channel)?