Announcement

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

  • Post estimation of PCA, extract a matrix and graph

    I am using Principal components analysis on bond returns. I have five bond series from short-term to long-term, Ret1-Ret5:

    I run the following to extract the loadings:

    pca Ret*, covariance components(3)
    estat loadings
    mat L = r(A)

    Now I would like to graph the loadings, so that the loadings are on the Y-axis and the X-axis are the portfolio numbers 1 to 5. Maybe the question is really about working with matrices in stata than in principal components, but perhaps there is a way to get loadingplot to produce the result.

    [I realize this might seem strange, but the loadings have a level, slope and curve pattern. The first factor loads equally on all bonds, the second has a monotonic pattern from low to high, and the third has a hump shape with low loadings on the extreme bonds and high loadings on the middle.]

  • #2
    Charlie may want to take a look at - help scoreplot - and related entries in Stata 13.1 .pdf manual.

    Kind regards,
    Carlo
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      This sounds like the problem for which -eofplot- (SSC) was written,

      Comment


      • #4
        Also search the forum to see an example.

        Comment


        • #5
          Thank you so much, Nick. eofplot solves my problem so beautifully.

          In the earlier post, you asked, "Does any have example references of similar plots?"

          I am not sure if you looking for research papers, but the example I am following is from, "Common Factors Affecting Bond Returns" by Litterman and Scheinkman, Journal of Fixed Income, 1991 (See Figure 2). The article is influential and has found its way into many textbooks on the yield curve.

          Comment


          • #6
            Excellent; I will check out the reference.

            Comment

            Working...
            X