Announcement

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

  • correct code in exporting statistics summary into word

    Dear members
    I am trying to export summary stata for my study key variables per country. I want the number of observations per country and the mean variable for the following variables CSR score, allindrawn, New_trust climt,volunerbi..
    I used the following code but it gave errors such as the option stata ( )not allowed and error 503.
    the code:bys Country: sum CSR _score allindrawn New_trust climt_volunerbi,statistics(mean) replace

    thanks for your help

  • #2
    Hi Saleh, how about a code snippet such as:
    Code:
    cd "C:/StataDirectory"
    collapse (mean) CSR_score allindrawn New_trust climt_volunerbi (count) Country, by(Country)
    export excel using "Saleh's data"

    Comment


    • #3
      Thanks, Eric for your response. The code you provided did not work as Country should not be used in the variable list. I tried to omit it but it did not work.

      Comment

      Working...
      X