Announcement

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

  • save ttest results and form a summary statistics table

    I need to do 3 t tests.
    Code:
    foreach n in addition deletion total {
       ttest pre`n' == post`n'
    }
    And for each t test, I need to store their r(mu_1), r(mu_2), two Std. Err., and r(t).

    Finally, I need to create a table like this:
    Click image for larger version

Name:	WX20200311-155545.png
Views:	1
Size:	54.7 KB
ID:	1540892


    My idea is that I first store these numbers, and then I can list them in a matrix, and then I can transfer this matrix to my LaTex file.

  • #2
    How to get access to these numbers and form a matrix?

    Comment


    • #3
      Since you like frames, I suggest you look at frame post. Create a frame, then post the results into that frame following a command:
      Code:
      frame creat newframe var1 var2 var3 ...
      ttest var1==var2
      frame post newframe (r(mu_1)) (r(sd_1)) ... (r(p))
      Then export the frame.

      Comment


      • #4
        Aha, Daniel, see you again.

        r(sd_1) is not correct. I need standard error of two means, not standard deviation. I didn't see SE in the -return list-.

        Also, why do you think frame will be helpful? I don't see the benefits here.

        Comment


        • #5
          I figure out how to get SE: di r(sd_1)/(sqrt(r(N_1)))

          But I still dont' need to fill in the loop.

          Comment


          • #6
            It is helpful in that you can export a table of estimates and create a table like the one you have on top. You can use putdocx table or something equivalent, and with proper formatting, make the same table as above. Better than copying and pasting outputs!

            Comment

            Working...
            X