David A. Kenny

September 15, 2014

 

GAPIM-I Macro

 

This macro, called GAPIM_I, was written by David A. Kenny, Department of Psychology, University of Connecticut (please email me).  This is Version 1b, completed on September 13, 2014. This macro has been replaced by shiny app that can be accessed at GAPIM_I and a brief description is available on DyadR page.

 

Thank You!

I thank Randi Garcia who assisted on this project and provided me example data.

 

Data Preparation

The dataset needs to be in individual format: One record for each group member. There need to be at least three members per group who do not have any missing on X (the group composition variable) and Y (the outcome) and ideally there are at least 20 groups.. The current version of the program presumes that X is a dichotomy that is already effects coded (codes of +1 and -1).

 

Downloads:

GAPIM_I.sps (You need SPSS to open this and the next 3 files.)

Sample Data File

Macro Call

SPSS Output

Macro Output (You do not need SPSS to open this file.) 

 


To understand how to run a macro return to the DataToText page. The macro may take a minute or two to run and so be patient.  Also make sure to backup the raw data file, as sometimes an error in the macro can alter the data file. If using a MAC, search for "c:\gapimtext.dat" in the macro and change "c" to "Macintosh HD".  Note variables will be added to data file. 

The text file is NOT contained in the SPSS output file.  It is contained in a file called “c:\gapim_i.txt”.  Look for it there!

 

The Macro Call

 

This is the statement for the sample data:

 

       GAPIM_I    x = gender/y = gidscale /groupid = groupnum xn = 'Gender' yn = 'Group Identification'
groupn="group" upper_lab="Women" lower_lab="Men".

The defaults are as follows:

x = X

y = Outcome

groupid = group

alpha =.05

malpha = .10

upper_lab=Highs

lower_lab=Lows

oflile = c:\gapim_i.txt

directory = c:\

groupn = group

xmiss = 1

clist

 

That is, if you just say “GAPIM_I.”, the program will assume that are variables in the SPSS data file with variables named X and Outcome. The variables in the macro are as follows:

 

      x = name of the group composition variable in the SPSS dataset, assumed to be a dichotomy and effects coded

      y = name of the causal variable for the partner in the SPSS data set

      groupid = variable name of groups or team

      alpha = value used in significance testing

  malpha = value used for marginal significance

      upper_lab = label for the 1's on the X variable

      lower_lab = label for the -1's on the X variable

      ofile = name of the text file which GAPIM_I writes

      directory = where output file and temporary files are written

      nmiss

            1: delete group if one or more person has a missing value on X

            0: delete only the individual if a missing case on X

      groupn = name for groups (e.g., class or team)

      clist = name of covariates in the SPSS dataset separated by spaces

 

        GAPIM_I was written on SPSS 18 and there is no guarantee that it work on earlier or later versions of SPSS. GAPIM_I creates a dataset with all of the GAPIM-I variables (X', I, I', contrast and diversity measurs), the name of which is gapimdata.sav which is written in directory designated by the user.

 

          Check frequently for updates, as there are likely to be changes.  No guarantee for accuracy.  Almost certainly you will need to edit the DataToText output in research reports.  There will be updates.  There is no guarantee for accuracy.  Examine not only DataToText output file, but also the SPSS output file.  The user needs to carefully edit the GAPIM_I output in research reports.  Please cite this webpage if you do use it.  Moreover, you need a footnote in your paper that says: "Some of the material here was produced by the SPSS macro GAPIM_I (Kenny, 2014)." Material lifted verbatim must be in quotes to avoid plagarism.

 

       If a non-English version of SPSS is being used, GAPIM_I changes the language to English.  It does not currently change the language back to the original language.

 

Warnings

GAPIM_I provides nine possible warnings.  The user needs to pay careful attention to them.  Note that the example below produces one warning.

1.      The maximum value of the X variable is greater than one which is not ordinarily allowable.

2.      The minimum value of the X variable is less than minus one which is not ordinarily allowable.

3.      The outcome variable is a dichotomy while the analysis assumes it is not.

4.      There are one or more missing observations for the outcome, but groups containing those missing cases are still retained in the analysis.

5.      Because group sizes vary, the chi square difference tests involving diversity, contrast, and group effects are approximate.

6.      The X variable is skewed which leads to co-linearity.

7.      There is multicollinearity between the following predictors.

8.      There are less than 10 groups, probably too few for a GAPIM analysis.

9.      There are between 10 and 19 groups, probably a marginal number for a GAPIM analysis.

 

Macro Output

WARNING:  1. Because group sizes vary, the chi square difference tests involving diversity, contrast, and group effects are approximate.

 

GROUP ACTOR-PARTNER INTERDEPENDENCE MODEL

    The Group Actor-Partner Interdependence Model is estimated by this macro. The computer outputs are in the SPSS Output file. The data file with the transformed variables is located at c:\tempgapimdata.sav. The X variable in this dataset is Gender the others variable is X', the actor similarity variable is I, and the others similarity variable is I'. Also, the Xmean variable is the group mean (Norm), the Xcon variable in this dataset is X - X' (contrast), the XconI variables is I - I' (similarity contrast), and Xdiv is a measure of group diversity. The text file with a description of the results is located at c:\tempgapim_I.txt.

    The group composition variable is Gender, a dichotomy consisting of Men and Women, and the outcome variable is Group Identification. The variable Gender is presumed to affect Group Identification in fourdifferent ways: the effect of the actor's own Gender or X, the effect of other group members' Gender or X', the ffect of the similarity of the actor's Gender to the other group members' Gender or I, and the effect of the similarity of the others' Gender or I'. All of these variables are effect coded. For instance, X is coded Men = +1 and Women = -1. Any group which contains missing data on Gender is dropped from the analysis.

