Announcement

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

  • How to write out matrix as stata dataset

    Dear all,
    My question may soud elementary:

    After using eigensystem to obtain eigenvector , how do I save the output as stata data?

    thanks,

    Rochelle

  • #2
    getmata
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      Thank you !

      Please see my code below on a pretend data. I want to output the eigenvector X after running matrix symeigen.


      matrix a=(1,2\3,4)

      matrix list a

      * make it symmetric

      matrix b=a'*a

      matrix symeigen X L = b

      matrix list X

      getmata X

      ** error : vector or matrix X not found

      What did I do wrong?

      - Rochelle

      Comment


      • #4
        You can figure this out for yourself if you read the help for getmata. The section titled "Definition of getlist for use with getmata" has four basic examples. Your current syntax corresponds to none of them.
        Last edited by Steve Samuels; 02 Jun 2014, 18:35.
        Steve Samuels
        Statistical Consulting
        [email protected]

        Stata 14.2

        Comment

        Working...
        X