Announcement

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

  • Standard deviations by class

    Hello!
    Doing the descriptive statistics in my project I stumbled upon an issue that I can't seem to solve.
    Basically, I have a data set of firms, and have the start-up size for each one in the data set. I need to obtain the values for the following table:
    Mean Std. dev
    Start-up size (employees at time of birth)
    Start-up size: 1 employee
    Start-up size: 2-4 employees
    Start-up size: 5-9 employees
    Start-up size: 10 or more employees
    In order to obtain the mean and standard deviations for the start-up size considering all the firms, I simply run "summarize startup_size", and I can obtain the wanted results.
    In order to obtain the percentages of each of the divisions of start-up size, I started by using the following code:

    gen startup_class=0
    replace startup_class=1 if startup_size==1
    replace startup_class=2 if (startup_size>=2 & startup_size<=4)
    replace startup_class=3 if (startup_size>=5 & startup_size<=9)
    replace startup_class=4 if startup_size>=10)

    Each lets me know to which start-up size class a firm belongs to. Having done this, by running "tab startup_class", I obtain the percentages of each class (which in the table is the "mean")
    However, I have been trying, and can't find a way to obtain the standard deviation of each class, and the research I've done also did not help. How can I obtain them?
    Any help would be much appreciated!

  • #2
    It is very unusual to report the standard deviation of a percentage in descriptive statistics. Are you sure that's really what you need to do? If you really do need to do that, you can get it as follows:

    Code:
    forvalues i = 0/4 {
        summ `i'.start_upclass
    }
    You will get an output table from -summarize- for each of the 5 levels of start_up class. In those tables, Obs will give you the number of observations that fall into that class. Mean will be the proportion of observations in that class (percentage divided by 100) and std.dev. will give you the standard deviation of that proportion--which you can convert to the standard deviation of the percentage by multiplying it by 100. [The min will be 0 and the max will be 1.]

    But again, it is almost unheard of to report descriptive statistics in this way. I strongly urge you to make sure you are not misunderstanding your instructions.

    Comment

    Working...
    X