Announcement

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

  • Correlations

    Hi people,

    For my Master's thesis, I need to include a correlation matrix table including the correlations between the variables in my main regressions.
    I also have to include the significance of those correlations.

    When I go for summary statistics, I see different options for correlations.

    I just need the "simple" correlations between the dependent, independent, and control variables of my regression. What sort of correlation should I let STATA compute? Are there differences?

    Best,
    Mixa

  • #2
    Mixami:
    you can easily get what you're after just typing
    Code:
    estat vce, corr
    after -regress-.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Hi Carlo,

      Thank you!

      However, I do need the significance levels for the correlations...

      Comment


      • #4
        Mixami:
        I do not think that you can have the significance of the coefficient correlation from -estat vce, corr-.
        Probably the only ferasible approach is to calculate it by hand.
        Conversely, if you need the significance of the variable correlation, you can take a look at -help ktau-.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Please check whether this command can do the trick you wish:

          Code:
          . sysuse auto
           
          . regress mpg price headroom displacement foreign
          
                Source |       SS           df       MS      Number of obs   =        74
          -------------+----------------------------------   F(4, 69)        =     19.50
                 Model |   1296.6577         4  324.164425   Prob > F        =    0.0000
              Residual |  1146.80176        69  16.6203154   R-squared       =    0.5307
          -------------+----------------------------------   Adj R-squared   =    0.5035
                 Total |  2443.45946        73  33.4720474   Root MSE        =    4.0768
          
          ------------------------------------------------------------------------------
                   mpg |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
                 price |  -.0003979   .0002207    -1.80   0.076    -.0008382    .0000423
              headroom |  -.9113702   .6515178    -1.40   0.166    -2.211113    .3883722
          displacement |  -.0321926   .0096471    -3.34   0.001     -.051438   -.0129472
               foreign |   .6346428   1.537254     0.41   0.681    -2.432096    3.701381
                 _cons |   32.64149    2.14492    15.22   0.000     28.36249    36.92049
          ------------------------------------------------------------------------------
          
          . pwcorr mpg price headroom displacement foreign, sig
          
                       |      mpg    price headroom displa~t  foreign
          -------------+---------------------------------------------
                   mpg |   1.0000 
                       |
                       |
                 price |  -0.4686   1.0000 
                       |   0.0000
                       |
              headroom |  -0.4138   0.1145   1.0000 
                       |   0.0002   0.3313
                       |
          displacement |  -0.7056   0.4949   0.4745   1.0000 
                       |   0.0000   0.0000   0.0000
                       |
               foreign |   0.3934   0.0487  -0.2939  -0.6138   1.0000 
                       |   0.0005   0.6802   0.0110   0.0000
          Best regards,

          Marcos

          Comment


          • #6
            Hi Marcos,

            Thanks! It works indeed.

            Comment

            Working...
            X