RESULTS  

Descriptives


    For the analysis, there are 241 persons in 52 groups. The two group sizes are 4 and 5. There are 13 all-Women groups and 2 all-Men groups. There are 154 (63.9%) Women and 87 (36.1%) Men. The means and standard deviations of Gender and Group Identification are presented in Table 1.

Complete Model


    
The effect of the actor's Gender is -.026 (p = .713). Men score .051 units lower on Group Identification than Women. The effect of the Gender of the other group members is .227 (p = .097). An actor, all of whose other group members are Men, scores .454 units higher on Group Identification than a member all of whose other members are Women. The effect of the actor's similarity to others in the group on Gender is .295 (p = .014). An actor, who is totally similar to the other group members on Gender, scores .589 units higher on Group Identification than an actor who is totally dissimilar. The effect of the others' similarity in Gender is -.210 (p = .106). In a 4-person group, a person with others who are completely homogeneous, either all Men or Women, scores .280 units lower on Group Identification than a person with 2 Men (or Women) and 1 Women (or Men) others.

    The variance due to groups is equal to .128 and the proportion of variance due to group or intraclass correlation is equal to .135. The multiple correlation explained by the four GAPIM-I fixed effects is equal to .181. The chi square test with four degrees of freedom that compares the Complete Model to the Empty Model (a model with no predictors) equals 13.283 (p = .010). Because this chi square test is statistically significant, we can conclude that one or more terms of the Complete Model is needed. The chi square test with two degrees of freedom that compares the Complete Model to the Main Effects Model equals 8.652 (p = .070). Because this chi square test is not statistically significant, we do not have evidence that the interaction effects of the Complete Model are non-zero. The sample size adjusted BIC for the Complete Model is 665.79 whereas the value for the Empty Model is 675.83. Because the index is smaller, the Complete Model is a better fitting model than the Empty Model.

The Best Fitting Model

    The best fitting model in terms of highest multiple correlation is the Interaction Contrast Model with a multiple R of .193. (The best fitting model in terms of lowest SABIC is also the Interaction Contrast Model with an SABIC of 665.224.) This implies that there is effect if the actor is different from the others in the group on Gender and the others are similar to each other on Gender. The chi square test comparing this model to the Empty Model is equal to 13.036 with 3 degrees of freedom (p = .005). The sample size adjusted BIC is equal to 665.224.

 

                Table 1: Descriptive Statistics

 

Variable                  Mean        Standard Deviation

--------------------------------------------------------

Gender                    .278             .963

Group Identification     3.910             .992

 

 

                                 Table 2: Model Estimates and Fit

 

Model                                X            X'             I            I'          SABIC           R

-----------------------------------------------------------------------------------------------------------
Empty                                 0            0               0            0          675.827         .000
Main Effects                         -.071          .234+             0            0          672.818         .105
    Actor Only                      -.062            0               0            0          675.842         .000
    Others Only                        0          .223+              0           0          673.127         .103
    Norm                           .168          .168               0           0          674.993          .061
    Contrast                        -.106+         .106+              0           0          673.562          .087
Complete                           -.026          .227+            .295*       -.210          665.788          .181
    Person Fit                       -.018          .314*            .295*          0          667.691          .157
    Diversity                         -.063         .262+            .081          .081        673.406          .079
    Contrast                         -.034         .198             .256*        -.256*         665.224          .193
Constraints on both Main Effects and Interactions
    Actor Only                       -.025            0             .222+            0        673.218          .000
    Others Only                         0          .142               0          -.202+       671.771          .085
    Norm                           .206          .206              .085           .085         675.558          .000
    Contrast                        -.070           .070             .256*         -.256*       665.972          .184

 

                     Table 3: Chi Square Tests

 

Model Tested                   Chi Square    df       p

------------------------------------------------------

EMPTY MODEL AS THE COMPARISON MODEL (significant means a better fitting model)
Main Effects                       4.630          2     .099
    Actor Only                     .796           1     .372
    Others Only                    3.511          1     .061
    Norm                        1.645          1    .200
    Contrast                      3.076          1    .079
Complete                         13.283          4    .010
    Person Fit                    10.568          3     .014
    Diversity                      4.854          3     .183
    Contrast                      13.036         3     .005
Constraints on both Main Effects and Interactions
    Actor Only                    4.230          2     .121
    Others Only                   5.677          2     .059
    Norm                        1.890          2     .389
    Contrast                    11.477           2     .003
MAIN EFFECTS MODEL AS THE COMPARISON MODEL (significant means a worse fitting model)
    Actor Only                      3.835         1     .050
    Others Only                    1.120         1     .290
    Norm                         2.985         1     .084
    Contrast                       1.555         1     .212
COMPLETE MODEL AS THE COMPARISON MODEL (significant means a worse fitting model)
    Person Fit                      2.715          1     .099
    Diversity                       8.429          1     .004
    Contrast                        .247          1     .619
Constraints on both Main Effects and Interactions
    Actor Only                    9.052           2      .011
    Others Only                   7.605           2     .022
    Norm                       11.392           2     .003
    Contrast                      1.806            2     .405
 

Return to the DataToText Page