Announcement

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

  • Help with ADO file

    Hi
    I am new to STATA.
    I want to use the similar commands as this attached paper to create an index using DFM (Dynamic Factor Model) with panel data on STATA.
    https://www.stata.com/meeting/2italian/Federici.pdf
    When I run the commands 'symmetric ST[24,24]' and 'eigenvalues[1,24]', I keep getting "unrecognized command".
    When I type in 'which symmetric' or 'which eigenvalues' I get "command symmetric not found as either built-in or ado-file" or "command eigenvalues not found as either built-in or ado-file".
    Can someone help me with this, please?
    Do I need to install any ADO file from STATA?
    If yes, how and which one?

    Thanks so much in advance.
    Any quick help will be appreciated.
    I am on the last leg of my research.

    Please, please help kind souls!

  • #2
    The allusiton is to page 5 of the link in #1.

    Code:
    symmetric ST[24,24]
    
    eigenvalues[1,24]
    These are results that Stata would give you if you have such matrices in ,memory and issued the commands

    Code:
    mat list ST 
    
    mat list eigevanlues
    They aren't Stata commands. There is nothing to install.

    Comment


    • #3
      Hi Nick!
      Thank you so much for clarifying. My silly self thought of it as a command.

      One more thing.
      In the paper there are 9 time periods, 13 cross-sections and 3 variables.
      I have 76 time periods, 27 cross-sections and 24 variables.
      The 1st command in the screenshot attached, it has "..2/9..." will it be "...2/76..." I'm not really sure what this 2 means here and whether it will be the same in my command as well. Can you guide.
      And when I'm running the 2nd command as "forvalues i = 1/27 {
      twoway (line unit`i'1 t), xtitle(,size(zero)color(ltbluishgray)) legend(off) nodraw
      graph save unit`i', replace
      }" ....I get "variable uniti1 not found"

      Thanks

      Comment


      • #4
        I would seek help from the presentation authors in this case.

        Comment


        • #5
          Tried that. But not able to connect with them.

          Comment


          • #6
            refer page no. 11 https://www.stata.com/meeting/2italian/Federici.pdf
            STATA command:

            matrix ST=J(24,24,0)

            forvalues i=1(27)2052 {
            matrix num = J(1,1,0)
            matrix C=A[`i'..(`i'+27-1),1...]
            svmat C
            matrix accum cov = C1-C24, deviations noconstant
            matrix cov=cov/(r(N)-1)
            matrix ST=ST+cov
            drop C1-C24
            forvalues k = 1/24 {
            mat num = num + (e`k'*cov*e`k')
            }
            mat I_`t' = num/trace(cov)
            mat list I_`t'
            local t = `t'+1
            }
            OUTPUT I am getting:

            (obs=27)
            conformability error
            r(503);

            This happens when there could be a problem with the matrix form compatibility
            But I am unable to figure out that mathematical part.

            Please help

            Attached Files

            Comment

            Working...
            X