(Stata13): How to Reshape Wide to Longitudinal Data

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 พ.ย. 2024

ความคิดเห็น • 317

  • @CrunchEconometrix
    @CrunchEconometrix  6 ปีที่แล้ว +25

    TH-cam recently changed the way my content will be monetised. My channel now needs 1,000 subscribers. So it would be amazing if you show your support by both watching my videos and subscribing to my channel if you haven’t done so already. Monetising my videos allows me to invest back into the channel with some new equipment so this small gesture from you will be extremely huge for me. Many thanks for your support….CrunchEconometrix loves to teach, help me stay online.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Hi Daniel, apologies for my very late response. You can employ the multiple imputation method which has its underlying assumptions. You may need to do a Google search on the procedure. Thanks.

  • @natalievictoriaweber3335
    @natalievictoriaweber3335 4 ปีที่แล้ว +17

    Thank you so much! I spent 17 hours last week trying to organize all my data manually, this just saved me

  • @okechukwuerinne2039
    @okechukwuerinne2039 3 ปีที่แล้ว +2

    This is the first time I am stumbling on a Nigerian doing stata analysis on TH-cam. Thank you so much for this.

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      You are welcome, Erinne. Please may I know from where (location) you are reaching me? Thanks.

  • @angelinakhomenok1107
    @angelinakhomenok1107 หลายเดือนก่อน +1

    This just saved my life and honors thesis, THANK YOU SO MUCH!!!!!!

  • @mahinurmimi9782
    @mahinurmimi9782 ปีที่แล้ว +3

    I am highly grateful to you, Professor.
    Your video helps me a lot to conduct both my undergraduate research and MSS thesis.
    Huge respect for you ❣️

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว +1

      Thanks, Mahinur for your encouraging feedback. Deeply appreciated 🥰🙏

  • @manooomanaaa2880
    @manooomanaaa2880 2 ปีที่แล้ว +5

    I was struggling with this since 2 days, you just made it very simple and I did it in 10 minutes, thank you so much, lots of love and regards ❤️❤️❤️❤️

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว +1

      Thanks, Manoo for the encouraging feedback. Deeply appreciated! 💗🙏

  • @djolaudkiliguyarnoldj.b3329
    @djolaudkiliguyarnoldj.b3329 2 หลายเดือนก่อน +1

    First of all, thank you very much. Based on that, I followed the same approach directly in Stata using:
    drop if missing(CountryName) | missing(CountryCode) | missing(SeriesName) | missing(SeriesCode)
    egen id_C = group(CountryName)
    egen id_S = group(SeriesName)
    foreach var of varlist _all {
    replace `var' = "" if `var' == ".."
    }
    reshape long YR, i(id_C id_S) j(year)
    drop SeriesName SeriesCode
    reshape wide YR, i(id_C year) j(id_S)

  • @vb1406
    @vb1406 4 ปีที่แล้ว +4

    I love that you're from Africa! This is the by far the best videos I've seen on this, thank you so much for the great content!

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +3

      Yes ooo proudly African, Victor😊. I'm humbled and encouraged by your positive feedback on my videos. Deeply appreciated! 🙏 Please may I know from where (location) you are reaching me?

    • @vb1406
      @vb1406 4 ปีที่แล้ว +3

      @@CrunchEconometrix I'm in grad school at an Ivy league school in the US, but born and raised on the motherland. Believe me none of my professors can explain this!

  • @lakurelabpradeeppanthi2257
    @lakurelabpradeeppanthi2257 9 หลายเดือนก่อน +1

    This is a very useful video to reshape the dataset. Proud of you, professor.

    • @CrunchEconometrix
      @CrunchEconometrix  9 หลายเดือนก่อน

      Thanks so much for your encouraging feedback, Doc! 🥰🙏

  • @matildamoonga18
    @matildamoonga18 ปีที่แล้ว +1

    This video has been a lifesaver 😭. LITERALLY. THANK YOU SO MUCH!

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว

      Glad you find it helpful, Matilda...thanks for your encouraging feedback! 🥰🙏

  • @paulocheme6166
    @paulocheme6166 3 ปีที่แล้ว +1

    Subscribed! Thanks alot for your detailed and simple explanations! It also feels awesome hearing these things explained in a Nigerian accent! Thanks

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว +1

      Thanks Paul for your subscription. Deeply appreciated! I will really appreciate if you can help share the link to my TH-cam Channel th-cam.com/users/CrunchEconometrix on your SM handles for awareness among my 9ja people and those in your network. Thanks again.

  • @Mzt1_
    @Mzt1_ 6 ปีที่แล้ว +1

    this is life-saving. I was doing the manual mess and here I go enjoying the day because of this trick. thanks!

    • @CrunchEconometrix
      @CrunchEconometrix  6 ปีที่แล้ว

      U're welcome, Meney! Kindly tell others too!!!

  • @msizibuthelezi5579
    @msizibuthelezi5579 ปีที่แล้ว +1

    yoo is spent two days sorting my data thanks prof for this yooo am very grateful... from now on i will be using this for my panel data...

  • @Zaboomafoo996
    @Zaboomafoo996 4 ปีที่แล้ว +3

    I'm so grateful for this video. I always refer back to it because it has simplified the process and made things so much easier for me. Thank you!

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Thanks Crawford, for the encouraging feedback. May God bless you!!!

  • @GeniusOnHisWay
    @GeniusOnHisWay 3 ปีที่แล้ว +1

    I was stuck with getting Series into the wide format for so long. Thank you a ton!

  • @mateosanchez1823
    @mateosanchez1823 3 ปีที่แล้ว +3

    You are amazing! You have helped me out so much in both of my thesis. Thank you so much for your insights!!

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Happy to help, Matteo! Please tell others too, thanks!

  • @Gustiishable
    @Gustiishable 8 หลายเดือนก่อน

    I have been working on this exact problrm for 2 days straight, THANK YOU

    • @CrunchEconometrix
      @CrunchEconometrix  8 หลายเดือนก่อน

      Happy to hear this, Gustii! 🥰

  • @zoeynguyen6810
    @zoeynguyen6810 2 ปีที่แล้ว +1

    Thank you for this video and the GMM series. Saved me time and helped my thesis 💐💐

  • @bamworkitdougiepose
    @bamworkitdougiepose 3 ปีที่แล้ว +1

    YA'LL DOIN THE LORD'S WORK. TYSM FOR THIS U ARE SAVING MY THESIS!!!

  • @StepsInc.
    @StepsInc. 5 ปีที่แล้ว +1

    Very brilliant and detailed explanation, here is to hoping you carry on!

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Thanks David, for the positive feedback and remarks on my video. Deeply appreciated! 😀

  • @debasisdutta5890
    @debasisdutta5890 4 ปีที่แล้ว +1

    thank you so much professor for your kind and prompt suggestion and reply

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      My humble pleasure, Debasis. Please may I know from where (location) you are reaching me?

  • @kevinndenwadie8834
    @kevinndenwadie8834 2 ปีที่แล้ว +1

    Thank you so much for this tutorial. Helps me a lot. God bless you

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว +1

      You are welcome, Kevin. Glad you find this very helpful 🙏🥰

  • @Dr_Shiny
    @Dr_Shiny 5 ปีที่แล้ว +1

    Thank you so much. Love and respect from Beijing China

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      U're welcome, Rain-Walker...kindly share my TH-cam Channel link with your students, friends and academic community in China 🇨🇳. Thanks! 💕 😊

    • @Dr_Shiny
      @Dr_Shiny 5 ปีที่แล้ว +1

      @@CrunchEconometrix Of course, i did. Thank you again.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว +1

      @@Dr_Shiny Deeply grateful, R-W! 💕 😊

  • @abrahamzakaria8805
    @abrahamzakaria8805 ปีที่แล้ว +1

    Thank you very much Prof. this is very important to me.

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว

      Thanks so much for your positive feedback, deeply appreciated! ☺

  • @ChiranjibiGautam-k9u
    @ChiranjibiGautam-k9u 7 หลายเดือนก่อน +1

    Nice explanation ,would you mind making video making aranging pannel data only using excell nto through Stata?

    • @CrunchEconometrix
      @CrunchEconometrix  7 หลายเดือนก่อน

      I have a video on BUILDING A PANEL DATA.

  • @junaidijunaidi3247
    @junaidijunaidi3247 2 ปีที่แล้ว +2

    I used quarterly data to test sticky cost (weiss, 2010). I have an osiris database that uses quarter data.

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Hi Junaid, that shouldn't be a problem. Follow the same steps to reshape the data and replace "year" with "quart" if "quart" is the time variable.

  • @morrismadutkon4590
    @morrismadutkon4590 5 ปีที่แล้ว +1

    Thank you so much prof for your educative videos. You are doing a good job. very helpful indeed!

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Thanks for the good feedback, Morris...deeply appreciated! 💕 Kindly share my videos with your friends and academic community😊

  • @jovanayap7443
    @jovanayap7443 4 ปีที่แล้ว +2

    This video saved me!! Thank you so much for posting :)

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Thanks for the encouraging feedback, Jovana. Deeply appreciated! Please may I know from where (location) you are reaching me?

    • @jovanayap7443
      @jovanayap7443 4 ปีที่แล้ว +1

      CrunchEconometrix I’m from Canada!🇨🇦😊

  • @speed21ization
    @speed21ization 5 ปีที่แล้ว +1

    This is great! Thanks! Coming from a Jamaican!

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Awesome and thanks, Alvin! Kindly share my TH-cam Channel link with your students, friends and academic community in Jamaica 🇯🇲! 💕 😊

  • @cyrilosabutey6204
    @cyrilosabutey6204 3 ปีที่แล้ว +1

    Thanks so much for the tutorial. Is there a continuation?

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Thanks for the positive feedback, Cyril. Deeply appreciated! This is a standalone clip. Kind regards.

  • @hassaanahmad4770
    @hassaanahmad4770 6 ปีที่แล้ว +1

    Thank you soo much Prof. i was exactly looking for this. stay blessed...

    • @CrunchEconometrix
      @CrunchEconometrix  6 ปีที่แล้ว

      Hahahaha Hassaan, my Channel got you and every researcher out there covered. Good to know that the clip is helpful. Please share this with your cohorts, students and academic community...gracias! :)

  • @asanteka.2403
    @asanteka.2403 5 ปีที่แล้ว +1

    Good video and very helpful , please can you do a video on missen data estimation ? Notably by imputation. Thanks

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว +1

      I'll do my best to do that video, Asante. Thanks for watching my videos...keep sharing too for more awareness😀

  • @scorachikafa625
    @scorachikafa625 4 ปีที่แล้ว +1

    You are a great teacher. And i have actually enjoyed most of your videos, especially the panel data subject. However, i have one question, How does one solve for the unbalanced panel data problem in stata for different variables involved?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Scora, thanks for the encouraging feedback. Deeply appreciated! Stata works perfectly with unbalanced data. Used several in my publications. Please may I know from where (location) you are reaching me?

    • @scorachikafa625
      @scorachikafa625 4 ปีที่แล้ว

      @@CrunchEconometrix i am reaching you from South Africa, Cape Town. Also i have followed your Rehape video from excel to stata importation. however, my data is giving me problem with the reshape command. It keeps on saying this
      "reshape long YR i(idc INDICATORNAME ) j(YEAR)
      option i() required
      "
      how do i rectify this please

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      It appears you did not generate id for the cross-sections. In my video, I created country id called c_id.

  • @rowanadams4757
    @rowanadams4757 3 ปีที่แล้ว +1

    You're literally amazing cheers crunch haha

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Thanks for the positive feedback, Rowan...appreciated!

  • @92sags
    @92sags ปีที่แล้ว +1

    Thanks man.. you are a saviour..

  • @thomashabanabakize4214
    @thomashabanabakize4214 5 ปีที่แล้ว +1

    Thank you very much. You are doing an outstanding job.
    would you please post a video on how to get data from IMF and World Bank

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Thanks Thomas for the positive feedback...deeply appreciated! I will log this request and do a video on it. Thanks!

  • @diamonddogsgaming7059
    @diamonddogsgaming7059 4 ปีที่แล้ว +1

    God Bless you professor

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      You too, Big Boss!!! Please may I know from where (location) you are reaching me?

    • @diamonddogsgaming7059
      @diamonddogsgaming7059 4 ปีที่แล้ว

      CrunchEconometrix I am an international masters student in economics currently studying in Norway. But I am from Pakistan. There’s a few things I need to ask you regarding stata. As I am currently in the process of writing my master thesis.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      No problem. Simply post your queries on the comment section of the respective TH-cam video for others to benefit from the discussion. I'll do my best to guide. Thanks

    • @diamonddogsgaming7059
      @diamonddogsgaming7059 4 ปีที่แล้ว

      @@CrunchEconometrix Hi, I am also facing another issue regarding this video. I am doing an analysis on 20 countries across the world and I have a total of 12 variables and 10 years for each country. I followed all the steps you have listed in the videos but I eventually found a problem as I am missing 2 variables from my data set. Since I only have 10 years and 12 variables, when I go to rename my variables, 2 are missing. How can I fix this?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      @@diamonddogsgaming7059 I believe that you were able to get this sorted. Well done! 👏🏽

  • @babaadam8639
    @babaadam8639 5 ปีที่แล้ว

    May thanks for the insightful videos. Please i would like to find out how to reshape string variables. Again, i would like to find out how to find averages in the long format.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Have you tried out this procedure to reshape your string data? I don't quite understand the 2nd query?

  • @anaisjager8360
    @anaisjager8360 2 ปีที่แล้ว +1

    Thank you very much. Is there a way to download this data in the Stata form? Have you uploaded it?

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      You are welcome, Anais... but the answer is no.

  • @capham8910
    @capham8910 3 ปีที่แล้ว +1

    Thanks you for your help, it's very fantastic. That's just intelligent work.

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว +1

      Thanks, Pham for the encouraging feedback. Deeply appreciated!

  • @kadirbulut8820
    @kadirbulut8820 3 ปีที่แล้ว +1

    Great help. Thanks a lot

  • @wanjadouglas3058
    @wanjadouglas3058 3 ปีที่แล้ว +1

    Very helpful. Thank you so much

  • @emanabdulhamid2385
    @emanabdulhamid2385 4 ปีที่แล้ว +1

    Thanks for this amazing video. it's my first time using stata and also my first time dealing with panel data .
    so, I have some question. why have the identifiers been generated for both country and series?
    does matter or not if used space in the commands?
    how to forecast a missing obs. using stata?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Eman, thanks for the encouraging feedback. Deeply appreciated! Stata will not execute w/o identifiers. I explained that.

  • @atusjim
    @atusjim 2 ปีที่แล้ว +1

    A nice video, the URL for your dataset is not opening, will you kindly help.

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Hi Atus, due to abuse and unethical conduct datasets used in my videos are no longer free (some are free though) but available on my website upon payment. Here's the link cruncheconometrix.com/view/datashop.php

  • @armstrongasenavi719
    @armstrongasenavi719 5 ปีที่แล้ว +1

    Thanks for this tutorial! It saved me lots of time.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      I'm encouraged by your feedback, Armstrong...love ya!!! May I know from where (location) you are reaching me?

    • @armstrongasenavi719
      @armstrongasenavi719 5 ปีที่แล้ว +1

      @@CrunchEconometrix Nairobi, Kenya

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      @@armstrongasenavi719 Awesome Armstrong...I will appreciate if you can spread the word about my videos to your students and academic community in Kenya 🇰🇪! 💕 😊

  • @dragobch
    @dragobch 2 ปีที่แล้ว +1

    Thank you very much for the video! I have a question: what should be the code in Stata if the date is not written in years , but in months and years, such as 1990/05 or may1990?

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Hi Lligramm, please what code are you referring to?

  • @avestaabdulrahman6549
    @avestaabdulrahman6549 3 ปีที่แล้ว +1

    Thank you, this is really helpful!

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Thanks for the encouraging feedback, Avesta!

  • @muhammadsaqib3752
    @muhammadsaqib3752 2 ปีที่แล้ว +1

    really very helpful

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Thanks Muhd, for the encouraging feedback... deeply appreciated!

  • @miriam.msavane6807
    @miriam.msavane6807 4 ปีที่แล้ว +1

    Thank you so much! Your video really help

  • @eleftheriachadouli7139
    @eleftheriachadouli7139 5 ปีที่แล้ว +2

    Great video and very helpful since I use stata for the first time. I have a similar dataset with countries and series and 3 years. I followe your video step by step but stata says there is an error "variable id does not uniquely identify the observations
    Your data are currently wide. You are performing a reshape long. You
    specified i(cid mid) and j(year). In the current wide form, variable cid
    mid should uniquely identify the observations. Remember this picture:
    ...."
    Can you please help me through it cause I dont understand what the problem is?

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      What is your "mid"?

    • @eleftheriachadouli7139
      @eleftheriachadouli7139 5 ปีที่แล้ว

      @@CrunchEconometrix mid is your s_id! Specifically, it is some hr metrics like working hours, layoffs, etc

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      @@eleftheriachadouli7139 Does it uniquely identify the cs? Because my series id (s_id) does just that.

  • @junaidijunaidi3247
    @junaidijunaidi3247 2 ปีที่แล้ว +1

    It is great video. How if I use quarter data Sir? I look in stata quarter symbol is quart, but I can't combain quater and year. Please help me Sir

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Hi Junaid, I'm wondering why you want to combine QUART and YEAR both defines the time variable in the data. Please watch the clip again and adapt to suit your data pattern.

  • @Hidan94
    @Hidan94 4 ปีที่แล้ว +1

    could u pls link the xlsx dataset again? Would be great! Great vid thx man.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Hidan, dataset is available upon payment of a token fee on my website cruncheconometrix.com.ng/shop/. But you can always practice along with yours. Thanks!

  • @juliangang2956
    @juliangang2956 2 ปีที่แล้ว +1

    In case you really download WDI/World Bank data, you can actually define how you wanna have the data - you find that under "Layout"

  • @heathprince5903
    @heathprince5903 5 ปีที่แล้ว +1

    Brilliant! Thank you!

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Hahahaha Heath, thanks for the positive feedback on my video. Deeply appreciated! 💕 Kindly share my Channel link with your students and academic networks! May I know where you are reaching me from?

  • @cengizkalyoncu4880
    @cengizkalyoncu4880 ปีที่แล้ว +1

    Hi, first of all, I want to thank you for this useful video. I would like to ask a question about the problem I am facing. When I write to command row "reshape long yr, i (c_id s_id) j (year)" , there is no problem. But, when I write to command row "reshape wide yr, i(c_id year) j(s_id)" command, I am getting error that "variable s_id is string; specify string option". How can I solve this problem? Can you help me about this problem?
    I controlled my dataset and follow your this video's steps many times, but I couldn't solve this problem! If someone help me about this topic, I really will be glad.

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว

      Hi Cengiz, I honestly have not experienced this before. Perhaps, the issue is with the s_id column. Click on the Stata error on tips on how to fix it. Thanks.

  • @aymanissa6722
    @aymanissa6722 2 ปีที่แล้ว +1

    The biggest LIKE

  • @nyakoelamech
    @nyakoelamech 4 ปีที่แล้ว +1

    Thank you for this video! It is quite helpful. Could there be any problem if I decide to extract financial data from bank statements and simply prepare it in a long format/shape without necessarily having it wide and later reshaping to long? Now what happens with the series/variable names, do I have to reshape them to wide to make sense if at all whether I suggested makes sense?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Hi Nyakoe, reshaping from W to L is the format allowed by Stata for panel data analysis. So, if your extraction yields a L-format data, then no need to reshape.

  • @esayasmequanint9539
    @esayasmequanint9539 ปีที่แล้ว +1

    Thank You!

  • @lavhenegondenideservant2297
    @lavhenegondenideservant2297 2 หลายเดือนก่อน +1

    Great

    • @CrunchEconometrix
      @CrunchEconometrix  2 หลายเดือนก่อน

      Glad you find this helpful! 🥰

  • @Limbic_Life
    @Limbic_Life 5 ปีที่แล้ว +1

    Thank you so much, this is incredibly helpful!!

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      U're welcome, Hanna...may I know from where (location) you are reaching me?

    • @Limbic_Life
      @Limbic_Life 5 ปีที่แล้ว +1

      Currently I'm studying in the Netherlands :)

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      My love to all Netherlanders...please tell your students, colleagues and academic community about my YT Channel!😍

  • @deeg1385
    @deeg1385 4 ปีที่แล้ว +1

    Thank you Prof

  • @diywithlynk
    @diywithlynk 4 ปีที่แล้ว +2

    Thank you so much for making this video, I do learn alot from this. :-)

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Hai, thanks for the encouraging feedback. Deeply appreciated! Please may I know from where (location) you are reaching me?

  • @echobrasil
    @echobrasil 3 ปีที่แล้ว +1

    Very helpful, thanx!

  • @ideahubchiranjibigautam7845
    @ideahubchiranjibigautam7845 ปีที่แล้ว +1

    Thank you.

  • @abhideepkhare9249
    @abhideepkhare9249 ปีที่แล้ว +1

    Thank you

  • @ChiranjibiGautam-k9u
    @ChiranjibiGautam-k9u 7 หลายเดือนก่อน +1

    Please make video transposing data without stata

  • @Dr_Shiny
    @Dr_Shiny 4 ปีที่แล้ว +1

    For all those who are facing issues with Quarterly Panel data.............
    1- Create ID variables for each i
    2- for quarters use 1,2,3,4,5...... instead of 2010q1, 2010q2, 2010q3..... Stata will give the error "so many missing values"
    3- then run the above code
    4- After reshape, just convert the 1,2,3,4,5..... Year variables into quarters, simple ...
    Thanks

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Thanks for this contribution. Grateful!

    • @ayunisanurkhaqiqi4119
      @ayunisanurkhaqiqi4119 3 ปีที่แล้ว

      Hi, can you guide me to do step 3 and 4? Im just begin to use stata, thanks before🙏

    • @Dr_Shiny
      @Dr_Shiny 3 ปีที่แล้ว

      @@ayunisanurkhaqiqi4119 I could send via email

    • @ayunisanurkhaqiqi4119
      @ayunisanurkhaqiqi4119 3 ปีที่แล้ว

      My email ayunisanurkhaqiqi@gmail.com thanks before

  • @markuslindvall6572
    @markuslindvall6572 3 ปีที่แล้ว +1

    Thanks! Very helpful :)

  • @shiyuanwang5743
    @shiyuanwang5743 5 ปีที่แล้ว +1

    thank! . this is awesome!

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      U're welcome 😊...glad to be of help! May I know from where (location) you are reaching me?

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      U're welcome 😊...glad to be of help! May I know from where (location) you are reaching me?

  • @accountingdoctor2322
    @accountingdoctor2322 2 ปีที่แล้ว +1

    Thank u thank u

  • @handecakr8775
    @handecakr8775 4 ปีที่แล้ว

    Hi, this is really a very useful video and gives what I need. I have similar data with 18 years and 44 institutions and and did exactly what you said, but it gives error as follows.
    "reshape long yr, i(b_id s_id) j(year)
    (note: j = 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018)
    variable id does not uniquely identify the observations
    Your data are currently wide. You are performing a reshape long. You specified i(b_id s_id) and j(year). In the current wide form, variable b_id s_id should uniquely identify the
    observations"
    can you help me? And how can we use it for quarterly data?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Follow the same procedure. But modify to indicate the quarterly data.

    • @handecakr8775
      @handecakr8775 4 ปีที่แล้ว

      @@CrunchEconometrix thanks, using date instead of year and additional comments solved my problem.Errors always arise from the problems of your data.

  • @pagi9866
    @pagi9866 4 ปีที่แล้ว

    Thank you so much for that video it helped me a lot, I have a question: If i have dates in the excel format dd/mm/yyyy and I would like to use the day as they are in the same year what would I add as prefix. In the video because your dates where years you added yr do I just need to add d? or day?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Patick, thanks for the positive feedback. Deeply appreciated! Unfortunately I have not tried the code on a different date variant so may not be able to guide appropriately. My sincere apologies. Please may I know from where (location) you are reaching me?

    • @pagi9866
      @pagi9866 4 ปีที่แล้ว +1

      @@CrunchEconometrix
      Hey, okay thank you very much for your answer anyway, I am currently in China.

  • @linarakhadimullina6550
    @linarakhadimullina6550 2 ปีที่แล้ว +1

    thanks a lot

  • @sumatt7031
    @sumatt7031 28 วันที่ผ่านมา +1

    I'm not sure if you'll reply or not, but I was wondering if I can not drop series/indicators because I want them to show as columns. Instead can I just use j(series) while reshaping as wide? Thank you !

    • @CrunchEconometrix
      @CrunchEconometrix  28 วันที่ผ่านมา

      I don't quite get what you're trying to do, but you can try out your suggestion.

    • @sumatt7031
      @sumatt7031 28 วันที่ผ่านมา +1

      @@CrunchEconometrix I am trying to get the same results as you but I want the name of the indicators as variables and not yr1 yr2 and so on. Is there a way to do so?

    • @CrunchEconometrix
      @CrunchEconometrix  26 วันที่ผ่านมา

      Rename the variables

  • @paulluhan
    @paulluhan 5 ปีที่แล้ว +2

    I love you. Really.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Hahahhaha Paul, love you too for enjoying my video. Deeply grateful. May I know from where (location) you are reaching me?

    • @paulluhan
      @paulluhan 5 ปีที่แล้ว +1

      CrunchEconometrix Burmese in Hong Kong. I had a hard time transferring data to Stata. Thx to you. I can move to other things.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      @@paulluhan Good to know Paul...I will greatly appreciate if you share my YT Channel link with your students and academic community. Thanks!

    • @paulluhan
      @paulluhan 5 ปีที่แล้ว +1

      CrunchEconometrix sure. I am still an undergraduate student.

  • @МээримАбдыкалыкова-к6к
    @МээримАбдыкалыкова-к6к 4 ปีที่แล้ว

    Thank you very very much!

  • @samuelringmuhuboh5815
    @samuelringmuhuboh5815 5 หลายเดือนก่อน +1

    Greetings crunch econometrics. I have an issue at the level of generating the s_id.
    At the level of inserting the formula it is refusing to apply the formula.
    What could be the problem. I need help

    • @CrunchEconometrix
      @CrunchEconometrix  5 หลายเดือนก่อน

      Hi Samuel, if there are errors within your data, the code won't work. You should sort your variables first, then use the EXCEL formula.

  • @ECHTisaconcept
    @ECHTisaconcept 5 ปีที่แล้ว +1

    Great video thank you! I am however stuck at the part where we reshape. Stata tells me: "option i incorrectly specified" could you help me with this?

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว +1

      Hi George, thanks for watching my videos, deeply appreciated! Regarding your query, not exactly sure what the error is, but I'll say that you start all over and use my coding structure. Just do as I did.

    • @ECHTisaconcept
      @ECHTisaconcept 5 ปีที่แล้ว

      @@CrunchEconometrix are the country codes (the cc) important for stata?

    • @ECHTisaconcept
      @ECHTisaconcept 5 ปีที่แล้ว +1

      @@CrunchEconometrix for some reason mine only worked with curved brackets and not square brackets (for the reshape command)

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      @@ECHTisaconcept Good to hear that it finally worked!

  • @gifmbewe537
    @gifmbewe537 3 หลายเดือนก่อน +1

    all of us who were doing this manually, lets gather here

    • @CrunchEconometrix
      @CrunchEconometrix  3 หลายเดือนก่อน

      Hahaha 🤣...now, you can use the Excel command to make things easier.

  • @asanteka.2403
    @asanteka.2403 5 ปีที่แล้ว +1

    Hi prof Ngozi, i'm trying to import my data from excel to stata, but stata reads my annual time data as strings, please how Can i convert it to numeric data? Thanks in advance

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว +1

      Hi Asante, I have a dofile (DF005) that addresses that but it is available on my website for a token fee. Kindly visit the STORE
      www.cruncheconometrix.com.ng/shop/ to make the purchase, thanks.

    • @asanteka.2403
      @asanteka.2403 5 ปีที่แล้ว +1

      @@CrunchEconometrix thanks very much

  • @fatimaezzahrarachidi9999
    @fatimaezzahrarachidi9999 2 ปีที่แล้ว +1

    Thanks please how can I upload my half year data to Stata.

  • @hamzaalmustafa9302
    @hamzaalmustafa9302 4 ปีที่แล้ว

    Hi, and thanks for sharing this great tutorial video !
    I have nearly same shape data, and i followed you strictly, but got this "variable id does not uniquely identify the observations" error.
    Any ideas?
    Thanks once again.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว +1

      Hi Hamza, thanks for the positive feedback. Deeply appreciated! Stata is always right 99% of the time. So, check your data again and create an id that is uniquely identifying.

    • @hamzaalmustafa9302
      @hamzaalmustafa9302 4 ปีที่แล้ว

      @@CrunchEconometrix Thanks for your replies. I solve it.
      I have another question, do you have any idea how to calculate the difference between maximum and minimum ROA over three overlapping years?
      Appreciated.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Not at all.

    • @percytaabazuing4554
      @percytaabazuing4554 ปีที่แล้ว

      Hello Hamza, am also having the same issue, how did you resolve it?

  • @dinobrown5956
    @dinobrown5956 3 ปีที่แล้ว +1

    Can you please tell me how to select only six countries from the 46 countries in Stata? I usually use the filter tool in Excel to select the countries when I download data from the World Bank. But I want to do it in Stata but do not know the code to write. Kindly help. Thank you

  • @kateandrusenko1290
    @kateandrusenko1290 3 หลายเดือนก่อน +1

    How to do monthly data? I tried to do analogically but my months are not in chronological order in stata

    • @CrunchEconometrix
      @CrunchEconometrix  3 หลายเดือนก่อน

      You should sort out your monthly data in Excel before importing to Stata to reshape.

  • @lordbobbie9894
    @lordbobbie9894 2 ปีที่แล้ว +1

    Great video. please can someone help me on how to classify countries by low income and middle income in excel? Thank you in advance

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว +1

      Bobbie, you have to do it manually. Watch my video on "Building a Panel Data" on how to go about it.

  • @claretergu9801
    @claretergu9801 9 หลายเดือนก่อน +1

    Hello! What if it’s one country, is an id needed? If yes, how to go about it please?

  • @alessandrarizzi
    @alessandrarizzi 6 ปีที่แล้ว

    Thanks! Very helpful

    • @CrunchEconometrix
      @CrunchEconometrix  6 ปีที่แล้ว

      Thanks Lessa!!!..and please tell others about my YT Channel...

  • @ulricharmelwawahyuniwo9783
    @ulricharmelwawahyuniwo9783 4 ปีที่แล้ว

    Thanks Doctor, I am blocked at the level of creating identifiers for my series... When I fit in the formula, it doesn't execute, rather it takes it as a text.

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Hi Wawah, perhaps the coding is wrong. Pls do it again.

  • @beedeekenny9250
    @beedeekenny9250 2 ปีที่แล้ว

    Good day Prof,
    I hope this comment finds you well. I am an Honours student (Post-grad) working on a project and being the first time am collecting raw data by myself, seems a bit difficult.
    There's a particularly stubborn variable whose data displayed "abc" on the Eviews workfile and am sure it has meaning. Please kindly tell me what it means and what is likely to be the problem with the data?
    Thank you

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Beedee, I have no idea what your query is about.

  • @akhliddinismailov3766
    @akhliddinismailov3766 4 ปีที่แล้ว

    Professor, I entered the following two commands:1. egen Banknum = group(Bank)
    2. xtset Banknum Quarter, quarterly
    Is it enough to make the data panel data?
    Stata is saying that quarters are repeated and it's not doing stationary and other analysis by saying "repeated time values within panel" The quarters I entered normally belong to different banks so it should be normally accepted isn't it? Can you say what is wrong with my commands?

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      Please follow my elementary guide as shown in the video. Prep your data from Excel before importing into Stata.

  • @subaldanta7129
    @subaldanta7129 3 ปีที่แล้ว +1

    Thank You very much. It would be a great help to me if you do the same by taking data from prowess.

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Subal, thanks for the positive feedback. What do you imply by "taking data from prowess"?

    • @subaldanta7129
      @subaldanta7129 3 ปีที่แล้ว

      @@CrunchEconometrix A database on Indian listed and unlisted companies.

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว +1

      You can apply the knowledge to any data source.

  • @lingchen5238
    @lingchen5238 5 ปีที่แล้ว

    Hello Professor,I am appreciate for your teaching video for I get so much help from it,but I can't open the link of engee2.xlsx dataset,could you share me the link of dataset and running command with me again? Thank you so much.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Hi Ling, thanks for the positive feedback on my videos, deeply appreciated. Kindly access the data on my website. Go to "Datasets -->CrunchEconometrix Datasets". Likewise, the dofile is available on my website. May I know from where (location) you are reaching me?

    • @lingchen5238
      @lingchen5238 5 ปีที่แล้ว +1

      Dear @@CrunchEconometrix ,thank you ,I know your video from my friend.and looking forward your video of NARDL

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      @@lingchen5238 You bet...working on it!

  • @Resredcar
    @Resredcar 3 ปีที่แล้ว +1

    I get this error message:
    "variable id does not uniquely identify the observations
    Your data are currently wide. You are performing a reshape long. You specified i(s_id c_id) and j(year). In the
    current wide form, variable s_id c_id should uniquely identify the observations."
    do you know what to do?

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Hi Stefanny, not an issue. Follow the Stata for guides on how to correct the problem.

    • @anaisjager8360
      @anaisjager8360 2 ปีที่แล้ว

      I get the exact same error message and I have not been able to solve it. Could you please help me?

  • @bayuhariyanto4539
    @bayuhariyanto4539 4 ปีที่แล้ว

    Thank you so much!!!!

    • @CrunchEconometrix
      @CrunchEconometrix  4 ปีที่แล้ว

      U're welcome, Bayu🙏. I'm glad you find this video helpful 😊

  • @amirshahzadkhanwattoo3939
    @amirshahzadkhanwattoo3939 ปีที่แล้ว +1

    sir what problem we face if number of countries is greater than number of years?

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว

      You will need to read about the technique you want to deploy to find out the econometric implications if you use the wrong panel data structure.

  • @jari976
    @jari976 ปีที่แล้ว +1

    I'm strugling with getting my data right. Instead of one variable with longitudinal data I have 11, so I can't put yr in front of the specific year ,since I need to do it for 11 variables. e.g. ENVyr1, SOCyr1

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว +1

      Jari, ensure your excel format is the same as mine.

    • @jari976
      @jari976 ปีที่แล้ว +1

      @@CrunchEconometrix yeah if i do that manually im formatting for 12hrs straight. Is there another way via stata, right now my data for 144 companies with a frame of 7 years is as follow:
      horizontal axes coloms: company, country, year, ESG, ROA, (control variables)
      vertical axes: year 2014-2020 (listed per company)

    • @CrunchEconometrix
      @CrunchEconometrix  ปีที่แล้ว +1

      Jari, it is advisable to download the data in the appropriate excel format before reshaping in Stata.

    • @jari976
      @jari976 ปีที่แล้ว

      @@CrunchEconometrix I used Refinitiv workspace, according the refinitiv support service of our university I can only extra it via excel in one format.

  • @nasiryaseen1682
    @nasiryaseen1682 2 ปีที่แล้ว +1

    whenever I try to export my excel data to stata it shows the "unexpected attribute" and can not load the excel sheet, please advise.

    • @CrunchEconometrix
      @CrunchEconometrix  2 ปีที่แล้ว

      Nasir, I honestly have no idea what the issue could be. You may want to check the underlying excel sheet for errors before importing to Stata.

  • @Dr_Shiny
    @Dr_Shiny 5 ปีที่แล้ว

    Prof, would you please guide me that how to enter "Quarterly" data i.e. Each year have 4 quarters, e.g. Q1 2018, Q2 2018, Q3 2018, Q4 2018. For banking level data.

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      If the downloaded data is in quarterly, all you need to do is enter them as ditto for yearly data.

    • @Dr_Shiny
      @Dr_Shiny 5 ปีที่แล้ว +1

      @@CrunchEconometrix Thank you Prof. Would you please share any youtube link for such Pannel quarterly data treatment?

    • @CrunchEconometrix
      @CrunchEconometrix  5 ปีที่แล้ว

      Unfortunately, none that I know of. Except you do an online search.

  • @Gamen035
    @Gamen035 3 ปีที่แล้ว +1

    I have too much dates on the first row for this as I have daily data instead of yearly, so State gives an error. Any suggestions?

    • @CrunchEconometrix
      @CrunchEconometrix  3 ปีที่แล้ว

      Hi Patrick, click on the error code and follow the guide on how to fix the problem.

  • @lovenepal8756
    @lovenepal8756 2 หลายเดือนก่อน +1

    Please help me. What do i write in place of year if my data is like jul-2018 and its monthly???

    • @CrunchEconometrix
      @CrunchEconometrix  2 หลายเดือนก่อน +1

      First, ensure your data is in the right TIME format, then modify the code to relect MONTH.

    • @lovenepal8756
      @lovenepal8756 2 หลายเดือนก่อน +1

      @@CrunchEconometrix thanks a lot

    • @lovenepal8756
      @lovenepal8756 2 หลายเดือนก่อน +1

      @@CrunchEconometrix thanks . Do you know how to get long run coefficient of cross section in panel ardl in eviews?

    • @CrunchEconometrix
      @CrunchEconometrix  2 หลายเดือนก่อน

      Not at all.