Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creation of quintile variable in a stata

    Hi all,
    I have a data in my stata for Realassets variable,EXPDUM which is Export dummy equal 1 if firm export and O otherwise, I have beenn told that, a very small dummy is a dummy equal to 1 if firm real assets are in first quintile of the distribution of real assets of all firms in a same industry. small, medium, large and very large are calculated in similar way for second,third,fourth and fifth real assets quintiles. Very large is omitted category. How can I generate a dummies for these very small, small, Medium, large and very largein a stata???

  • #2
    I don't understand exactly what you want to do. But here is some generic related advice.

    First, there is probably no reason to actually create dummy variables unless you are using an ancient version of Stata. If you need these "dummies" for running regressions, just create a variable taking values 1, 2, 3, 4, and 5 designating the quintile for each observation. Then use factor-variable notation in your regression and Stata will make temporary "virtual" dummy variables on the fly without cluttering up your data set. If you are not familiar with factor-variable notation, learn about it by reading -help fvvarlist-.

    So how do you get that 1 to 5 variable? The -xtile- command does that. See -help xtile- for details.

    If you would like more detailed advice tailored to your data, use the -dataex- command to show example data and post back. If you are running version 17, 16 or a fully updated version 15.1 or 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

    Comment


    • #3
      Thank you a lot, That's will help me much. Additional questions, Which codes should I use if I want to replicate table which has pooled probit,random effects probit and fixed effects as columns each and variables in a rows.

      Comment


      • #4
        This sounds like something you could do with -estimates store- followed by -esttab- or -estout-. See their respective help files.

        Last edited by Clyde Schechter; 15 Apr 2022, 00:37.

        Comment


        • #5
          Thank you alot

          Comment

          Working...
          X