General Overview
All files should be stored in the directory C:\PCI
If this directory does not exist, you will need to create it.
File names should not contain any spaces.
To Calculate PCI2 in SPSS:
Download and unzip the SPSS PCI2 macro: SPSS_macro
Compile the macro that generates the PCI2
Highlight all code between
“DEFINE” (line 30)
and “!ENDDEFINE” (line 284)
Click the “Run” button
The following code generates the PCI2
SPSS command | Comment |
PCI2 infile=|’C:\PCI\Example.sav’| | Original input filename Replace “Example” with the name of your file |
outfile=|’C:\PCI\Example.CSV’| | Output filename Replace “Example” with the name of your file |
PCIOUT=|’C:\PCI\Sim_Data.sav’| | Output filename Do not change the name of this file |
WORKDIR=|C:\PCI\| | Working directory (must be C:\PCI) |
SubSample1=Sex SubSample2=??? SubSample3=??? Subsample4=??? |
Subsample(s) calculate PCI for each group (e.g., males and females in this example) Up to 4 Subsample variables can be specified. If the analysis does not have any Subsamples these lines can be eliminated |
Scale_width=7 | Scale width (e.g., 2, 3, 4, 5, 6, 7, 8, 9) This example is based on a 7-point scale Replace the 7 with the width of your scale |
var={VARIABLE NAME} | Variable to be used in PCI calculation |
Distance_function=D1 | Distance Function: D1 (or D2) for bipolar scales D1 currently recommended for bipolar D3 for unipolar scales |
Power_of_distance=|1.5 | Power: P1 = 1 = Unsquared difference scores P2 = 2 = Squared difference scores Power can be any value > 0 and < 5 |
The following files are examples of SPSS data, macro syntax, and output
File type | File name |
Data | Galapagos.sav |
Syntax | Galapagos_macro.sps |
Output | Galapagos_Frequencies_Crosstabs_output.spv |
Output | Galapagos_PCI_output.spv |
The Galapagos.zip file contains the above four files.
Down load the ZIP file and unzip the files to a directory/folder where you can run the SPSS application.
In the Galapagos example:
The SubSample1 variable is “Island” (the respondent’s island of residence).
The Island variable has 3 responses:
1 = San Cristobal
2 = Santa Cruz
3 = Isabela
The macro calculates the PCI for the “normfish” variable (Norms for illegal fishing).
Because a SubSample variable was specified, 3 actual and 3 simulated PCI values are generated;
one for each of the islands.
The scale for “normfish” is 4-point unipolar (i.e., scale_width = 4):
0 = Do nothing if the fisherman violates the rules for illegal fishing
1 = Fine the fisherman
2 = Take away the fisherman’s permit for 15 days
3 = Take away the fisherman’s permit for the rest of the year
Note: The minimum value for a unipolar scale should always be 0.
Because the scale is unipolar, the appropriate distance function is D3.
The power of distance function is currently set to 1 (i.e., Power_of_distance = 1).