Announcement

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

  • Summary Statistics table

    Hi all I have this sample data and I am trying to make the descriptive statistics table and I am getting the error message that " factor-variable and time-series operators not allowed"

    what could be the issue and how to resolve it please

    Thanks


    * ---------------------------- DESCRIPTIVE STATISTICS ----------------------- *
    global vars_analysis " y x "

    eststo clear
    eststo d2: estpost tabstat $vars_analysis statistics(mean sd) columns(statistics)

    * --------- TABLE 1 ------------- *
    esttab d2 using "desc_stats.csv", replace ///
    cells("mean(fmt(2))" "sd(fmt(2) par)") nomtitle nonumber label style(tex)


    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int year str1 country double y byte x double u
    1995 "A" 112.2795405 78    -.1204595
    1996 "A" 112.2795405 75  -.763246334
    1997 "A" 112.2795405 74   .379094511
    1998 "A" 112.2795405 79  -.886656581
    1999 "A" 112.2795405 59  1.245839221
    2000 "A" 112.2795405 64 -1.058418364
    1995 "B" 94.39353948 69  -.106460523
    1996 "B" 94.39353948 80  -.457311186
    1997 "B" 94.39353948 60  -1.88342245
    1998 "B" 94.39353948 77   .317133339
    1999 "B" 94.39353948 65  1.282185786
    2000 "B" 94.39353948 52   -.32298002
    1995 "C" 114.7968852 52  -.803114796
    1996 "C" 114.7968852 74 -1.207924453
    1997 "C" 114.7968852 70  -.166647011
    1998 "C" 114.7968852 72  -.810126971
    1999 "C" 114.7968852 63 -1.170526314
    2000 "C" 114.7968852 68  -.905201329
    1995 "D" 141.3790344 74  -.820965639
    1996 "D" 141.3790344 70    .37226075
    1997 "D" 141.3790344 71  -.334095039
    1998 "D" 141.3790344 74  -.356031954
    1999 "D" 141.3790344 67   .102470697
    2000 "D" 141.3790344 77   .617302038
    1995 "D" 31.47082634 71    .17082634
    1996 "D" 31.68595914 69   .985959144
    1997 "D" 26.15436307 51    .85436307
    1998 "D" 26.76591095 56  -.034089052
    1999 "D" 32.03381904 74  -.166180963
    2000 "D" 33.04601463 76   .246014629
    end





  • #2
    estout is from SSC (FAQ Advice #12). -statistics()- and -columns()- are options, so there should be a comma that precedes them.

    Code:
    eststo d2: estpost tabstat $vars_analysis, statistics(mean sd) columns(statistics)

    Comment

    Working...
    X