Stata 15 help for pcorr

[R] pcorr -- Partial and semipartial correlation coefficients

Syntax

pcorr varname varlist [if] [in] [weight]

varlist may contain factor variables; see fvvarlist. varname and varlist may contain time-series operators; see tsvarlist. by is allowed; see [D] by. aweights and fweights are allowed; see weight.

Menu

Statistics > Summaries, tables, and tests > Summary and descriptive statistics > Partial correlations

Description

pcorr displays the partial and semipartial correlation coefficient of a specified variable with each variable in a varlist after removing the effects of all other variables in the varlist. The squared correlations and corresponding significance are also reported.

Example

. sysuse auto . pcorr price mpg weight foreign

Stored results

pcorr stores the following in r():

Scalars r(N) number of observations r(df) degrees of freedom

Matrices r(p_corr) partial correlation coefficient vector r(sp_corr) semipartial correlation coefficient vector


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