Announcement

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

  • typography/semantics for putexcel

    I am trying to output postestimation summary data to Excel using Stata 14 on a Mac. I set up and formatted the excel file as directed in the help manual and examples online; so far so good. I run my model and then enter the following:
    estat summ allath
    return list
    putexcel A4 = "All athletes"
    putexcel B4 = (e(N))
    putexcel C4 = `r(mean)', nformat(number_sep_d2)
    putexcel D4 = `r(sd)', nformat(number_sep_d2)

    When I run this, it's perfect through selecting the N and then I get the following error message on the next line:
    nothing found where expression expected
    I'm using the caret/accent grave key on the top left of my keyboard and the single apostrophe toward the bottom right, as it appears in the Stata manual and other forum discussions. Using the apostrophe for both or using parentheses does nothing. Help!

    Thanks in advance,
    Welch Suggs
    University of Georgia, USA
    [email protected]

  • #2
    Looks like mean is not in the saved results. Possible? check the return list output. Use the cars data to reproduce your problem with a standard dataset. Best, Sergiy

    Comment


    • #3
      Expanding slightly on Sergly's advice, you should add ereturn list after your return list to see exactly what remains in e() at that point. I just tried a small test, and with a value in e(N) both the following worked
      Code:
      putexcel B4 = (e(N))
      putexcel C4 = `e(N)'

      Comment

      Working...
      X