SarahLee1212 发表于 2015-8-30 11:20
嘿嘿 谢谢您 请问stata的相关性检验怎么显示星星呢?5 %1% 10%都显示。那个pwcorr_a不知道怎么弄
你如果安装了pwcorr_a命令,就可以查到帮助
help pwcorr_a A modified version of stata pwcorr command
------------------------------------------------------------------------------------------------------------------------------
Title
[R] pwcorr_a -- pairwise correlation coefficients
Syntax
Display all pairwise correlation coefficients
pwcorr_a [varlist] [if] [in] [weight] [, pwcorr_options]
pwcorr_options Description
------------------------------------------------------------------------------------------------------------------------
Main
obs print number of observations for each entry
sig print significance level for each entry
print(#) significance level for displaying coefficients
star(#) significance level for displaying with a star
star1(#) 1% significance level for displaying with three stars, newly added
star5(#) 5% significance level for displaying with two stars, newly added
star10(#) 10% significance level for displaying with one star, newly added
bonferroni use Bonferroni-adjusted significance level
sidak use Sidak-adjusted significance level
------------------------------------------------------------------------------------------------------------------------
varlist may contain time-series operators; see tsvarlist.
by may be used with the correlate and pwcorr; see by.
aweights and fweights are allowed; see weight.
Description
pwcorr_a displays all the pairwise correlation coefficients between the variables in varlist or, if varlist is not
specified, all the variables in the dataset.
The main differecne between pwcorr_a and the stata old command pwcorr is that, this new one can display ***(1%
significance level), **(5% significance level), and *(10% significance level), say, at the same time, while in the case
of pwcorr, only one of these can be done.
Options
+------+
----+ Main +------------------------------------------------------------------------------------------------------------
obs adds a line to each row of the matrix reporting the number of observations used to calculate the correlation
coefficient.
sig adds a line to each row of the matrix reporting the significance level of each correlation coefficient.
print(#) specifies the significance level of correlation coefficients to be printed. Correlation coefficients with
larger significance levels are left blank in the matrix. Typing pwcorr, print(.10) would list only correlation
coefficients significant at the 10% level or better.
star(#) specifies the significance level of correlation coefficients to be starred. Typing pwcorr, star(.05) would star
all correlation coefficients significant at the 5% level or better.
star1(#) star5(#) star10(#) are newly added, which specify the significance level of correlation coefficients more
detailed. Typing pwcorr, star1(.01) star5(.05) star10(.1) would star all correlation coefficients significant at
the 1%, 5%, and 10% level, respectively.
bonferroni makes the Bonferroni adjustment to calculated significance levels. This affects printed significance levels
and the print() and star() options. Thus pwcorr, print(.05) bonferroni prints coefficients with Bonferroni-adjusted
significance levels of .05 or less.
sidak makes the Sidak adjustment to calculated significance levels. This affects printed significance levels and the
print() and star() options. Thus pwcorr, print(.05) sidak prints coefficients with Sidak-adjusted significance
levels of .05 or less.
Examples
. pwcorr_a
same as stata command pwcorr
. pwcorr_a price weight mpg displ, star1(0.01) star5(0.05) star10(0.1)