preserve.
  set printback=on.
  
* DYADIC DATA ANALYSIS: TYPES OF VARIABLES
* VarType.sps
*
* Valentim R. Alferes (University of Coimbra, Portugal)
* March 2008.
  
* VarType.sps is an SPSS syntax file that determines the type of dyadic
* variables:
* - Between-dyads variables
* - Within-dyads variables
* - Mixed variables
* [see: Kenny et al. (2006, pp. 7-9) and/or
  *  http://davidakenny.net/dyad.htm#Top4].
  
* The syntax runs automatically from the SPSS syntax window. The only
* prerequisite for the user is to have an SPSS active file in dyadic format,
* with no missing data for the dyadic variable under analysis. In the
* beginning of the syntax the user must specify the names of the column
* variables corresponding to Member 1 and Member 2 scores.
  
* Example data: Kenny, Kashy & Cook (2006, p. 33, Table 2.1).
  data list free/dyad var1 var2.
  begin data.
1       8       6
2       5       3
3       7       2
4       8       5
5       8       7
6       5       6
7       3       4
8       8       9
9       6       7
10      2       3
end data.
  
*\beginning of the program.
  set printback=on.
  
/* User Specifications /*
  
* Replace var1 with your variable name for member 1 scores.
  compute x.1 = var1.
  
* Replace var2 with your variable name for member 2 scores.
  compute x.2 = var2.
  
  set printback=off.

 

Descriptives

Descriptive Statistics

 

 

N

Minimum

Maximum

Sum

Mean

Std. Deviation

Variance

Member 1 Scores

10

2.00

8.00

60.00

6.0000

2.21108

4.889

Member 2 Scores

10

2.00

9.00

52.00

5.2000

2.20101

4.844

Sum of Scores

10

5.00

17.00

112.00

11.2000

3.85285

14.844

Difference of Scores

10

-1.00

5.00

8.00

.8000

2.14994

4.622

Valid N (listwise)

10

 

 

 

 

 

 

 

Correlations

Correlations

 

 

 

Member 1 Scores

Member 2 Scores

Member 1 Scores

Pearson Correlation

1

.525

Sig. (2-tailed)

 

.119

Sum of Squares and Cross-products

44.000

23.000

Covariance

4.889

2.556

N

10

10

Member 2 Scores

Pearson Correlation

.525

1

Sig. (2-tailed)

.119

 

Sum of Squares and Cross-products

23.000

43.600

Covariance

2.556

4.844

N

10

10

 

Interactive Graph

Scatterplot

 

Summarize

Variable Type Test

 

 

Dyadic variable is a

1

Mixed Variable

If this test and your theoretical definition donīt agree, check your data.

 

 
*/end of the program.
  restore.
  
  
*****************************************************************************
* Reference:
*
* Kenny, D. A., Kashy, D. A., & Cook, W. L. (2006). Dyadic data analysis.
*    New York: Guilford Press.
****************************************************************************.