Announcement

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

  • Cross tabs with tabout

    I have written the following command in stata to analyze contrarian cases for quintiles:

    tab qROE2009 qPatents2008, cell row col

    Where qROE2009 are de quintiles for ROE in 2009, and qPatents2008 are the quintiles for the variable Patents in 2008. This produces a table in which I see the croos tabulations of the data with the relative frequencies. I was wondering how to export this table to Word. I have tried with tabout command but I am not able to do it in a proper way.

    Can anyone help me?

    Thanks

  • #2
    Did you try it like this:
    Code:
    tabout qROE2009 qPatents2008 using example.xls, cells(freq row col)
    What errors did you get, or what results did you get that you didn't like with tabout?

    Comment


    • #3
      This is what I obtain from Stata:


      tab qPatentes2012 qROE2013, cell ( I can use the options row and column as well)

      +-----------------+
      | Key |
      |-----------------|
      | frequency |
      | cell percentage |
      +-----------------+

      5 |
      quantiles |
      of |
      Patentes20 | 5 quantiles of ROE2013
      12 | 1 2 3 4 5 | Total
      -----------+-------------------------------------------------------+----------
      1 | 34 48 37 48 37 | 204
      | 3.37 4.76 3.67 4.76 3.67 | 20.22
      -----------+-------------------------------------------------------+----------
      2 | 49 35 39 35 39 | 197
      | 4.86 3.47 3.87 3.47 3.87 | 19.52
      -----------+-------------------------------------------------------+----------
      3 | 37 31 45 48 41 | 202
      | 3.67 3.07 4.46 4.76 4.06 | 20.02
      -----------+-------------------------------------------------------+----------
      4 | 34 40 46 41 41 | 202
      | 3.37 3.96 4.56 4.06 4.06 | 20.02
      -----------+-------------------------------------------------------+----------
      5 | 35 28 41 53 47 | 204
      | 3.47 2.78 4.06 5.25 4.66 | 20.22
      -----------+-------------------------------------------------------+----------
      Total | 189 182 208 225 205 | 1,009
      | 18.73 18.04 20.61 22.30 20.32 | 100.00


      .
      end of do-file

      . tabout qROE2009 qPatentes2008 using table.doc
      (note: file table.doc not found)


      Table output written to: table.doc

      5 quantiles of Patentes2008
      5 quantiles of ROE2009 1 2 3 4 5 Total
      No. No. No. No. No. No.
      1 58.0 58.0 64.0 70.0 52.0 302.0
      2 66.0 64.0 60.0 60.0 46.0 296.0
      3 59.0 63.0 61.0 56.0 54.0 293.0
      4 47.0 58.0 64.0 53.0 62.0 284.0
      5 54.0 51.0 43.0 53.0 75.0 276.0
      Total 284.0 294.0 292.0 292.0 289.0 1,451.0

      But I want this table with the relative frequencies and I want it in Word

      I have also used this other command

      outreg2 qPatentes2008 qROE2009 using table1.doc, crosstab

      And this is what I have obtained in word
      (1) (2) (3) (4) (5) (6)
      qROE2009 1 qROE2009 2 qROE2009 3 qROE2009 4 qROE2009 5 qROE2009 .
      Freq Freq Freq Freq Freq Freq
      qPatentes2008 (Percent) (Percent) (Percent) (Percent) (Percent) (Percent)
      1 58*** 66*** 59*** 47*** 54*** 25
      (19.21) (22.30) (20.14) (16.55) (19.57) (27.78)
      2 58*** 64*** 63*** 58*** 51*** 14
      (19.21) (21.62) (21.50) (20.42) (18.48) (15.56)
      3 64*** 60*** 61*** 64*** 43*** 16
      (21.19) (20.27) (20.82) (22.54) (15.58) (17.78)
      4 70*** 60*** 56*** 53*** 53*** 16
      (23.18) (20.27) (19.11) (18.66) (19.20) (17.78)
      5 52*** 46*** 54*** 62*** 75*** 19
      (17.22) (15.54) (18.43) (21.83) (27.17) (21.11)
      Total 302 296 293 284 276 90


      but I want the relative frequencies (total relative frequencies, and the relative frequencies for row and column) in the table, and I do not need teh asteriscs and I do not know how to do it.

      Thanks for your help










      Comment


      • #4
        Hi, I am trying to use tabout but Stata gives me error


        . tabout cleta5 sex using \gabrielleino.txt,replace

        File \gabrielleino.txt
        is already open inside another application.
        Please close it before running tabout.

        That is impossible because I have no file named gabriellino. Someone could help me please?

        Comment

        Working...
        X