Announcement

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

  • Exporting Cross tabulation with CHI2 results in tex

    Hi all,

    I am trying to export a simple cross tabulation table including chi2 results.

    This works fine with asdoc but unfortunately I cannot save it in tex to then later import into latex.
    Anyone have any tips for this? From what i've read esttab does not work for this kind of command?

    I've also tried tabout where I state ...... stats(chi2) .....but always get the error response "unrecognized command: stat"

    Code:
    tabulate Treatment_Group DC, cchi2 chi2 column row

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input byte(Treatment_Group DC)
    2 0
    1 0
    2 0
    3 0
    2 0
    3 0
    3 0
    2 0
    2 0
    3 0
    2 0
    3 0
    1 0
    3 0
    3 0
    2 0
    3 0
    3 0
    2 0
    1 0
    1 0
    1 0
    1 0
    3 1
    1 0
    2 0
    3 0
    2 0
    4 0
    2 0
    3 0
    1 0
    1 0
    4 0
    3 0
    1 0
    3 0
    1 0
    3 0
    2 0
    1 0
    2 0
    2 0
    2 0
    4 0
    4 0
    1 0
    1 0
    3 0
    4 0
    4 1
    1 0
    3 0
    4 0
    4 0
    3 0
    1 0
    3 0
    3 0
    3 0
    1 0
    2 0
    3 0
    4 0
    4 0
    1 0
    1 0
    3 0
    4 0
    3 0
    3 0
    1 0
    4 0
    2 0
    2 0
    1 0
    4 0
    3 0
    2 0
    4 0
    1 0
    3 0
    2 0
    3 0
    1 0
    1 0
    1 1
    3 1
    2 0
    3 0
    1 0
    4 0
    3 0
    2 0
    1 0
    2 0
    3 0
    1 0
    2 0
    3 0
    end
    label values Treatment_Group Treatment_labels
    label def Treatment_labels 1 "1. Control", modify
    label def Treatment_labels 2 "2. SOC", modify
    label def Treatment_labels 3 "3. ENV", modify
    label def Treatment_labels 4 "4. SOC*ENV", modify
    label values DC DClabel
    label def DClabel 0 "0. False", modify
    label def DClabel 1 "1. True", modify
Working...
X