Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: regression with correlation matrix


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: regression with correlation matrix
Date   Tue, 10 Apr 2007 12:51:58 +0100

In addition, 

. search correlation matrix

or indeed 

. findit correlation matrix 

points to various things, including 

FAQ     . . . . . . . . . . . . . . . . . . . Obtaining the correlation matrix
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . W. Gould
        12/99   How can I obtain the correlation matrix as a Stata
                matrix?
                http://www.stata.com/support/faqs/stat/rho.html

STB-56  dm79  . . . . . . . . . . . . . . . . . . Yet more new matrix commands
        (help matcorr, matewmf, matvsort, svmat2 if installed)  . .  N. J. Cox
        7/00    pp.4--8; STB Reprints Vol 10, pp.17--23
        commands to produce a correlation matrix, elementwise monadic
        function of another matrix, selected subsets of matrix rows
        and columns, vec or vech of a matrix, elements sorted within
        a vector, matrix from a vector, and commands to save matrices

corrmat from http://www.stata.com/users/sdriver
    corrmat.  Create and save correlation or covariance matrices.  / Program
    by Shannon Driver, StataCorp <[email protected]>. / Creates a correlation
    matrix, covariance matrix, or both and optionally / saves them in the
    return list and/or matrix dir.

cpcorr from http://fmwww.bc.edu/RePEc/bocode/c
    'CPCORR': module for correlations for each row vs each column variable /
    cpcorr produces a matrix of correlations for rowvarlist versus /
    colvarlist. cpspear does the same for Spearman correlations. This / matrix
    may thus be oblong, and need not be square. Both also / allow a single

matpwcorr from http://fmwww.bc.edu/RePEc/bocode/m
    'MATPWCORR': module to takes the output from pwcorr and creates the
    corresponding matrices / matpwcorr calculates pairwise correlations and
    puts the resulting / output into the matrices pv, corr, pv_bonf and
    pv_sidak. The / pv_bonf matrix contains the p-values after a Bonferroni /

Nick 
[email protected] 

Richard Williams
 
> At 06:56 PM 4/9/2007, Caleb Southworth wrote:
> >Is there a way to transfer a correlation matrix directly 
> into a matrix
> >without retyping the results?
> >
> >something like - mat def Rx = -
> >
> >Does stata have an ado file that does regression with correlation
> >coefficients (a la SPSS)?
> >
> >That is, I would generate the standardized betas something like
> >
> >-mat def b=inv(Rx)*Ry   where Rx is the matrix of correlations among
> >Xs and Ry is the vector of correlations with Y.
> 
> See pages 8-10 of
> 
> http://www.nd.edu/~rwilliam/stats1/OLS-Stata9.pdf
> 
> or else possibly
> 
> http://www.nd.edu/~rwilliam/stats1/Matrices-Stata.pdf
> 
> The first shows you how to analyze a correlation matrix when you 
> don't have the original raw data, e.g. you are working from a printed 
> article.  The 2nd shows you how you can use matrix functions to 
> create a correlation matrix and do your own regression analysis.
> 
> Incidentally, -regi- (where i = immediate) would be a logical command 
> for Stata to have, given that it has other immediate commands (e.g. 
> -ttesti-), but as far as I know no one has written it.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index