Announcement

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

  • Saving matrix as a .dta file.

    Hi there,

    I am using Stata 16.

    I have calculated the mean and sd of some daily sleep duration variables using tabstat:

    Code:
    tabstat sleep_dur_tue_before sleep_dur_wed_before sleep_dur_thur_before sleep_dur_fri_before sleep_dur_sat_before sleep_dur_sun_after sleep_dur_mon_after sleep_dur_tue_after sleep_dur_wed_after sleep_dur_thur_after, stats(mean sd) save
    Code:
    return list
    *matrices:
    *r(StatTotal) : 2 x 10

    I have then saved the output as a matrix called "spring_matrix":

    Code:
    matrix spring_matrix = r(StatTotal)      
    matrix list spring_matrix
    My question is, how can I save spring_matrix as a .dta file (so that I can then go on & use it to create a coefficient plot)?

    Thank you in advance,

    Mel

  • #2
    help svmat
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment

    Working...
    X