help matpwcorr
-------------------------------------------------------------------------------

Title

Takes the output from pwcorr and creates the corresponding matrices

Syntax

matpwcorr [varlist] [if] [in] [, options]

options Description ------------------------------------------------------------------------- Main gen specifies that the correlations and p-values are saved in 4 variables with names corr, pv, pv_sidak and pv_bonf. -------------------------------------------------------------------------

Description

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 correction and pv_sidak contains the p-values after the Dunn-Sidak correction.

Options

+------+ ----+ Main +-------------------------------------------------------------

gen specifies that the correlations and p-values are saved in 4 variables with names corr, pv, pv_sidak and pv_bonf.

Examples

Click the following commands in order. The first one loads the Stata automobile > data and note any data already loaded in Stata will be LOST. sysuse auto,clear

Creates the matrices matpwcorr price mpg rep78 headroom trunk length weight

List the matrices mat list corr

mat list pv

mat list pv_sidak

mat list pv_bonf

In conjunction with plotmatrix display the p-values as a graph. plotmatrix, mat(pv_bonf) lower nodiag split(0 0.001 0.01 0.05 1)

Also see

Online: pwcorr plotmatrix (if installed) ssc install plotmatrix (to install this command)