Skip to content

All that research…

Some research is useful-

Primary Menu

STATA

[STATA] Unique Number of Observations

Posted on July 6, 2021July 6, 2021 by admin
[STATA] Unique Number of Observations

In research, we often have to figure out the number of unique observations- For a small set of data, you can of course just use the command cookbook. However, when you want to create a variable containing the unique number of observation by certain group then you can’t just use Continue Reading

Posted In STATATagged In #EGEN, #STATA

[STATA] Creating 6 Digit CUSIP and 5 Zip Code

Posted on March 6, 2021March 6, 2021 by admin
[STATA] Creating 6 Digit CUSIP and 5 Zip Code

Today, I will cover a super easy code but extremely useful- This is a question that I was asked several times by PhD students and master students who were beginning to code or did not how to code. So how do we extract 6 digit CUSIP from a 9 digit Continue Reading

Posted In STATATagged In #CUSIP, #STATA, #SUBSTRING, #ZIPCODE

[STATA] Importing Data

Posted on September 30, 2020 by admin
[STATA] Importing Data

I often get asked what is the best way to import other types of data by my peers and friends- The answer? Use Stat/Transfer– It is the best. I know it is not cheap but it will save you lot of time. And time matters, especially if you need to Continue Reading

Posted In STATATagged In #IMPORTDATA, #STATA, #STATTRANSFER, RESEARCH

[STATA] Converting Dates

Posted on September 28, 2020September 30, 2020 by admin
[STATA] Converting Dates

As a researcher, I get data with various data formatting- And it was always annoying to convert the dates because I would often forget the codes- So here I share the codes to convert various string dates to STATA format dates. Convert DD/MM/YYYY: gen numeric_date=date(string_date, “DMY”) Convert YYYY-MM-DD or YYYYMMDD: Continue Reading

Posted In STATATagged In #CONVERTINGDATES, #DATE, #STATA, #STRINGDATE

Posts by Category

  • Daily (28)
  • Economics (17)
  • Education (10)
  • Faith (2)
  • Investing (111)
  • Money (6)
  • People (1)
  • Recruiting (4)
  • Research (11)
  • Review (2)
  • Science (1)
  • STATA (4)
Copyright All rights reserved | Theme: Flash Blog by Unitedtheme.