楼主: runner
3139 4

[问答] 怎么用spss求下三角协方差矩阵?有高人指点一下吧 [推广有奖]

  • 9关注
  • 4粉丝

讲师

74%

还不是VIP/贵宾

-

威望
0
论坛币
4360 个
通用积分
0
学术水平
2 点
热心指数
1 点
信用等级
2 点
经验
3941 点
帖子
318
精华
0
在线时间
910 小时
注册时间
2004-12-12
最后登录
2022-2-28

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
本来以为是一个简单的操作,可是搜了半天也没见到答案,这个很难吗?我需要下三角的协方差矩阵,不是一般的那种。有高人之前一下吧。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:协方差矩阵 SPSS 高人指点 PSS 协方差

已有 1 人评分论坛币 收起 理由
ReneeBK + 20 鼓励积极发帖讨论

总评分: 论坛币 + 20   查看全部评分

沙发
ReneeBK 发表于 2014-4-5 04:30:29 |只看作者 |坛友微信交流群

Printing the covariance matrix through the Reliability procedure, the Correlation procedure, or the Regression procedure


The Reliability procedure is somewhat simpler in that the covariance matrix is automatically printed as a separate table. The Correlation procedure combines the correlation, significance, cross-product deviations, covariance, and N for a variable pair into a single table cell. There is a way to reorganize this table so that the covariance matrix is printed as a separate table or subtable. It should be noted that the Reliability procedure uses listwise deletion of cases with missing values, ie., the covariances will be computed with only those cases that have no missing values on the variables in the analysis. The correlation procedure uses pairwise deletion by default, i.e. each covariance is calculated with all cases that have valid values
on that variable pair and each variance is calculated with all cases that have valid values on that variable. Listwise deletion is available as an option in the Correlation procedure. (See Technote 1475199, which addresses this distinction between the options.) The Regression procedure must be run from syntax for the covariance matrix option to be included. If you want listwise deletion and want the covariance matrix to be printed in a separate table, then the Reliability procedure will be the simplest solution. If you want pairwise deletion, you will need to use the Correlation or Regression procedure. The details for each procedure are provided below.

-------

The Reliability Procedure (Analyze->Scale->Reliability Analysis):
In the Reliability Analysis dialog, paste the variables of interest into the Items box and click the Statistics button. In the Statistics dialog that opens, click the checkbox for Covariances in the Inter-Item area. (There is also a checkbox for correlations. To request the correlation and covariance matrices in command syntax, add the keywords 'Corr' and 'Cov' respectively, to the /STATISTICS subcommand, as in:

RELIABILITY
/VARIABLES=time age salnow edlevel work jobcat minority
/FORMAT=NOLABELS
/SCALE(ALPHA)=ALL/MODEL=ALPHA
/STATISTICS=CORR COV .

The correlation and covariance matrices will print as separate tables.
_______

The Correlation Procedure (Analyze->Correlate->Bivariate):

In the "Bivariate Correlations" dialog, paste the variable of interest into the Variables box on the right of the dialog box. Then click the Options button. In the Options dialog, click the checkbox for
"Cross-product deviations and covariances". Click Continue and then click OK. To make this choice in a syntax command, add the keyword 'XPROD' to the /STATISTICS subcommand, as in:

CORRELATIONS
/VARIABLES=time age salnow edlevel work jobcat minority
/STATISTICS XPROD .

You may want to reorganize the Correlation table that is printed. In that table, the rows will be organized by variable, i.e. for each variable, the Pearson correlation, Sig. value, Sum of Squares and Cross-Products, Covariance, and N will be printed in one cell of the table.If you want separate tables for the correlation,..covariance, etc., you can use the pivot trays to accomplish this. Right-click anywhere in the Correlation table. In the pop-up menu that appears, choose
'SPSS Pivot Table Object->Open'. A pivot table window will open with the Correlation table. In that window: Open the Pivot menu and choose 'Pivoting trays'. In the Pivoting tray dialog, there will be 2 icons in the Row area. The first is for Variables and the second is for Statistics. Click the Variables (leftmost) icon and drag it to the right of the Statistics icon. If you close the Pivoting Trays dialog by clicking the x in the upper right corner, you will see in the Pivot Table window that the Pearson Correlation matrix is a separate subtable, as are each of the Sig., Sum of Squares and Cross-Products, Covariance and N matrices. If you like this organization, just close the Pivot Table window and your changes will be reflected in the Output window. If you want to hide all of the matrices in the table except the covariance matrix, then reopen the Pivoting trays dialog and drag the Statistics icon into the Layers area. When you close the Pivoting Trays dialog, only the Pearson Correlations matrix will be visible. However, there will be a Statistics tab with a scroll arrow at the top of the table. Scroll down to Covariance and click that choice. The Covariance matrix will become the visible matrix in this table. Close the Pivot Table window to return to the Output window.

_______________________________

The Regression Procedure:
As stated above, you can use the Regression procedure to print the covariance matrix but you will need to run it from a syntax command. You can build the command in the Regression dialog boxes. You will need to paste one of the variables into the "Dependent:" box and the other variables into the "Independent(s):" box. (The dependent variable will be in the first row and column of the covariance matrix.) Click the
Statistics button in the Regression dialog and check the box beside 'Descriptives' in the Statistics dialog and click Continue. Click Paste rather than OK. In the Syntax window, add the keyword "Cov" to the /DESCRIPTIVES subcommand, as in:

REGRESSION
/DESCRIPTIVES MEAN STDDEV CORR SIG N cov
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT sex
/METHOD=ENTER time age salnow edlevel work jobcat minority .

The Covariance matrix will print as a subtable in the Correlations table. Note that regression uses listwise deletion by default but pairwise deletion can be requested from the "Regression: Options" dialog or by replacing "LISTWISE" with "PAIRWISE" in the REGRESSION command .

使用道具

藤椅
ReneeBK 发表于 2014-4-5 04:38:25 |只看作者 |坛友微信交流群

In SPSS, how do I generate a covariance matrix as a data set?



In SPSS, use the CORRELATION and the MCONVERT commands to create a covariance matrix.

The CORRELATION command generates a correlation matrix. The MCONVERT command converts the correlation matrix to a covariance matrix.

Suppose you have three variables (e.g., age, response, and time) from which you wish to create a covariance matrix and save it as a data set. The command would be:

  CORRELATION MATRIX OUT (*)
    /VARIABLES=age response time.

  MCONVERT
    /MATRIX=OUT ('c:\temp\covariance.sav').
The covariance matrix created will include the number of observations, standard deviations, means, and variable names. The data set covariance.sav will be saved in the c:\temp folder.

使用道具

板凳
ReneeBK 发表于 2014-4-5 04:44:14 |只看作者 |坛友微信交流群
For the Lower Triangular Covariance Matrix, please read the attached PDF:
Lower Triangular Covariance Matrix.pdf (404.41 KB)


使用道具

报纸
runner 发表于 2014-4-29 22:35:15 |只看作者 |坛友微信交流群
谢谢ReneeBK热心的回复。下三角的协方差是不是就是相关系数矩阵呀。

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-22 12:03