Announcement

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

  • Correlation matrix for error correction with PMG (xtdcce2 command)

    I am looking to create a correlation matrix to describe correlations between my variables in a panel dataset, taking into account both time variance and cross-sectional variance. In checking that I am using the write command, I have run across multiple different ways of getting a correlation matrix from panel data. These differences seemed to depend on whether one was using a fixed effects or random effects regression, but I am running PMG estimation on the error correction model with the stata command xtdcce2 seen below (excluding for simplicity the measures of tax in the correlation matrix):
    Code:
    xtdcce2 d.growth d.l(growth) d.l(0/1)(gfcfgdp employmentgrowth yearsedugrowth l.lngdpph) if year < 2007, ///
        lr(l.growth gfcfgdp employmentgrowth yearsedugrowth l.lngdpph) ///
        p(l.growth gfcfgdp employmentgrowth yearsedugrowth l.lngdpph) nocross exponent
    The code I am using to get the correlation matrix, and the output, looks thus:
    Code:
    estpost corr deltagrowth tau_k tau_h tau_c topstat corptax, matrix
    
                 |      e(b)     e(rho)       e(p)   e(count)
    -------------+--------------------------------------------
    deltagrowth  |                                            
     deltagrowth |         1          1                   624
           tau_k | -.0242413  -.0242413    .550123        610
           tau_h |  .0054273   .0054273   .8935842        610
           tau_c | -.0135446  -.0135446   .7378667        613
         topstat |  .0370203   .0370203   .4018233        515
         corptax |  .0261412   .0261412   .5539194        515
    tau_k        |                                            
           tau_k |         1          1                   634
           tau_h | -.1796277  -.1796277   5.34e-06        634
           tau_c |  .8209436   .8209436   6.1e-156        634
         topstat |  .3049076   .3049076   2.28e-12        507
         corptax |  .1455464   .1455464   .0010139        507
    tau_h        |                                            
           tau_h |         1          1                   634
           tau_c | -.0567003  -.0567003   .1538664        634
         topstat |  .0140263   .0140263   .7527144        507
         corptax | -.0936416  -.0936416   .0350374        507
    tau_c        |                                            
           tau_c |         1          1                   639
         topstat |  .2002276   .2002276   5.53e-06        507
         corptax | -.0151513  -.0151513   .7336056        507
    topstat      |                                            
         topstat |         1          1                   517
         corptax |  .7163097   .7163097   1.61e-82        517
    corptax      |                                            
         corptax |         1          1                   517
    I just wanted to check I am not making a glaring error here. Is "corr" the right command in this context? Thanks!
Working...
X