感谢您的解答,刚刚试过,很好用。
这边又有一个问题:我有一组变量(六个),样本数据有9个,但这9个样本之间有一定的相关性,因为是扫描同一个数据库里的数据,不同的标准来统计的。数据如下,我的问题是如何用Pearson相关系数来反应,我用了correlate ,但得到的结果与文章中的不同,望指点。谢谢
table 1
IntRD ExtRD Machi Techno Trial Market
Overall sample 37.2 17.4 73.4 29.2 19.9 28.3
Using appropriation instruments 25.7 14.7 76.2 27.3 15.0 20.6
Not using them 55.9 21.7 69.0 32.3 27.7 40.8
Using legal appropriation instruments 57.3 23.5 68.6 36.1 30.0 45.7
Using strategic appropriation instruments 63.7 24.1 71.0 29.4 29.0 40.3
Manufacturing 42.4 18.4 73.4 23.5 21.6 27.3
Services 26.6 15.2 73.4 41.0 16.2 30.4
Low-technology/knowledge content 29.3 16.5 76.8 29.7 18.6 26.6
High-technology/knowledge content 59.9 19.8 64.0 27.9 23.3 33.0
table 2书上的结果
Association between the different types of expenditure (Pearson’s φ)
IntRD ExtRD Machi Techno Trial Market
IntRD 1.000 0.179 −0.225 −0.012 0.119 0.129
ExtRD 0.179 1.000 −0.036 0.050 0.020 0.109
Machi −0.225 −0.036 1.000 0.142 −0.101 −0.004
Techno −0.012 0.050 0.142 1.000 0.072 0.149
Trial 0.119 0.020 −0.101 0.072 1.000 0.255
Market 0.129 0.109 −0.004 0.149 0.255 1.000
我的结果:(var 2到7依次是上表中的IntRD等等)我用的命令是:corre
| IntRD ExtRD Machi Techno Trial Market
IntRD | 1.0000
ExtRD| 0.9413 1.0000
Machi | -0.8302 -0.6511 1.0000
Techno| -0.0949 0.0310 -0.0970 1.0000
Trial | 0.9274 0.9919 -0.6589 0.0570 1.0000
Market | 0.8195 0.9109 -0.6661 0.4202 0.9288 1.0000
有关的一段说明如下:
The first line of Table 1 shows the proportion of firms
that had some expenditure on the different types of innovation
activity.
Clustering innovation activities will help us simplify
our models that aim to predict their occurrence. In order
to find groups of activities which are conceptually complementary
and actually done together by a substantial
number of firms, we estimate the relationships between
all possible pairs of binary variables indicating if the firm
carried out the different innovation activities. The Pearson’s
φ statistic was used. For 2×2 tables, it is bounded
between−1 and +1 and thus interpreted like a correlation
(Table 2).
谢谢高手指点