Time Series Data in Stata

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024

Комментарии • 52

  • @fonic_w23
    @fonic_w23 3 года назад +1

    Awesome 👏! Two minutes in and my problem was solved

  • @sselunjogisimonpeter3377
    @sselunjogisimonpeter3377 3 года назад

    This is a super tutorial. Thanks so much, sir. God bless you

  • @wanjadouglas3058
    @wanjadouglas3058 3 года назад

    Good job for sure. Very helpful

  • @wilsonyeswa4993
    @wilsonyeswa4993 10 месяцев назад

    Quite informative

  • @sinamen516
    @sinamen516 5 лет назад +2

    Perfect recap for my final! Thx!

  • @nc.7343
    @nc.7343 3 года назад

    I love you, my friend, Im Peruvian, Thx!!!!!!!

  • @mwalyesteven2255
    @mwalyesteven2255 2 года назад

    Great

  • @jennysmith7611
    @jennysmith7611 5 лет назад +1

    such a great video! Thank you!

  • @four9397
    @four9397 2 года назад

    Thanks a lot for your help!!

  • @shiqisun8411
    @shiqisun8411 5 лет назад

    fantastic! thank you very much

  • @jingnanli7325
    @jingnanli7325 2 года назад

    what if you have many samples in your data. each sample has a year intervel. person A is from 2009 to 2015, person B is from 2009 to 2018, ...

  • @gabrieljabro2791
    @gabrieljabro2791 Год назад

    Thank you man, you saved me

  • @hugomalivel9940
    @hugomalivel9940 3 года назад

    Hi, great video, very clear. However I do have a question regarding the time series of multiple companies and using at the same time their data (stock return mixed with the market to book value), how would that apply?

    • @sebastianwaiecon
      @sebastianwaiecon  3 года назад +1

      If you have multiple companies over time, you have panel data, not time series. You might be interested in my video on fixed effects models.

    • @hugomalivel9940
      @hugomalivel9940 3 года назад

      @@sebastianwaiecon Hi thank you for your answer, even if it is an analysis of Euro600 (the 600 companies not the index) over 2 years?

  • @user-jz4bw7gw4u
    @user-jz4bw7gw4u Год назад

    Thank you for your wonderful video. But how can we output the outcome of the regression to Word or Excel?

  • @lamyfilter9700
    @lamyfilter9700 2 года назад

    Did u run the Linear detrending and First difference together

  • @pishoinassif6029
    @pishoinassif6029 2 года назад +2

    You are awesome! I spent the past two weeks trying to do all of this but I couldn't find anything until your video.
    Could you help explain how to do quadratic detrending if the only data I have is real GDP?

    • @sebastianwaiecon
      @sebastianwaiecon  2 года назад +1

      Add a t^2 term to the regression of GDP on t, then generate residuals.

  • @joev2826
    @joev2826 3 года назад

    Thank you!!!

  • @abroyitbarek5235
    @abroyitbarek5235 5 лет назад

    its so very important for me

  • @rsvmanu
    @rsvmanu 3 года назад

    Hi, would this method of detrending data work for multiple linear regression? I detrended all of my variables but my R-squared is equal to 1, and when I run the regression without detrending the variables the R-squared is less than 1.

    • @sebastianwaiecon
      @sebastianwaiecon  3 года назад

      You can detrend with multiple regression as long as you detrend every variable.

  • @baloo5949
    @baloo5949 3 года назад

    Hey! Im desperately in need of your help!!! My data set is string daily (without the weekends)
    I've tried formatting the data using the command: generate time=date(date, "MDY") but it keeps responding with "missing values generated".
    Please help me i've tried everything and nothing works. My data is 01/01/1991 (MDY) and its called date but i dont know why it isnt working

    • @sebastianwaiecon
      @sebastianwaiecon  3 года назад

      You might find this article helpful: stats.idre.ucla.edu/stata/modules/using-dates-in-stata/

  • @emaruinedit
    @emaruinedit 4 года назад

    hello, thanks for the video! would having data for multiple countries for different years (that is, data fro 2016 for 10 different countries and then the same variable for those same countries for 2015 etc) count as time series?

    • @sebastianwaiecon
      @sebastianwaiecon  4 года назад +1

      Time series only has one entity over time. When you have multiple then you have panel data.

  • @randoindabando9477
    @randoindabando9477 4 года назад

    Thanks for the video, could you please help me with these questions if possible? I want to perform a multiple regression analysis, using time series data on the effect of foreign direct investment (FDI) on GDP. (I will also include a few other independent variables such as school years). Should i include the time trend variable 't' when performing the regression? I haven't seen other papers using similar models include it in their Stata results.
    Also, when testing for stationarity, is it should i include time trend? E.G: dfuller GDP_growth if period >= 1991, trend

    • @sebastianwaiecon
      @sebastianwaiecon  4 года назад

      Including some kind of trend (linear, quadratic, etc.) is common, but it's entirely up to you whether you think it is appropriate. I haven't done the Dickey-Fuller test in a long time, so I'm not sure about that one.

    • @randoindabando9477
      @randoindabando9477 4 года назад

      ​@@sebastianwaiecon Thank you very much for your response.
      Could i also ask, if I were to include the time trend, would you normally be expected to analyse the t variable, e.g coefficient, p value, etc. when discussing the results of the regression?

    • @sebastianwaiecon
      @sebastianwaiecon  4 года назад

      It's usually worth mentioning, but you do have to remember you haven't actually explained why the trend is happening, just that it did happen.

  • @ChristianDG21
    @ChristianDG21 3 года назад

    what if in year we have repeats years for different countries for example country usa 2010 usa 2011 usa 2012 usa 2013 china 2010 china 2011 china 2012 china 2013 for example...how we treat this?

    • @sebastianwaiecon
      @sebastianwaiecon  3 года назад +1

      In that case, you have panel data and not time series. You might want to look at some of my other videos on panel data and fixed effects.

    • @ChristianDG21
      @ChristianDG21 3 года назад

      @@sebastianwaiecon thanks i just build up the panel data but now, iam strugguling with the graphs i dont know how to include countrid with year and population in a line graphs...thanks for answer.

    • @sebastianwaiecon
      @sebastianwaiecon  3 года назад +1

      @@ChristianDG21 You might find this helpful: www.stata.com/support/faqs/graphics/gph/stata-graphs/

    • @ChristianDG21
      @ChristianDG21 3 года назад

      @@sebastianwaiecon thanks a lot!

  • @HakamAbuShanabb
    @HakamAbuShanabb 5 лет назад +1

    If all my explanatory variables are not significant initially, what do I have to do ?

    • @sebastianwaiecon
      @sebastianwaiecon  5 лет назад

      By itself, this is not indicative of any problems with the model -- you simply found no relationship between variables. That doesn't mean there are not problems, though. You could still have endogeneity that, once taken care of, could reveal relationships you didn't see previously.

  • @mariaboytzoyka9111
    @mariaboytzoyka9111 4 года назад

    Hey! Thanks for this amazing video! But how can I split the data in different clusters, for example in 2 different groups? Thank you.

    • @sebastianwaiecon
      @sebastianwaiecon  4 года назад +1

      Not sure what you mean by that, but if you have multiple observations for each time period, then you don't have a time series anymore. In that case, see my video on fixed effects.

    • @miyinzi
      @miyinzi 4 года назад

      @@sebastianwaiecon Is it possible to decompose time series data into the trend, seasonal and cyclic components using STATA. If so, do you mind sharing the code?

  • @Blakeblade-zd7tt
    @Blakeblade-zd7tt 3 года назад

    hi i am trying to use panel data set but it gives error saying "repeated time values". how can i figure it out?

    • @sebastianwaiecon
      @sebastianwaiecon  3 года назад

      You can't use time series commands for a panel. See this video: ruclips.net/video/H95BHswbT3w/видео.html&ab_channel=SebastianWaiEcon

    • @Blakeblade-zd7tt
      @Blakeblade-zd7tt 3 года назад

      @@sebastianwaiecon i do exactly the same things he does. my dates are from 1982 to 1993. when i try to use command xtreg State Date, yearly it gives that error. i am trying to find out what affects bank profitability in USA. is that command even correct? maybe correct version is xtreg BankNames Date, yearly. which one is correct?

  • @Chillypuwn
    @Chillypuwn 5 лет назад

    this does not work if you have multiple variables with the same year

    • @sebastianwaiecon
      @sebastianwaiecon  5 лет назад +1

      That is correct, because then your data is not a time series. I recommend my video on panel data and fixed effects for that: ruclips.net/video/H95BHswbT3w/видео.html

  • @messaymideksa1137
    @messaymideksa1137 2 месяца назад

    I would like

  • @MrRobertLake
    @MrRobertLake 4 года назад

    Stata is not a good program for time series. First having a variable t can be helpful, but first you need date variable. This is in all modern statistical programs constructed by the program automatically unless you have daily data. How do you construct a date time series in Stata? The answer is that if you have to look for it use another program. Second you should never de-trend you data with a linear trend. This will lead to what is known as spurious de-trending. Economic data almost never follows deterministic trends. This video tells you have to construct t but not what do to tell Stata about what type of time series data you have and impose correct dates for your observations.

    • @randoindabando9477
      @randoindabando9477 4 года назад

      Hi Robert, you said economic data never normally follows deterministic trends. I want to perform a multiple regression analysis on the impact of FDI on GDP, whilst also controlling for education and infrastructure, do you think it's worthwhile to include a time trend variable?
      When i do use the time trend variable, it makes the adjusted R-squared slightly higher.

  • @mitlaxayasane9837
    @mitlaxayasane9837 4 года назад

    can you teach about ARDL

    • @sebastianwaiecon
      @sebastianwaiecon  4 года назад

      You can implement AR and DL with techniques from this video. For AR, take lags of Y. For DL, take lags of X.