Announcement

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

  • Need Help to Produce a Descriptive Statistics Table

    Hello

    I created a regression table and now I would like to get descriptive data for the variables in my regression. I do not want general descriptive information for each variable, but specific descriptive info for the variables used. For instance, in my model I have income. The variable has 2310 total observations in my data set, but in my regression (with other variables) the observations are limited to 1370. I want to get descriptive information for this subset (1370) without having to drop all missing values for all variables I am using in my regression. Any suggestions?

    I've searched the internet to find a solution, but I have not found anything.

    Thanks!

  • #2
    The question doesn't bear on Mata at all, so really belongs in the General forum.

    Answers are documented within the Stata world. For one explanation, see

    SJ-7-2 dm0030 . . . . . . . . . . Stata tip 44: Get a handle on your sample
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B. Jann
    Q2/07 SJ 7(2):266--267 (no commands)
    tip on how to keep track of the observations that make
    up your estimation sample

    http://www.stata-journal.com/article...article=dm0030

    Comment


    • #3
      Thanks!

      Comment


      • #4
        As Nick notes, this isn't a Mata issue but it's a common challenge I'll answer for the google searchers of the future. There are a couple of ways to do this, but one easy way to do this is with egen:

        egen missvar=rowmiss(varlist)

        sum varlist if missvar==0

        egen rowmiss tallies up the number of questions a particular respondent is missing. A value of 0 means that they missed none of the items- anything greater and they would have missed one of the questions and therefore would have been booted out by listwise deletion.

        Comment

        Working...
        X