Installation and Exporting
 Exporting SPSS/Mac system files to other systems
 Having SPSS write temporary data files to a nondefault location
 Installing SPSS 15
Data Management and Transforming Variables
 Creating a counter variable in SPSS 6.
 Calculating change in years in SPSS
 Dummycoded categorical variables for SPSS REGRESSION
 Selecting cases randomly with SPSS
 Producing an SPSS variable that has group mean values
 Sums of variable lists in SPSS
 Converting SPSS multivariate repeated measures data to univariate format
 Identifying variables and cases with missing data
 Converting missing values to numeric using SPSS
 Handling missing data, including running multiple imputation, in SPSS
 Scoring exam scores using SPSS
 Counting like columns in SPSS
 Transforming univariate data to multivariate data using SPSS
 Converting a string variable to a date in SPSS
Statistical Tests and Data Analysis
 Change in RSquare using SPSS for Windows
 Intraclass correlation from SPSS Windows
 Binomial probabilities using SPSS 5. Contingency tables and the test of independence in SPSS
 Tukey's test for additivity in repeated measures designs
 Repeated measures posthoc comparisons using SPSS
 SPSS univariate vs.multivariate tests of repeated measures ANOVA
 Obtaining onetailed pvalues
 Nonlinear regression (negative exponential) with SPSS
 Using SPSS LOGISTIC to create a predicted category membership variable
 Interaction contrasts in SPSS
 Testing H0: Homogenous regression slopes
 Computing ANOVAS from summary stats with SPSS
 Correlating factor loadings from separate samples using SPSS
 Intercept in SPSS MANOVA contrast
 SPSS test of homogenous regression slopes with repeated measures data
 Adjusted means from SPSS MANOVA in a repeated measures with grouping factor
 Decomposing interactions using SPSS
Output and Plots
Change in RSquare using SPSS for Windows
Question:
How can I get SPSS for Windows to print changes in Rsquare when I run a multiple regression with more than one block? I want to see the change in Rsquare when each block is added to the model.
Answer:
In the Data Editor window, select:
Analyze
Regression
Linear...
In the Linear Regression dialog box, click Statistics.
Check R squared change.
Click Continue.
The output will provide a table containing the Rsquared values, Rsquared change values, and the significance levels of the Rsquared change values for each model.
Intraclass correlation from SPSS
Question:
How can I compute the Intraclass correlation using SPSS? Which type of ICC should I choose for my study?
Answer:
In the Data Editor window, select:
Analyze
Scale
Reliability Analysis...
Click Statistics.
Check the Intraclass correlation coefficient box. Select the type of model (twoway mixed, twoway random, oneway random) and type of index (consistency or absolute agreement).
David Nichols, Senior Statistician at SPSS, Inc., has written a brief article which details the available intraclass correlation options in the RELIABILITY procedure. The article also provides guidance on how to choose an appropriate intraclass correlation statistic and how to interpret the SPSS RELIABILITY intraclass correlation output.
CHOOSING AN INTRACLASS CORRELATION COEFFICIENT
David P. Nichols
Principal Support Statistician and
Manager of Statistical Support
SPSS Inc.
From SPSS Keywords, Number 67, 1998
Beginning with Release 8.0, the SPSS RELIABILITY procedure offers an extensive set of options for estimation of intraclass correlation coefficients (ICCs). Though ICCs have applications in multiple contexts, their implementation in RELIABILITY is oriented toward the estimation of interrater reliability. The purpose of this article is to provide guidance in choosing among the various available ICCs (which are all discussed in McGraw & Wong, 1996). To request any of the available ICCs via the dialog boxes, specify Statistics>Scale>Reliability, click on the Statistics button, and check the Intraclass correlation coefficient checkbox.
In all situations to be considered, the structure of the data is as N cases or rows, which are the objects being measured, and k variables or columns, which denote the different measurements of the cases or objects. The cases or objects are assumed to be a random sample from a larger population, and the ICC estimates are based on mean squares obtained by applying analysis of variance (ANOVA) models to these data.
The first decision that must be made in order to select an appropriate ICC is whether the data are to be treated via a one way or a two way ANOVA model. In all situations, one systematic source of variance is associated with differences among objects measured. This object (or often, "person") factor is always treated as a random factor in the ANOVA model. The interpretation of the ICCs is as the proportion of relevant variance that is associated with differences among measured objects or persons. What variance is considered relevant depends on the particular model and definition of agreement used.
Suppose that the k ratings for each of the N persons have been produced by a subset of j k raters, so that there is no way to associate each of the k variables with a particular rater. In this situation the one way random effects model is used, with each person representing a level of the random person factor. There is then no way to disentangle variability due to specific raters, interactions of raters with persons, and measurement error. All of these potential sources of variability are combined in the within person variability, which is effectively treated as error.
If there are exactly k raters who each rate all N persons, variability among the raters is generally treated as a second source of systematic variability. Raters or measures then becomes the second factor in a two way ANOVA model. If the k raters are a random sample from a larger population, the rater factor is considered random, and the two way random effects model is used. Otherwise, the rater factor is treated as a fixed factor, resulting in a two way mixed model. In the mixed model, inferences are confined to the particular set of raters used in the measurement process.
In the dialog boxes, when the Intraclass correlation coefficient checkbox is checked, a dropdown list is enabled that allows you to specify the appropriate model. If nothing further is specified, the default is the two way mixed model. If either of the two way models is selected, a second dropdown list is enabled, offering the option of defining agreement in terms of consistency or in terms of absolute agreement (if the one way model is selected, only measures of absolute agreement are available, as consistency measures are not defined). The default for two way models is to produce measures of consistency.
The difference between consistency and absolute agreement measures is defined in terms of how the systematic variability due to raters or measures is treated. If that variability is considered irrelevant, it is not included in the denominator of the estimated ICCs, and measures of consistency are produced. If systematic differences among levels of ratings are considered relevant, rater variability contributes to the denominators of the ICC estimates, and measures of absolute agreement are produced.
The dialog boxes thus offer five different combinations of options: 1) one way random model with measures of absolute agreement; 2) two way random model with measures of consistency; 3) two way random model with measures of absolute agreement; 4) two way mixed model with measures of consistency; 5) two way mixed model with measures of absolute agreement. In addition, you can specify a coverage level for confidence intervals on the ICC estimates, and a test value for testing the null hypothesis that the population ICC is a given value.
Each of the five possible sets of output includes two different ICC estimates: one for the reliability of a single rating, and one for the reliability for the mean or sum of k ratings. The appropriate measure to use depends on whether you plan to rely on a single rating or a combination of k ratings. Combining multiple ratings of course generally produces more reliable measurements.
Note that the numerical values produced for the two way models are identical for random and mixed models. However, the interpretations under the two models are different, as are the assumptions. Since treating the data matrix as a two way design leaves only one case per cell, there is no way to disentangle potential interactions among raters and persons from errors of measurement. The practical implications of this are that when raters are treated as fixed in the mixed model, the ICC estimates (for either consistency or absolute agreement) for the combination of k ratings require the assumption of no rater by person interactions. The estimates for the reliability of a single rating under the mixed model and all estimates under the random model are the same regardless of whether interactions are assumed. See McGraw & Wong for a discussion of the assumptions and interpretations of the estimates under the various models.
As a final note, though the ICCs are defined in terms of proportions of variance, it is possible for empirical estimates to be negative (the estimates all have upper bounds of 1, but no lower bounds). In the next issue, we will discuss the problem of negative reliability estimates.
Reference:
McGraw, K. O., & Wong, S. P. (1996). Forming inferences about some intraclass correlation coefficients.Psychological Methods, Vol. 1, No. 1, 3046 (Correction, Vol. 1, No. 4, 390).
Creating a counter variable in SPSS
Question:
How do I create a count variable in SPSS that reflects the order of the subjects in my raw data file?
Answer:
In the Data Editor window, select:
TransformCompute Variable...
Type in the Target Variable name, e.g. seq.
In the Function group box, select Miscellaneous.
In the Functions and Special Variables box, select $Casenum and click the up arrow to put $Casenum in the Numeric Expression box.
Click OK.
The new variable seq will appear in the data editor window. The variable seq is assigned an integer value, starting at 1 for the first case, and increasing by one for each subsequent case.
Binomial probabilities using SPSS
Question:
How do I calculate the probablity that my sample was drawn from a binomial population with a certain probability value p, in SPSS?
Answer:
In the Data Editor window, select:
AnalyzeNonparametric Tests
Binomial...
Select the variable you want to test and click the arrow to move the variable into the Test Variable List box.
Type the probability value, p, in the Test Proportion box.
Click OK.
Contingency tables and the test of independence in SPSS
Question:
How do I create a contingency table (where the rows and columns are finite categorical variables and the cells are frequency counts) and test an hypothesis of row and column independence in SPSS?
Answer:
In the Data Editor window, select:
AnalyzeDescriptive Statistics
Crosstabs...
Select the row and column variables.
Click the Statistics box and check the Chisquare box.
Click Continue and then OK.
The output will show a contingency table and a table with the Pearson Chisquare test statistic and associated pvalue.
CROSSTABS will only perform independence tests for two variables. Procedures to model more than two categorical variables include LOGLINEAR and HILOGLINEAR.
Calculating change in years in SPSS
Question:
Using SPSS, how do I calculate the age of my observations in years relative to a birth date and an observation date for each subject? Currently I have my date data in separate variables representing day, month, and year.
Answer:
In the Data Editor window, select:
TransformCompute Variable…
Type in the Target Variable name, e.g. birthdate.
In the Function group box, select Date Extraction.
In the Functions and Special Variables box, select Yrmoda and click the up arrow to put Yrmoda in the Numeric Expression box.
Replace the first question mark with the birth year variable by selecting the birth year variable and clicking the arrow. Replace the second question mark with the birth month variable. Replace the third question mark with the birth day variable.
The dialog box should look like this:
Click OK.
The new variable birthdate will appear in the data editor window. The values will be numeric, representing the number of days since October 14, 1582 (day 0 of the Gregorian calendar).
Repeat the above steps to compute the observation date, e.g. obsdate, as shown in the dialog box below.
To compute age, select:
Compute Variable…
Type in the Target Variable name, e.g., age.
Enter TRUNC ((obsdatebirthdate)/365.25) in the Numeric Expressions box. This will give the age in years, with the decimal portion truncated; that is, the age will not be rounded up.
The following dialog box shows the steps necessary to compute age:
Your data editor window will now look like this:
If age is desired with decimals or rounded up, omit the TRUNC command. The decimal portion of the number can be deleted with formatting; in the Variable View window, set the Decimals column to 0. The following dialog boxes illustrate this procedure:
If you want to compute the difference between the birth date and today's date (as defined by your computer's internal clock), you can use the special SPSS $JDATE variable in place of the obsdate variable in the computation of age. An example of this is shown below:
If birthdate and observation date are coded as one variable each, in date format, age can be computed by the following steps. From the data editor window, select:
Compute Variable…
Type in the Target Variable name, e.g. age.
In the Function group box, select Date Arithmetic.
In the Functions and Special Variables box, select Datediff and click the up arrow to put Datediff in the Numeric Expression box.
Replace the first question mark with the observation date variable by selecting the observation date variable and clicking the arrow. Replace the second question mark with the birthdate variable. Replace the third question mark with "years", making sure to include the quotation marks.
The dialog box should look like this:
Click OK.
This will return the age in years, not rounded up, as depicted below:
Exporting SPSS/Mac system files to other systems
Question:
I have data in a SPSS spreadsheet on my Macintosh. I want to transfer it to SPSS on another system, such as Windows, UNIX, or VMS. How can I do this?
Answer:
This process involves multiple steps: (1) Save the SPSS data as a SPSS portable file on the originating computer system, (2) send the file from the originating computer system to the destination computer system using FTP, and (3) save the SPSS portable file's data as a SPSS dataset on the destination computer.
These steps are similar for all types of SPSS data file transfers. For instance, the transfer process is very similar for moving SPSS datasets from UNIX to MS Windows and Macintosh to Windows, except for step 1(a), which is only necessary when you transfer SPSS data from an Apple Macintosh computer to a PC, VMS, or UNIX system.
1. Save your SPSS dataset as a SPSS portable file
SPSS portable data files may be read by SPSS on any type of computer system. You save your data as a SPSS portable file by using the following SPSS syntax:
EXPORT OUTFILE='file name'.
where file name refers to the portable data file's name. For example, on an Apple Macintosh system the file name might be: "Macintosh HD:Desktop Folder:myfile.spsspff".
If you are using the SPSS menu interface locate the FILE menu and choose SAVE AS... In the SAVE AS window which appears, choose SPSS PORTABLE DATA under the SAVE AS TYPE selection area. Be sure to change the name of the data file (as shown in the SAVE DATA AS: box) before you click the SAVE button. Now click the SAVE button. You have now saved your SPSS data as a SPSS portable data file under a new file name.
1(a). Convert the file to make it textreadable.
NOTE: This step is only necessary if you are transferring SPSS data files from an Apple Macintosh computer to another system.
Although your newly created portable file is written in ASCII text format, many file transfer programs such as FETCH do not recognize the file format as text. Instead, they insist on treating the file format as binary. This can be a serious problem, since SPSS on Windows, UNIX, and VMS expects the portable file to be in text format.
Fortunately, a work around remedy to this problem exists. First, close SPSS/Mac. Now open your favorite wordprocessor (e.g., Microsoft Word). Once the word processor has opened, use the OPEN selection under the FILE menu to open the SPSS portable data file. You may receive a message at this point that says something like, "Convert from text only format?". You should answer "Yes" or "OK" to this message. If you have a choice of formats to use in opening the file, always choose TEXT ONLY (the type of message you receive and the conversion choices available to you may vary among different word processing programs).
Once the SPSS portable data file is open, immediately choose SAVE from the FILE menu and resave the document. Under no circumstances should you type in or otherwise alter the file's contents. Doing so will render the file worthless. Once you have saved the file with the word processor, quit the word processor.
2. Transfer the file to the other computer
Your next step is to transfer the SPSS portable data file to the destination computer. Typically this is done using FETCH or a similar FTP (file transfer) program, although you may use a memory stick. Be sure to transfer the file as TEXT or ASCII if your FTP program allows you to choose the file format for the transfer. If you need help using FETCH or a similar FTP program, contact the ITS Helpdesk at 4759400.
3. Read the file on the destination computer
Once you have transferred your portable data file successfully, your next task is to read it into SPSS on your destination computer.
If you wish to use SPSS syntax to read the portable data file, you may use the following SPSS syntax:
IMPORT FILE='file name'.
SAVE OUTFILE='saved SPSS data file name'.
where file name refers to the portable data file's name. For example, on a MS Windows system the file name might be: "C:\Windows\Desktop\myfile.spsspff". By contrast, saved SPSS data file name refers to your newlysaved SPSS data file.
If you are using the SPSS menu system, choose OPEN from the FILE menu, and then select DATA ... This action puts you into the OPEN DATA FILE window.
Locate the directory where you received the portable data file via FTP. If you are using a memory stick to transfer the file instead of FTP, locate the appropriate drive at this time.
Next, change the string of text in the FILE NAME box (usually this is *.sav) to *.* , which will allow you to see all files in the current working directory. In the FILE TYPE box, select SPSS PORTABLE. Locate the portable data file's name from the list of available files in the current working directory. Click once on the proper file to highlight it. Now click the OK button. SPSS should open the portable data file. Once the portable data file is opened and you confirm by inspection that the data transferred correctly, you can save the data file as a SPSS system file by choosing the SAVE DATA option from the FILE menu.
Tukey's test for additivity in repeated measures designs
Question:
How do I get Tukey's test for additivity in SPSS?
Answer:
In the Data Editor window, select:
AnalyzeScale
Reliability Analysis...
Select the variables to be tested and move them into the Items box.
Click Statistics.
Check the Tukey's test of additivity box.
Check Continue.
Check OK.
The output will include the test of additivity in the ANOVA table.
Formatting SPSS FACTOR output
Question:
I'm using the SPSS software to run some factor analysis and principal components jobs. Is there any way to improve the interpretability of the output?
Answer:
In the Factor Analysis dialog box, click Options.
Under the heading Coefficient Display Format, check Sorted by size and Suppress absolute values less than and select the minimum factor loading value you want displayed in the component matrix tables. The default minimum factor loading is 0.10.
The formatting options will order the variables in the matrices by descending values and will leave blank any entry with an absolute value less than the specified value.
Dummycoded categorical variables for SPSS REGRESSION
Question:
How do I use categorical variables in SPSS REGRESSION?
Answer:
Since the values of a categorical variable do not convey numeric information, such a variable should not be used in a regression model. Instead, each value of the categorical variable can be represented in the model with an indicator variable. An indicator (or dummy) variable contains only the values 1 and 0, with a value of 1 indicating that the associated observation has the given categorical value.
For example, let the variable LANG take on three levels (British, French, and German) that were originally coded as 1, 2, or 3 (respectively). To include this categorical variable in a regression model, create an indicator variable for each type of LANG. In SPSS, you must first create the three new variables and give them a value.
In the Data Editor window, select:
TransformRecode into Different Variables...
Select LANG and click the arrow to move it into the Input Variable > Output Variable box.
Type the name of the dummy variable, e.g. BRITISH, in the Output Variable Name box.
These steps will produce the following dialog box:
Click Old and New Values…
Under Old Value, in the Value box, enter 1.
Under New Value, in the Value box, enter 1.
Your dialog box will look like the following:
Click Add to put this command in the Old > New box.
(Note: if LANG has missing values, check System or usermissing under Old Value and check Systemmissing under New Value. This will retain missing values as missing instead of recoding them as "0".)
After any missing values have been recoded as missing, click All other values under Old Value.
Under New Value, enter 0 in the Value box.
These commands produce the dialog box shown below:
Click Add. Now, you will see:
Click Continue.
Click Change.
Click OK.
This creates a dummy variable, BRITISH, with values of 1 if LANG = 1 and values of 0 otherwise.
Click the Reset button to reset all commands in the Recode into Different Variables dialog box.
Then, repeat the above steps to create the other dummy variables, FRENCH and GERMAN.
FRENCH should have values of 1 when LANG = 2 and values of 0 otherwise, as shown below:
GERMAN should have values of 1 when LANG = 3 and values of 0 otherwise, as seen in the following dialog box:
The new variables BRITISH, FRENCH, and GERMAN will appear at the end of the dataset, as illustrated below:
Checking the dummy variables against the original variable will ensure the data manipulations worked correctly. You can either randomly check several cases or use the following method to create twoway tables for the variables:
In the Data Editor window, select:
AnalyzeDescriptive Statistics
Crosstabs...
Put LANG in the Rows box and the three dummy variables in the Columns box. This will produce the following dialog box:
Click OK.
This will output three tables, one for each dummy variable, showing the values of LANG associated with the values of each dummy variable.
Any two of the three new variables may be included in the regression model. It doesn't matter which two  once you know who is in any two of the three groups, you know who is in the third. The omitted category is the reference category; for example, if GERMAN is left out of the model, the beta coefficients of the other two dummy variables will be interpreted in comparison to those subjects in the GERMAN category. One of the dummy variables MUST be omitted from the regression model, or the beta coefficients cannot be mathematically computed.
The total sum of squares for the set of indicator variables will be constant, regardless of which set of dummy variables entered. However, the individual parameter estimates will differ, depending on which subset is used.
The method described above is called dummy, or binary, coding. This is the most common method of coding categorical independent variables in regression. Dummy coding makes comparisons in relation to the omitted reference category. Alternative methods of coding categorical independent variables in regression include contrast coding and effects coding. Contrast coding makes userspecified comparisons between clusters of groups. Effect coding makes comparisons to the grand mean of all the groups. For information on these topics, see the following reference: Hardy, M. A. (1993). Regression with dummy variables. Sage University Paper series on Quantitative Applications in the Social Sciences, 07093. Newbury Park , CA: Sage.
Repeated measures posthoc comparisons using SPSS
Question:
Will SPSS calculate posthoc analyses for withinsubjects factors?
Answer:
Yes, under the Options menu.
From the Data Editor window, select:
AnalyzeGeneral Linear Model
Repeated Measures...
Label the withinsubject variable and input the number of levels. Click Add:
Click Define, and the Repeated Measures dialog box will appear. In the image below, two of the withinsubjects variables have already been added:
Select the withinsubjects and betweensubjects factors; the resulting dialog box will look as follows:
Click the Options button. In the dialog box provided, under Estimated Marginal Means, select the withinsubjects factor and put it in the Display Means for: box. Check Compare main effects and select the desired adjustment in the dropdown menu labeled Confidence interval adjustment. The LSD adjustment is equivalent to no adjustment; the Bonferroni adjustment tends to be more conservative than the Sidak adjustment. The following dialog box shows these options:
The Estimated Marginal Means section of the output contains a table listing pairwise comparisons of the factors selected in the Options dialog box. These comparisons are valid even if the sphericity assumption is not met, since the sphericity assumption applies only to comparisons involving more than two levels. Since the estimated marginal means tests compare only two levels, the sphericity assumption does not apply to these comparisons.
Selecting cases randomly with SPSS
Question:
I need to select exactly 12 random cases from each of three groups. These 36 cases need to be combined with another group of 12 cases to form one large SPSS file. How can I do this?
Answer:
Suppose your dataset has a numeric variable named group that specifies the group of each case. In this example, there are three groups, so group = 1, 2, or 3. First, you need to create three new datasets, one for each group.
From the Data Editor window, select:
DataSelect Cases...
Check If condition is satisfied. Click the If button. This will generate the following dialog box:
Select group and click it into the empty box. Next, enter “=1”. The dialog box should look like this:
Click Continue. This will send you back to the Select Cases dialog box.
Under Output, check Copy selected cases to a new dataset. Type in the dataset name, e.g. group1, as shown below:
Click OK.
This will produce a dataset named group1 that contains only the data from group 1.
Repeat the above steps for groups 2 and 3. Make sure to change the name of the output dataset to reflect the group number, e.g. group2 and group3.
You will now have three new reduced datasets: group1, group2, and group3. Each dataset contains only those observations from group 1, group 2, and group 3, respectively.
Next, you will create three more reduced datasets, one for each group, containing only twelve randomly selected cases from that group.
Select the dataset, group1, as the active dataset. From the Data Editor window, select:
DataSelect Cases...
Check Random sample of cases and click the Sample… button.
Click Exactly and specify the number of cases to be randomly selected (in this example, 12) and the total number of cases in group 1 (in this example, n=20). See below:
Click Continue.
As before, you will output these selected cases to a new dataset, e.g. randomsamp1.
Under Output, check Copy selected cases to a new dataset.
Type in the dataset name, e.g. randomsamp1. See the example below:
Click OK.
The new dataset should contain only twelve observations from the dataset group1.
Repeat these steps to create new datasets for twelve randomly selected cases from datasets group2 and group3.
Next, you will merge the three randomly selected datasets. Select randomsamp1 as your active dataset. From the Data Editor window, select:
DataMerge Files
Add cases...
Click An open dataset and select the dataset containing twelve random cases from group 2, e.g. randomsamp2, from the pulldown list, as illustrated below:
Click Continue. You will see the following dialog box:
Variables listed in the Unpaired Variables box will not be included in the new, merged dataset. Variables listed under Variables in New Active Dataset will be included in the merged dataset. You can move variables between these boxes to select or deselect them. All variables contained in both datasets will automatically be placed under Variables in New Active Dataset.
Once the variable are in the correct boxes, click OK.
This will concatenate randomsamp2 with randomsamp1. The dataset randomsamp1 will now have 24 observations, twelve from group 1 and twelve from group 2.
Repeat these steps to include the random sample from group 3.
Randomsamp1 will now have 36 observations, equally divided between the three groups.
Next, perform the same data merge as before but with the fourth, external dataset.
Now, you should have one dataset with 48 observations, twelve from each of the three groups and twelve from the fourth external dataset. This is your final merged SPSS dataset.
For further help with any of these commands, press the Help button in the dialog box where further assistance is required. This will bring up a Help window explaining the commands and options available in that dialog box.
Producing an SPSS variable that has group mean values
Question:
How do I get the means for different groups of subjects and combine these values with the original data in an SPSS system file?
Answer:
Suppose your dataset has a variable, group, that contains the group number for each case and that you want to compute the mean of the variable v1 for each group.
From the Data Editor, select:
DataAggregate...
Select group and enter it into the Break Variables box.
Select v1 and enter it into the Aggregated Variables box.
Make sure the function specified in the Summaries of Variables box is the mean of the variable.
Make sure the default option of Add aggregated variables to active dataset is checked.
The dialog box should look like this:
Click OK.
This will add the variable, v1_mean, to the dataset. Each case will have the mean of its group contained in v1_mean, as illustrated below:
Sums of variable lists in SPSS
Question:
I have multiple scale items, named item1 through item52, and I want to add them all up without specifying each variable name, using SPSS.
Answer:
Using the SUM command with the keyword TO allows you to add variables across cases without entering each variable individually. However, the variables being summed must be listed consecutively in the dataset.
For example, suppose the variables to be added were listed in the following order: item1, item2, item4, item3. Summing “item1 TO item4” would leave out item3, since it comes after item4 in the dataset. Summing “item1 TO item3” would add all of the variables. If another variable, such as age, were included between item1 and item3 (item1, age, item2, item4, item3), age would be included in the sum, because it is between the first and last item to be summed.
In the following example, the variables item1, item2, item3, and item4 will be added and the sum put into a new variable called sum. The same method will work no matter how many variables are to be added.
From the Data Editor, select:
TransformCompute Variable...
Type sum in the Target Variable box.
Under Function group, click Statistical.
Under Functions and Special Variables, click Sum. Then, click the up arrow to send Sum to the Numeric Expression box.
Inside the parentheses, enter the first item to be summed, type TO, then enter the last item to be summed.
The dialog box should resemble the following:
Click OK.
These commands add the variable sum to the end of the dataset, as shown below:
Using the method above, any missing values will be treated as “0”, so the sums will be low for any cases including missing values. If you want sum to be missing when missing values are used in its computation, you must use the command SUM.n, where “n” is the number of nonmissing values required to return a nonmissing value of sum.
In this example, the command SUM.4 will return a nonmissing value for sum only if all four variables being added contain nonmissing values. For any case with missing values, sum will be missing. Use the SUM.n command as shown below:
The resulting dataset will look like this:
SPSS univariate vs. multivariate tests of repeated measures ANOVA
Question:
I am running a repeated measures analysis of covariance using SPSS. I notice that the univariate Fs are VERY different from the multivariate Fs. What gives?
Answer:
If you are doing a repeated measures analysis of covariance with more than two levels of the repeated measure factor, then the multivariate approach can be inappropriate. This will be the case if the covariates are measured repeatedly, (that is, along with the measurement of each repeated factor level, the covariate is remeasured). The only appropriate output is from the univariate tests, which are labeled "AVERAGED tests of significance". (SPSS will print the multivariate tests, but they are not appropriate.) If the sphericity assumption is violated, then you should use one of the estimated Epsilon values provided with the sphericity test to adjust your degrees of freedom and thus your significance level.
The multivariate approach is inappropriate because it partials each of the covariates from the entire set of dependent variables. The appropriate approach, which produces the "AVERAGED" tests, is to partial variance on the basis of dependentvariable/covariate matched pairs.
Obtaining onetailed pvalues
Question:
I've run a statistical test in SPSS and it gave me a twotailed significance value. How do I convert that into a onetailed significance value?
Answer:
If the difference between your group means is consistent with your alternative hypothesis, then the onetailed pvalue can be obtained by dividing the printed twotailed pvalue by 2. If the sample difference is not consistent with your alternative hypothesis, then the onetailed p value is obtained by dividing the printed twotailed pvalue by 2 and subtracting this value from 1.
Nonlinear regression (negative exponential) with SPSS
Question:
I need to test whether my data fit a negative exponential curve (nonlinear regression) using SPSS. How can I do this?
Answer:
If you think that one variable is related to another via a curve that estimates a negative exponential, you can test this model using linear regression or nonlinear regression.
Linear Regression Method:
Suppose the two variables are x and y. First, create a new variable called x_negexp by performing the following steps:
From the Data Editor window, select:
TransformCompute Variable...
Under Target Variable, type the name of the transformed variable, e.g. x_negexp.
Under Numeric Expression, enter the desired transformation; in this example, the transformation is exp(x).
Run a stepwise regression with the first model including x as the only independent variable and the second model including both x and the transformed x, as illustrated below:
From the Data Editor window, select:
AnalyzeRegression
Linear...
Enter the dependent variable.
Select x as the independent variable.
Click Next; this will change the Block number to Block 2 of 2. Enter x and x_negexp as the independent variables:
Click Statistics. Check R squared change:
Click Continue.
Click OK.
If the change in Rsquare is significant for model 2, i.e. the model containing x and x_negexp, the distribution fits a negative exponential curve. The significance value for the change in Rsquare is located in the column titled “Sig. F Change”.
Nonlinear Regression Method:
Another option is to run a nonlinear regression. The model in this example is y = b1 + b2*exp(b3*x), where hypothesized parameter values are b1 = 0, b2 = 1, and b3 = 1. To analyze the data using nonlinear regression, follow the steps outlined below:
From the Data Editor window, select:
AnalyzeRegression
Nonlinear...
Enter the dependent variable.
Under Model Expression, enter the proposed model, in this case b1 + b2*exp(b3*x).
Click Parameters. You must specify a starting value for each parameter in the model.
Under Name, type the name of the first parameter, b1.
Under starting value, enter the hypothesized parameter value; in this case, 0.
Click Add.
Now enter b2 and its starting value; in this example, 1. Click Add.
Enter b3 and its starting value of 1. Click Add.
Click Continue. The dialog box will look like:
Click OK.
The output provides confidence intervals for the parameter estimates and an ANOVA table with the R squared value.
Model fit can be assessed as in OLS regression by saving the residuals and predicted values of the regression model. In the Nonlinear Regression dialog box, click Save. Then, check Predicted Values and Residuals. A scatterplot of the predicted values vs. the residuals can show if the residuals are randomly scattered around 0.
Converting SPSS multivariate repeated measures data to univariate format
Question:
I've run a repeated measures ANOVA using SPSS. My dataset has a single betweensubjects grouping factor with two levels and I have four dependent variables that comprise my repeated measures effect. For followup analyses, I need to rearrange my dataset so that there is a single dependent variable column and then a second column that refers to the measurement occasion of the dependent variable (e.g., 1, 2, 3, or 4). What's the best way for me to rearrange my dataset using SPSS?
Answer:
There are a number of ways you can have SPSS transform your data from multivariate to univariate form. Below are two examples of how to use SPSS to restructure your data. The first is an approach recommended by SPSS, Inc. Technical Support for versions of SPSS prior to v11.0. The second example demonstrates how to use the RESTRUCTURE WIZARD utility that is new to SPSS v11.0 and up.
Example 1
This example presumes that you have one withinsubjects factor, b, with four levels (b1, b2, b3, and b4), and one betweensubjects factor, a.
DATA LIST FREE
/a b1 to b4.
BEGIN DATA
1 3 4 7 7
1 6 5 8 8
1 3 4 7 9
1 3 3 6 8
2 1 2 5 10
2 2 3 6 10
2 2 4 5 9
2 2 3 6 11
END DATA.
VECTOR b=b1 TO b4.
LOOP numb=1 TO 4.
COMPUTE newb=b(numb).
XSAVE OUTFILE'test'
/KEEP a numb newb.
END LOOP.
EXE.
GET FILE = 'test'.
LIST.
The SPSS syntax shown above creates a single dependent variable, newb; it also creates a numeric variable that indicates the measurement occasion of the dependent variable, numb; and it retains the correct group specification, a.
After one has converted an SPSS data file from multivariate (i.e., multiple variable) to univariate (i.e., multiple record), it is important to check your work. As can be seen in the first four rows in the abridged output below (where a = 1, and numb = 14), newb = 3.00, 4.00, 7.00, and 7.00. Comparing this to the first row of data in the original syntax, (where a=1), b1=3, b2=4, b3=7, b4=7 confirms agreement. Thus, it is safe to assume that NUMB has correctly indexed the four repeated measures, and created multiple records for these measures.
A NUMB NEWB
1.00 1.00 3.00
1.00 2.00 4.00
1.00 3.00 7.00
1.00 4.00 7.00
1.00 1.00 6.00
1.00 2.00 5.00
1.00 3.00 8.00
1.00 4.00 8.00
1.00 1.00 3.00
1.00 2.00 4.00
1.00 3.00 7.00
1.00 4.00 9.00
1.00 1.00 3.00
1.00 2.00 3.00
1.00 3.00 6.00
1.00 4.00 8.00
Example 2: The Data Restructure Wizard
For SPSS version 11 and up, you can use the Data Restructure Wizard to accomplish the same task. From the menu bar in the Data Editor window of SPSS, choose the following menu options:
DataRestructure
If you have not saved the multivariate dataset that is currently open in the data editor window, a dialogue box will appear asking you whether or not you wish to save the data. Click the Yes button, enter a file name for the dataset, and click Save. This dialog box will not appear if you have already saved the initial data set. After you have named the initial dataset, a screen will appear in which you want to check the Restructure selected variables into cases radio button. This choice allows for a multivariable to multirecord transformation. Click Next.
The next step, step 2 of 7 in the Data Restructure Wizard:
The correct choice in this dialogue box is contingent on how many groups of repeated measures you have. For example, let's say you are conducting a drug efficacy experimental design where all participants receive two different drugs at 4 time periods, respectively. Here you would have two repeated measures, type of drug, with two levels (A or B) and time, with four levels (14).Your data might look like this:
There are eight variables, one for each combination of type of drug and time. For example, drug1a represents the effect of Drug A at Time 1. To convert this data to univariate format, you would choose the More than one (for example, w1 ,w2, w3 and h1, h2, h3) radio button. However, for the current example, we will be using the data from the first example, which has only one repeated measure, b, with four levels, b1, b2, b3, and b4. Thus, the correct choice is One (for example, w1, w2, and w3). After checking this selection, click on the button.
Step 3 of 7 in the Data Restructure Wizard is where you must specify your betweensubjects group (e.g., the variable a), as well as the four withinsubjects dependent variables, b1 through b4. First go to the Case Group Identification box and select the option Use selected variable to specify your between subjects variable a. Highlight a in the Variables in the Current File box and click the right arrow next to the Variable box.
Second, place b1, b2, b3, and b4 into the Target variable box by highlighting them and then clicking the right arrow in the Variables to be Transposed field. This designates the repeatedmeasures withinsubject factors. It is also advisable to rename the Target variable, or the name of your withinsubjects variable. In this case, to be consistent with example 1, the target variable has been renamed from trans1 to newb. Click Next.
Step 4 of 7 identifies how many variables you wish to create. Because there is only one withinsubjects factor, the correct choice is One. Select One and click Next.
Step 5 of 7 identifies the variable to be created that indexes the order of b1, b2, b3, and b4. We will use the Sequential Numbers option. In the first example, this variable was named NUMB, for the number of b. If desired, you can rename and label the variable, index1. Click Next.
Step 6 of 7 allows you to drop certain variables and/or exclude variables with missing data. For now, however, you can click on the Finish button to create the transformed dataset that was named test in Example 1. The results should be identical to the abridged version created in the first example.
To save the restructured dataset, select Save As from the File menu and enter the desired name for the dataset.
Save As
This is analogous to the XSAVE OUTFILE'test' portion of SPSS syntax in the first example, where the name test was given to the transformed dataset.
Identifying variables and cases with missing data
Question:
I would like to be able to identify and print out my missing values in my data file. I'm using SPSS. Can you help me?
Answer:
You can select the cases that have missing values and output them to a new dataset, using the command MISSING. The MISSING(variable) command returns a 1, or true, for observations with a missing value for the specified variable; it returns a 0, or false, for nonmissing values.
The dataset in the following example has three variables (var1, var2, and var3) and one identification variable, id. Every case with a missing value for at least one of the variables will be output to the new dataset.
From the Data Editor window, select:
DataSelect cases...
Check If condition is satisfied and click the If… button.
Under Functions, click MISSING(variable) and click the up arrow to put it into the empty box.
Select the first variable as the argument of MISSING by either highlighting the variable and clicking the arrow or typing the variable name in the () after MISSING.
Type OR after MISSING(var1).
Continue to enter MISSING(variable name) OR until all of the variables have been entered.
The dialog box should look like this:
Click Continue. This will take you back to the Select Cases dialog box.
Under Output, check Copy selected cases to a new dataset. Type the name of the new dataset next to Dataset name, as shown below:
Click OK.
The new dataset, missval, will contain only those cases with at least one missing value.
Converting missing values to numeric using SPSS
Question:
I anticipate collecting survey data where I will need to convert missing values to numeric values, as well as perform the inverse operation: translating numeric values into missing values. I'm using SPSS. How can I do this?
Answer:
Coding a number into "missing":
There are two ways you can do this. One method will recode the numeric value as usermissing; this means the numeric value will remain in the dataset but will be treated as a missing value in computations. The other method will recode the number as systemmissing, which means the number will be replaced with a “.”, the systemmissing value, and will be treated as missing in all computations.
To recode the numeric value as usermissing, click on the Variable View tab in the Data Editor.
Click on the Missing cell for the variable you want to change. A small gray box will appear at the righthand side of the cell:
Clicking on this box will produce a Missing Values dialog box.
Note that you can code up to three values as missing or code a range of values plus one extra value as missing. In this example, the value of "3" is recoded as missing:
Click OK.
This tells SPSS that for this variable, a value of “3” should be treated as missing.
You can label the recoded numeric value as “usermissing” if desired, as outlined below.
In the Variable View window, click on the Values cell of the variable you are recoding. A small gray box will appear at the righthand side of the cell.
Clicking on this gray box will bring up the Value Labels dialog box.
Enter the usermissing value and label, as illustrated below:
In tables showing missing values, the label will appear instead of the numeric value.
To recode the numeric value as systemmissing, use the following procedure:
From the Data Editor window, select:
TransformRecode into Different Variables...
Select the variable to be changed and move it into the Input Variable > Output Variable box.
Click the Old and New Values… button.
Under Old Value, select Value and enter the numeric value that represents missing; in this example, enter “3”. Note that you can also code a range of values as missing by checking one of the three "Range" options.
Under New Value, select Systemmissing.
Click Add.
This will give you the following dialog box:
Under Old Value, check All other values.
Under New Value, check Copy old values.
Click Add, which will produce the following dialog box:
Click Continue. This will take you back to the Recode into Different Variables box.
Under Output Variable, give your new variable a name, e.g. var1recode, as illustrated below:
Click Change.
Click OK.
The new variable can be checked against the old one to make sure the operation was accurate:
Coding missing values into a number:
To recode missing values as “3”, the procedure is the same as above but with different old and new values.
From the Data Editor window, select:
TransformRecode into Different Variables...
Select the variable to be changed and move it into the Input Variable > Output Variable box.
Click the Old and New Values… button.
Under Old Value, select System or usermissing.
Under New Value, select Value and enter “3”, as illustrated below:
Click Add.
Under Old Value, select All other values.
Under New Value, select Copy old values.
Click Add, which will produce the following dialog box:
Click Continue. This will take you back to the Recode into Different Variables box.
Under Output Variable, give your new variable a name, e.g. var1recode, as illustrated below:
Click Change.
Click OK.
Check the data to ensure the accuracy of the commands.
You can recode into the same variable using Transform > Recode into Same Variables. The only difference is that you do not have to copy the values you do not want to change. This method is not recommended, since it alters the original data and makes it impossible to test the accuracy of the operation unless the original data is saved in another form, e.g. Excel or a database.
Handling missing data, including running multiple imputation, in SPSS
SPSS version 19 is capable of running various procedures for handling missing data, including running multiple imputation, which is the generally preferred method. For a description of methods used to handle missing data, see our "General" FAQs.
To investigate and run descriptives on missing data, as well as fill in missing values using the regression and EM methods, go to Analyze > Missing Value Analysis. To fill in missing values using the multiple imputation method, go to Analyze > Multiple Imputation.
Complete instructions for using these procedures can be found on the IBM SPSS server
Using SPSS LOGISTIC to create a predicted category membership variable
Question:
I am using the LOGISTIC REGESSION procedure in SPSS. I want to get a new variable which indicates the predicted category membership for each observation.
Answer:
First, define the logistic regression model by selecting:
AnalyzeRegression
Binary Logistic...
and inputting the dependent and independent variables.
Click Save and check Group membership. This will add the predicted group membership to your dataset.
Click Continue.
Once you have checked all other desired options and are ready to run the logistic regression, click OK.
A new variable, PGR_1 (predicted group membership), will appear at the end of the dataset. This is a binary variable, containing 0's and 1's that show the group in which the model classified each observation.
Interaction contrasts in SPSS
Question:
I want to use SPSS to contrast groups of cells in a two way ANOVA interaction. I have a three by three matrix of cells and I want to test the null hypothesis that the mean of cells 1, 6, and 8
is not significantly different from mean of the remaining six cells. I have balanced data.
Answer:
There are several ways to do this. The simplest approach is as follows, although this method is only appropriate when you have balanced data and either all fixed or all random effects.
First, create a new variable which identifies observations in each of the nine cells of the 3x3 matrix. Suppose you have two factors, factor1 and factor2, each with three levels, in the original ANOVA.
From the Data Editor window, select:
TransformCompute Variable...
Under Target Variable, type the name of the new variable that will categorize the observations into one of the nine cells of your 3x3 matrix, e.g. newfact.
Under Numeric Expression, enter 1. The dialog box should look like the following:
You will now select the observations in the first cell of your 3x3 matrix.
Click the If… button at the bottom of the dialog box.
Check Include if case satisfies condition.
Enter the expression factor1=1 and factor2=1 in the empty box, as shown below:
Click Continue.
Click OK.
This will create the new variable, newfact, with values of 1 for all cases where factor1 and factor2 equal 1. All other values of newfact will be missing at this point, as in the example:
Now, you will select the observations in the second cell of your matrix.
Go back to Transform > Compute Variable.
Under Numeric Expression, enter 2.
Click the If… button.
Change factor2 = 1 to factor2 = 2, as in the following dialog box:
Click Continue.
Click OK.
A dialog box will appear, asking if you want to change the existing variable. Click OK.
Now, newfact will also have values of 2 whenever factor1 is 1 and factor2 is 2, as shown in the following dataset:
Repeat the above steps to create values of 3 through 9 for newfact. The final data should have the following structure:
Tthe dataset is now prepared for the contrast analysis.
To test the contrast, use the oneway ANOVA procedure as shown below.
From the Data Editor, select:
AnalyzeCompare Means
OneWay ANOVA...
Put the response variable in the Dependent List box.
Put the new variable that defines the nine cells in the Factor box. The dialog box should look like:
Click the Contrasts… button; this will produce the following dialog box:
In the Coefficients box, enter the contrast coefficients, making sure to add them in the correct order. The contrast coefficients for this particular contrast are:
2 1 1 1 1 2 1 1 2. Notice that the weights of +2 correspond to the cells of the three means specified above in the question (cells 1, 6, and 8).
To enter the contrast coefficients, first enter 2, click Add, enter 1, click Add, and repeat these steps until all nine contrast coefficients have been added.
When you are finished, the Coefficient Total should equal 0, as seen below:
Click Continue.
Click OK.
The output will show a table of the contrast coefficients for each level of the grouping variable, so you can check that the weights were entered correctly.
Testing H0: Homogenous regression slopes
Question:
I'm running an ANCOVA model where I have two factors, SEX and RACE, but I also have some covariates as well, C1 and C2. My dependent variable is called Y. I've been told I should test something called the "assumption of homogenous slopes" before I do my ANCOVA analysis. I'm using SPSS. What should I do?
Answer:
In addition to the usual ANOVA assumptions (independence of observations, normal distribution of the model residuals, and homogeneity of group variances), ANCOVA has two other assumptions: linearity of the relationship between the covariate(s) and the dependent variable, and homogeneity of covariatedependent variable slopes.
The linearity assumption is relatively straightforward to assess: You can plot the relationship between the covariate and the dependent variable; there should be some type of relationship present. You may also use the significance test associated with the covariatedependent variable correlation coefficient to evaluate the presence of a statistically significant linear relationship between the covariate and dependent variable. If there is no linear relationship between the covariate and the dependent variable, there is little reason to include the covariate in the analysis.
The assumption of the homogeneity of regression slopes says that the linear relationship between the covariate and the dependent variable should be the same at each level of your group factor. For example, the relationship between Y and C1 should be the same for each level of SEX or RACE in your design.
You can test this assumption by building a model that includes the interaction of each factor with each covariate. If these interactions are not significant, the assumption is not violated. If any of the factorbycovariate interactions are significant, the regression slopes are heterogeneous.
To create a model with interaction terms included, select:
AnalyzeGeneral Linear Model
Univariate...
In the Univariate dialog box, input your dependent variable, factors, and covariates.
Click Model.
In the Model dialog box, check Custom.
Enter all factors and covariates into the Model box; this will provide tests of the main effects of these variables.
Next, make sure the box under Build Terms contains Interaction.
Highlight the variables to include in the interaction and click the arrow to enter them into the Model box. Include the interaction of each grouping factor with each covariate. In your example, the model would look like:
When all the terms have been entered into the model, click Continue.
Click OK.
The output will contain an ANOVA table showing the results of each main effect and interaction. If any of the interaction terms are significant, you should speak with a statistical consultant about alternatives to ANCOVA or about developing a special heterogeneous slopes model suited to your research questions.
Computing ANOVAS from summary stats with SPSS
Question:
I was wondering if someone could help me with a problem. I am trying to compute an ANOVA from summary statistics (cell means, variances, and Ns).
Answer:
You can accomplish this using syntax in SPSS. You will need to know how to enter data into an SPSS matrix file using the MATRIX DATA command, and you will have to know how to use the SPSS MANOVA command. SPSS GLM does not accept the MATRIX subcommand, so you must use the older MANOVA command.
Here is an example of the use of SPSS MANOVA with an input matrix of cell means and counts. These values, plus the standard deviation of the dependent variable across the entire sample are all that is needed for the MANOVA procedure to perform an ANOVA.
The MATRIX DATA command must precede the MANOVA command so the data matrix can be used as the input data in the MANOVA command. Please refer to the Help menu in SPSS (Help > Topics > Index > MATRIX DATA(command)) for a description of SPSS matrix files. The "rowtype_" variable is required, and must be the first variable in the data.
MATRIX DATA VARIABLES = ROWTYPE_ group1 group2 depvar
/FACTORS = group1 group2.
BEGIN DATA
N . . 300
N 1 1 56
N 1 2 35
N 1 3 33
N 2 1 64
N 2 2 50
N 2 3 62
MEAN 1 1 4.56
MEAN 1 2 3.98
MEAN 1 3 2.42
MEAN 2 1 5.72
MEAN 2 2 16.66
MEAN 2 3 .64
CORR . . 1
STDDEV . . 2.11
END DATA.
MANOVA depvar BY group1(1,2) group2(1,3)
/MATRIX=IN(*)
/DESIGN.
You would use the MANOVA command just as you would with standard input data, with the one additional /MATRIX=IN(filename) subcommand. Since the matrix was just created in the above example with the MATRIX DATA command, the matrix file is the active file. The active data file is always represented with an "*" in SPSS code.
If you have multivariate data, you would simply include several more "ROWTYPE_"=CORR data lines to input the correlation matrix of the dependent variables in the matrix data file. There would also be several more columns representing the means and counts for the additional dependent measures.
Please refer to the Help menu located in any of the SPSS windows for further information about the MANOVA command or the MATRIX DATA command.
Correlating factor loadings from separate samples using SPSS
Question:
I have run a factor analysis on two separate samples of individuals, both producing the same factor solution. Given the same factor solution, I want to see how strongly the factor loadings correlate between samples for each factor. How can I do this using SPSS?
Answer:
You can do this in SPSS with a series of steps. First, you must output the factor loadings to two matrix files, one for each sample. Next, you must transpose the matrix files to put the factor loadings into columns instead of rows. The factor loading columns will have to be renamed and sorted. The next step is to merge the two factor loading datasets. Finally, correlations can be run on the factor loadings of interest.
Step 1  Output factor loadings:
First, define the factor analysis in the dialog boxes; from the Data Editor window, select:
AnalyzeData reduction
Factor...
This will give the following dialog box:
After specifying the factor analysis in the SPSS dialog boxes, press Paste instead of OK; this will paste the syntax to a syntax window.
In the syntax, immediately after the VARIABLES subcommand, enter the subcommand /MATRIX OUT(FAC=*). This tells SPSS to put the factor loadings in a matrix file which will show up as a new active dataset.
Note: the MATRIX subcommand must precede all subcommands other than the VARIABLE subcommand, as shown below:
Run the syntax by highlighting it and pressing the rightpointing arrow key on the menu bar.
Step 2  Data manipulations:
The MATRIX subcommand in the above syntax will create a new dataset containing the factor loadings, as illustrated below:
From the Data Editor window of this new dataset, select:
DataTranspose...
Transpose all variables except Rowtype and Factor, as shown in the example:
Click OK.
A dialog box will appear, reminding you that some variables are not selected. Click OK.
From the Data Editor window, select:
DataSort Cases...
Enter CASE_LBL in the Sort by box:
Click OK.
Next, go to the Variable View window.
Rename VAR001, VAR002, and VAR003 with descriptive names, such as samp1f1, samp1f2, and samp1f3.
Save the matrix file as an SPSS dataset.
Perform the above steps on each factor loading dataset.
Step 3 – Merge factor loading datasets:
Next, merge the two files.
From the Data Editor window of one of the factor loading datasets, select:
DataMerge files
Add variables...
Select the second factor loading dataset:
Click Continue.
Click OK.
Save the dataset. It should resemble the following:
Step 4 – Correlate factor loadings:
Next, run a correlation analysis, looking at the correlations of interest (samp1f1 vs. samp2f1, samp1f2 vs. samp2f2, and samp1f3 vs. samp2f3).
Correlation analysis is contained under:
AnalyzeCorrelate
Bivariate...
You can either enter all variables into the analysis at once and look at only those comparisons of interest, or you can analyze the variables one pair at a time:
Plotting regression lines for each group or subject using SPSS
Question:
I want to create a graph of linear regression lines of best fit over a scatterplot of x and y coordinate data for a set of subjects. That is, I want separate regression lines fit and plotted for each subject. Each subject was observed many times, each observation is entered as a single case in SPSS. So I have three variables: x, y, and case_id. How do I do this?
After I do the analysis mentioned above, I want to plot separate regression lines for different experimental groups where I have a single covariate as my Xaxis variable and a single dependent variable as my Yaxis variable. How would I do that?
Answer:
Note: The instructions below assume that your data matrix is structured as follows:
case_id x y
001 12 34
001 14 39
001 23 21
002 29 32
002 12 28
002 45 84 ...etc...
This is not the usual format for analyzing repeated measures data using SPSS Repeated Measures. The usual format involves defining a column (variable) for each measurement occasion of a dependent variable and having one case id value per row of the data matrix.
For the plot that illustrates the regression lines for each subject, from the Data Editor window, select:
GraphsLegacy Dialogs
Interactive
Scatterplot...
In the resulting dialog box, assign the x and y variables to the x and yaxes.
Put case_id into one of the boxes under Legend variables (color, style, or size). The data points corresponding to each case number will differ in either color, shape, or line thickness. The legend variables must be categorical. If the variable is numeric, SPSS will convert it for you at this point. See the example below:
Click on the Fit tab. Make sure Regression is the chosen method. If you don't want prediction interval lines on the graph, deselect all boxes under Prediction Lines. Under Fit Lines For, select Subgroups. If you do not want the regression line for all of the data points combined, deselect Total:
For the second question, plotting separate regression lines for each group instead of for each subject, follow the same steps listed above, except substitute the treatment group variable for the case_id variable in the Legend variables section of the Create Scatterplot dialog box.
Intercept in SPSS MANOVA contrast
Question:
How can I add the intercept term as part of my polynomial contrast? I'm using SPSS MANOVA.
Answer:
Use the CONSTANT keyword in the DESIGN statement, as is shown in the sample syntax below:
MANOVA dv1 dv2 dv3 dv4 dv5 dv6 dv7 BY sex(1,2) site(1,2)
/WSFACTOR location(7)
/CONTRAST (location) = POLYNOMIAL
/PRINT=PARAM(ESTIM)
/DESIGN= CONSTANT sex site sex BY site.
Having SPSS write temporary data files to a nondefault location
Question:
I am loading a very large database file into SPSS Windows from a network server. The server has a lot of space available on it, but my local system (where I'm running SPSS) does nothave that much space. SPSS cannot load all of my datait keeps writing temporary data files to my local PC. Is there any way I can make SPSS write its temporary data files to the network server which, after all, has a lot more free space than my PC?
Answer:
There are several remedies you can try. The first action you can take is to turn on data compression inside SPSS. You can do this by opening a new syntax window, typing the syntax SET COMPRESSION=yes., highlighting the syntax, and running it. This will force SPSS to compress its temporary data files, which will save space regardless of what disk drive SPSS uses for temporary storage. The data compression remains on until COMPRESSION is set to no or until the end of the session.
According to SPSS technical support, you can explicitly tell SPSS where to write the temporary data files it creates.
In the Edit menu, choose the Options option. In the Options window that appears, click on the General tab and then enter the desired temporary directory name in the "Temporary Directory" box. Click Apply, and then click OK.
SPSS test of homogenous regression slopes with repeated measures data
Question:
I'm interested in testing the homogeneity of regression slopes for men and women across repeated measurements of SALARY while controlling for a covariate, AGE. Can this be done using
SPSS?
Answer:
Yes. You will build a custom model in SPSS, specifying an interaction between the factor and covariate. The following steps will guide you in this process.
From the Data Editor window, select:
AnalyzeGeneral Linear Model
Repeated Measures...
First, you will define the repeated measures. Provide a name for the repeated measures factor; in your example, this might be time. Enter the number of levels, or timepoints, of the repeated measures factor; in this case, it is 2. The resulting dialog box is as follows:
Click Add.
Enter the repeated measure name, such as salary. Click Add. You will see the following dialog box:
Click Define. This will produce the Repeated Measures dialog box, where you define the model.
Select the repeated measures of salary and move them to the WithinSubjects Variables box by clicking on the rightpointing arrow button, making sure the beginning salary is matched with the first timepoint and the end salary is matched with the second timepoint.
Enter gender in the BetweenSubjects Factors box.
Enter age in the Covariates box.
The model should look like:
Click Model.
Check Custom.
In the BetweenSubjects Model box, enter age, sex, and their interaction (clicking on both age and sex and then clicking the arrow will enter the interaction term).
Enter time in the WithinSubjects Model box. The model will look like:
Click Continue.
Click OK.
The time*sex*age interaction is the one of interest. This is printed out in the table of multivariate results and in the table of withinsubjects effects. The null hypothesis states the regression slopes of men and women are equal across timepoints, controlling for age, so if this test is statistically significant, you would conclude that the regression slopes are unequal for the males and females in the population from which you drew your sample. If the interaction is not significant, you would conclude the regression slopes are homogeneous.
Adjusted means from SPSS MANOVA in a repeated measures with grouping factor
Question:
I ran a repeated measures ANOVA model in SAS PROC GLM using the following syntax:
PROC GLM ;
CLASS group ;
MODEL mo1mo3 = groupcov ;
REPEATED mo 3 ;
LSMEANS group ;
RUN ;
The LSMEANS options gives me the leastsquares means for my model, but when I run SPSS MANOVA, using the following syntax, I get the same results for the effects tests, but different LSMEANS.
MANOVA mo1 mo2 mo3 BY group(1 2) WITH (cov)
/WSFACTORS = mo(3)
/ANALYSIS = T1 to T3
/METHOD UNIQUE
/ERROR WITHIN+RESIDUAL
/PRINT SIGNIF(univ hf gg) transform pmeans param(estim)
/DESIGN tcov, group, group*tcov.
As you can see, we have a design with three measurement occasions (mo1mo3) and one betweensubjects group (group) and one covariate (cov). If the tests of effects are coming out the same with SAS and SPSS, why aren't the LSMEANS coming out to be the same, too?
Answer:
You raise an important question. According to SPSS Technical Support, the reason why SAS and SPSS yield the same effects test results, but different LSMEANS estimates is because SPSS uses the unweighted mean of the cell means whereas SAS uses a weighted mean of cell means (an unweighted mean of the original observations). In unbalanced designs, the MANOVA adjusted means are the weighted means of individual observations.
Furthermore, SPSS MANOVA displays the adjusted means in the scale of the transformation used for the repeated measures analysis. This scale is generally not of interest to the applied researcher.
In its new GLM procedure, SPSS uses the same formula as the SAS GLM procedure to compute adjusted means. If you are using SPSS MANOVA and you want to calculate adjusted means using the GLM approach, you can run SPSS MANOVA twice. The first MANOVA run will match the syntax you show above to obtain the tests of effects.
For the second MANOVA run, you must first "center" the covariate by subtracting the grand mean for the covariate from each observation's value on the covariate. For instance, if the grand mean of your covariate is 34.48151053313, then appropriate MANOVA syntax looks like this:
* Compute centered version of covariate.
Compute newcov = cov  34.48151053313.
MANOVA
mo1 mo2 mo3 BY group(1 2) WITH newcov
/PRINT = par
/ANALYSIS = mo1 mo2 mo3
/DESIGN = muplus group, newcov, group*newcov.
In this analysis you substitute the meancentered covariate in place of the original covariate. You also use the MUPLUS keyword and /PRINT = par keywords to obtain the adjusted means. These will appear as the parameter estimates on the SPSS MANOVA output for this analysis.
Note that you should NOT interpret the remainder of the MANOVA output from this second analysis. Instead, use the results of the original MANOVA program to test your hypotheses of interest.
Scoring exam scores using SPSS
Question:
I have data from exams my students took and I want to score the exams. Each student has scores on five questions from the exam, q1 through q5. I've entered these scores into a SPSS spreadsheet along with the correct answer key variables, k1 to k5.
My data are stored in a file called C:\WINDOWS\DESKTOP\sampdata.sav and I have defined a variable called ID for each student who took the exam. How can I get a total score of the number of correct responses for each student?
Answer:
Open your dataset to make it the active dataset.
From the Data Editor window, select:
TransformCompute Variable...
Under Target Variable, type the name of the variable that will be the number of correct answers, e.g. score.
Under Numeric Expression, type (q1=k1)+(q2=k2)+(q3=k3)+(q4=k4)+(q5=k5), as illustrated below:
Click OK.
The expression qi=ki will be 1 if the two values are equal and 0 if they are not. Hence, the value of score for each case will be the number of times qi=ki for that case, i.e. the number of correct answers.
Warning: if there are any missing values, score will be missing. In order to count missing values as incorrect, they must be recoded to a number that will never equal one of the answers, e.g. 999,999.
To do this, select:
TransformRecode into Different Variables...
Click the variables q1q5 into the box labeled Input Variable > Output Variable, as shown below:
Click Old and New Values.
Under Old Value, check System or usermissing.
Under New Value, check Value and enter an appropriate value to replace the missing observations, such as 999,999.
Click Add.
Under Old Value, check All other values.
Under New Value, check Copy old values.
Click Add; this will produce the following dialog box:
Click Continue.
Select q1 and type in the name of the revised q1 variable, e.g. q1new, as seen in the following dialog box:
Click Change. Rename the other four question variables, clicking Change after each new name. You do not have to respecify old and new values for each variable. The dialog box should look like this:
Click OK.
Your five new variables will be added to the end of the dataset. You should randomly check some of the values to make sure the operation was successful.
Compute score as above, using the new variables.
Counting like columns in SPSS
Question:
I have a dataset that looks like this:
44 17 22 18 00 00
27 19 08 33 35 38
22 00 00 00 00 00
37 09 01 04 06 00
The first three columns are one set of measures while the last three column variables are a second set of measures. I want to get a count of how many scores are shared in common across the sets of measures for each subject in my experiment. I then want to sum these up. How can I do this using SPSS?
Answer:
The syntax first creates a fictitious, random dataset to use in the example. The next section of syntax separates the first set of scores from the second set of scores, putting each score in the first set in its own row and keeping the scores from the second set in their own columns. This step prepares the two sets of scores for comparison. The next section flags each instance a score in the first set matches a score in the second set. Next, these flags are added for each id, or subject. Finally, the sums of matches are added to the original dataset.
You can use the following SPSS syntax provided by SPSS technical support to accomplish your tasks. The syntax is annotated to provide descriptions of each section of code to make it easier to adapt to your own unique circumstances.
* The following section of syntax creates a fictitious, random data set to use in this example.
* The dataset has 200 observations and 100 variables.
* The values come from a uniform distribution and range from 1 to 55.
* The data is saved to a dataset called data.sav.
* If you run the syntax with the sample dataset, you will need to designate the appropriate directory for this dataset in the “save outfile” command.
new file.
input program.
vector v(100).
loop id =1 to 200.
loop #i=1 to 100.
compute v(#i)=trunc(uniform(55)+1).
end loop.
end case.
end loop.
end file.
end input program.
exe.
formats v1 to id (f1.0).
save outfile 'data.sav'.
*To call your data for use in the program, use the GET command with the correct dataset location and name.
GET FILE='data.sav'.
* This section outputs a dataset called test.sav.
* In this dataset, there are several rows per subject, or “id”.
* The first set of scores are now transposed, so that each score in the first set is in its own row.
* The variable containing all of the scores from the first set is called NEWVAR.
* The scores in the second set are retained for each row of data.
* The KEEP subcommand specifies the variables to put in test.sav.
* ID is the subject number.
* COUNT keeps track of the order of the scores in the first set.
* NEWVAR contains the scores in the first set.
* V51 to V100 are the scores in the second set.
* In the VECTOR and LOOP commands, change the number “50” to the number of scores in your first set.
* For example, if you have five scores in your first set of scores, change the “50” to “5” in these commands.
* In the KEEP subcommand, change V51 and V100 to be the first and last variables designating your second set of scores.
* For example, if there are five scores in the first set and five in the second set, the KEEP subcommand would include V6 to V10.
* You will need to specify the appropriate directory for the dataset test.sav.
VECTOR x=v1 to v50.
LOOP COUNT=1 TO 50.
COMPUTE NEWVAR=x(count).
XSAVE OUTFILE='test.sav' / KEEP ID COUNT NEWVAR V51 TO V100.
END LOOP .
EXECUTE.
GET FILE='test.sav'.
* This section flags all of the instances in which one of the scores in the first set matches a score in the second set.
* If NEWVAR, which is a score from the first set, equals one of the scores from the second set, FLAG(i) = 1, where i = the place order of the score in the second set.
* For example, FLAG(3) = 1 means that NEWVAR = the third score in the second set for that subject.
* Change the “50” in the “flag” vector and in the LOOP command to be the number of scores in the second set.
* Change the numbers in the VECTOR command to be the range of scores in the second set.
* For example, if you have five scores in the first set and five in the second set, then the VECTOR command would be VECTOR y=v6 to v10.
vector flag(50).
VECTOR y=v51 to v100.
LOOP #i=1 to 50.
IF (newvar=Y(#i)) FLAG(#i)=1.
END LOOP .
EXECUTE.
* For each score in the first set, add up the number of times that score matched a score in the second set and put this number in the variable “matched”.
* As before, change the “flag50” variable to reflect the last variable in the first set of scores.
* For example, if you have five scores per set, “flag50” should be “flag5”.
COMPUTE matched = SUM(flag1 to flag50).
EXECUTE.
* Compute the number of times there was a match between a score in the first set and a score in the second set by summing the variable “matched” for each subject, or id.
AGGREGATE
/OUTFILE='AGGR.SAV'
/BREAK=id
/matched = SUM(matched).
* Merge the dataset containing the number of times scores matched with the original dataset.
MATCH FILES FILE='DATA.SAV'/FILE='AGGR.SAV'
/BY id.
EXECUTE.
Transforming univariate to multivariate data in SPSS
Question:
I have a dataset that looks like this:
001 34 56
001 23 45
001 39 41
002 33 11
002 87 57
002 99 36
...etc...
There are three subject records per case. I want a new SPSS dataset that has only one subject record per case, and six variables instead of the current two variables. How can I do this using SPSS?
Answer:
You can use the Restructure Data Wizard in SPSS to transform your data from univariate format to multivariate format.
From the Data Editor window, select:
DataRestructure...
If the dataset is not permanent, i.e. it has not already been saved, a dialog box will appear asking if you want to save the dataset. It is a good idea to save it, since the Restructure Wizard will replace the active dataset with the restructured one. After all the steps have been completed, you should compare the original dataset with the restructured one to ensure the accuracy of the commands.
Once the dataset has been saved, the Restructure Data Wizard dialog box will appear:
Step 1 of 5: Check Restructure selected cases into variables:
Click Next.
Step 2 of 5: In the Identifier Variable box, enter the variable that identifies each subject, e.g. id:
Click Next.
Step 3 of 5: The data must be sorted by the identifier variable before restructuring. If the identifier variable is already sorted, you can select No. If it is not sorted or you aren't sure, select Yes:
Click Next.
Step 4 of 5: You can leave the default clicked. In this step, you can specify the order of the variables in the transposed dataset, create a counter variable, or create an indicator variable. Click the Help button for further information on these options.
Click Next.
Step 5 of 5: If you want to replace the current active dataset with the restructured dataset, select the top option, Restructure the data now, and click Finish. The restructured dataset can be saved as a new file, using the File – Save as… option. This will preserve the original data and restructured data for comparison and later use.
If you want to paste the syntax, you can select the second option, Paste the syntax…, which will copy the syntax to a syntax window. To save the data to a permanent dataset, add the SAVE OUTFILE command at the end of the syntax. For example, SAVE OUTFILE='c:\sample\restructured.sav'. will save the restructured data to an SPSS dataset called restructured in the c:\sample directory.
If you want to use syntax for the entire restructuring, the code for the above example is shown below. Words in all capitals are commands and words in lowercase are usersupplied variable or dataset names.
SORT CASES BY id .
CASESTOVARS
/ID = id
/GROUPBY = VARIABLE .
SAVE OUTFILE='c:\sample\restructured.sav'.
Converting a string variable to a date in SPSS
Question:
I have several date variables in my SPSS for Windows database. One of the variables is a 6 character long string that has date represented in the format ddmmyy. I need to get this date into SPSS date format and have the data editor spreadsheet display the values as readable dates. How can I do this using SPSS?
Answer:
You can use the Date and Time Wizard to transform string variables into dates.
From the Data Editor window, select:
TransformDate and Time Wizard...
Click Create a date/time variable…
Click Next.
Click on the string variable to be reformatted and select the pattern of the date in the string variable. In your example, the pattern is ddmmyy.
Click Next.
Type the name of the new date variable, e.g. date2 and select the date format for the new variable. In this example, mm/dd/yyyy was chosen for the formatted date variable.
Click Finish.
The new variable will appear at the end of the dataset:
Note that the original variable is still in string format, whereas the new variable is in date format:
Decomposing interactions using SPSS
Question:
I have obtained a significant interaction effect using the GLM procedure in SPSS and now I want to further decompose the interaction. In other words, I want to try to identify the source or root of the interaction via a more finegrained analysis as a followup to the significant interaction effect. My design has a twolevel betweensubject factor that is an experimental condition where subjects are exposed to an anxietyprovoking situation prior to the experiment or they are in the control group. There is a repeated measures variable that measures subjects' reaction to a stressful situation on four separate measurement occasions. Thus, the design is a 2 (anxietyprovoking situation: yes versus no) by 4 (measurement occasion: trial 1 vs. trial 2 vs. trial 3 vs. trial 4). After obtaining a significant interaction between the experimental condition and the measurement occasions, I want to know within which measurement occasions there were differences between experimental groups.
Answer:
A typical method used to address your question is called the method of simple main effects (Winer et al., 1991). This analysis cannot be performed with dialog boxes in SPSS, but simple main effects tests can be performed using syntax. The syntax shown below illustrates the use of the GLM procedure to obtain contrasts between levels of a variable within all other levels of the other variable in an interaction. The four levels of the withinsubject factor are trial 1, trial2, trial3, and trial4. Anxiety is the name of the variable representing the control versus the experimental group. The subcommand that specifies the contrasts is the /EMMEANS subcommand. In the example below, the /EMMEANS subcommand is used twice. In the first example, we are requesting a comparison of the betweensubjects factor, anxiety, within each level of the withinsubjects factor, trial. In the second /EMMEANS subcommand, we are requesting a comparison of levels of the withinsubject factor, trial, within each level of the betweensubjects factor.
GLM
trial1 trial2 trial3 trial4 BY anxiety
/WSFACTOR = trial 4 SIMPLE
/METHOD = SSTYPE(3)
/CRITERIA = ALPHA(.05)
/EMMEANS = TABLES (anxiety*trial) COMPARE (anxiety)
/EMMEANS = TABLES (anxiety*trial) COMPARE (trial)
/WSDESIGN = trial
/DESIGN = anxiety .
The decomposed interaction table appears following the TABLES keyword. In the example syntax above, the interaction is designated as anxiety*trial following the TABLES keyword. Following the interaction specification, the COMPARE keyword appears followed by the name of the variable for which comparisons will be generated. In the above example, the variable anxiety occurs after the COMPARE keyword in the first example of the EMMEANS subcommand. Thus, the first instance of the EMMEANS will produce contrasts between levels of anxiety within each level of the withinsubjects factor, trial. In this example, there will be four onedegreeoffreedom univariate Ftests that appear on the EMMEANS output: anxiety level 1 vs. anxiety level 2 at trial 1, anxiety level 1 vs. anxiety level 2 at trial 2, anxiety level 1 vs. anxiety level 2 at trial 3, and anxiety level 1 vs. anxiety level 2 at trial 4. For example, comparing anxiety level 1 vs. anxiety level 2 within trial 1 results in an Fvalue of 0.292 and a significance level of 0.601 as can be seen in the table below.
Univariate Tests 

Measure:MEASURE_1 

trial 
Sum of Squares 
df 
Mean Square 
F 
Sig. 

1 
Contrast 
1.333 
1 
1.333 
.292 
.601 
Error 
45.667 
10 
4.567 

2 
Contrast 
3.000 
1 
3.000 
.484 
.503 
Error 
62.000 
10 
6.200 

3 
Contrast 
.083 
1 
.083 
.013 
.912 
Error 
64.167 
10 
6.417 

4 
Contrast 
14.083 
1 
14.083 
1.849 
.204 
Error 
76.167 
10 
7.617 

Each F tests the simple effects of Anxiety within each level combination of the other effects shown. These tests are based on the linearly independent pairwise comparisons among the estimated marginal means. 
The second instance of the EMMEANS subcommand is identical to the first with the exception being that the withinsubjects factor, trial, is included where anxiety appeared previously which will produce output containing contrasts between levels of trial within each level of anxiety. In this example, there will be two threedegreeoffreedom multivariate Ftests that appear on the EMMEANS output: trial 1 vs. trial 2 vs. trial 3 vs. trial 4 at anxiety level 1 and trial 1 vs. trial 2 vs. trial 3 vs. trial 4 at anxiety level 2. Unlike the first group of univariate Ftests mentioned above, this group of tests are multivariate tests due to the repeated measures nature of these latter comparisons. For example, in the table below, the difference between levels of trials within the Control Group produces an Fvalue of 38.379 with a significance level of 0.000, indicating that there are differences between levels of the variable trial within the Control Group.
Multivariate Tests 

Anxiety 
Value 
F 
Hypothesis df 
Error df 
Sig. 

1 
Pillai's trace 
.935 
38.379^{a} 
3.000 
8.000 
.000 
Wilks' lambda 
.065 
38.379^{a} 
3.000 
8.000 
.000 

Hotelling's trace 
14.392 
38.379^{a} 
3.000 
8.000 
.000 

Roy's largest root 
14.392 
38.379^{a} 
3.000 
8.000 
.000 

2 
Pillai's trace 
.916 
28.927^{a} 
3.000 
8.000 
.000 
Wilks' lambda 
.084 
28.927^{a} 
3.000 
8.000 
.000 

Hotelling's trace 
10.847 
28.927^{a} 
3.000 
8.000 
.000 

Roy's largest root 
10.847 
28.927^{a} 
3.000 
8.000 
.000 

Each F tests the multivariate simple effects of trial within each level combination of the other effects shown. These tests are based on the linearly independent pairwise comparisons among the estimated marginal means. 

a. Exact statistic 
In addition to the appropriate Ftests of simple main effects, SPSS also produces tables of pairwise comparisons for each EMMEANS specification. The pairwise comparison output is useful when the simple main effect test contains more than one degree of freedom. For instance, the second EMMEANS specification used in the anxiety example results in two threedegreeoffreedom multivariate simple main effect tests. If you obtain a statistically significant multivariate simple main effect test result, you may wish to further explore pairwise comparisons among mean trial levels within each level of anxiety group to determine where measurement occasions differ. The pairwise comparison output allows you to do this. If you plan to examine more pairwise comparisons than the number of degrees of freedom in the original contrast (in this case 3 DF), you should employ a posthoc correction factor to control type 1 error. Fortunately, SPSS offers several options for posthoc type 1 error control, including Bonferroni and Sidak adjustments. You can select these when you specify the EMMEANS statement in the OPTIONS dialog box of the GLM procedure. The withinsubjects table of pairwise comparisons is shown below, containing contrasts between all levels of trial within all levels of anxiety. For example, the table below contains a comparison of trial 1 with all other levels of trial within the Control Group of the anxiety variable producing output containing a mean difference of 5.167 between trial 1 and trial 2, a mean difference of 8.333 between trial 1 and trial 3 and a mean difference of 13.000 between trial 1 and trial 4 with a a significance value of 0.000 for all three of these comparisons.
Pairwise Comparisons 

Measure:MEASURE_1 

Anxiety 
(I) trial 
(J) trial 
Mean Difference (IJ) 
Std. Error 
Sig.^{a} 
95% Confidence Interval for Difference^{a} 

Lower Bound 
Upper Bound 

1 
1 
2 
5.167^{*} 
.980 
.000 
2.982 
7.351 
3 
8.333^{*} 
1.170 
.000 
5.726 
10.941 

4 
13.000^{*} 
1.301 
.000 
10.102 
15.898 

2 
1 
5.167^{*} 
.980 
.000 
7.351 
2.982 

3 
3.167^{*} 
.580 
.000 
1.875 
4.458 

4 
7.833^{*} 
.685 
.000 
6.307 
9.360 

3 
1 
8.333^{*} 
1.170 
.000 
10.941 
5.726 

2 
3.167^{*} 
.580 
.000 
4.458 
1.875 

4 
4.667^{*} 
.558 
.000 
3.424 
5.909 

4 
1 
13.000^{*} 
1.301 
.000 
15.898 
10.102 

2 
7.833^{*} 
.685 
.000 
9.360 
6.307 

3 
4.667^{*} 
.558 
.000 
5.909 
3.424 

2 
1 
2 
4.833^{*} 
.980 
.001 
2.649 
7.018 
3 
9.167^{*} 
1.170 
.000 
6.559 
11.774 

4 
11.500^{*} 
1.301 
.000 
8.602 
14.398 

2 
1 
4.833^{*} 
.980 
.001 
7.018 
2.649 

3 
4.333^{*} 
.580 
.000 
3.042 
5.625 

4 
6.667^{*} 
.685 
.000 
5.140 
8.193 

3 
1 
9.167^{*} 
1.170 
.000 
11.774 
6.559 

2 
4.333^{*} 
.580 
.000 
5.625 
3.042 

4 
2.333^{*} 
.558 
.002 
1.091 
3.576 

4 
1 
11.500^{*} 
1.301 
.000 
14.398 
8.602 

2 
6.667^{*} 
.685 
.000 
8.193 
5.140 

3 
2.333^{*} 
.558 
.002 
3.576 
1.091 

Based on estimated marginal means 

*. The mean difference is significant at the .05 level. 

a. Adjustment for multiple comparisons: Least Significant Difference (equivalent to no adjustments). 
For more information about simple main effect tests, see:
Winer, B. J., Brown, D. R., & Michels, K. M. (1991). Statistical Principles in Experimental Design. New York, NY: McGrawHill.
Installing SPSS 15
Question:
I just purchased SPSS 15 for Windows from ITS Software Distribution and Sales. How do I install it?
Answer:
These instructions can be used to install SPSS version 15. Please note however, that for yearly authorization SPSS is no longer issuing authorization codes for versions earlier than SPSS 14. The screenshots below illustrating SPSS 13 and SPSS 14 installation will be essentially identical to those that you will observe during SPSS 15 installation. First, write down the Serial number (eight digits) that is printed on your SPSS CD because you will need to enter this number during the installation process. Also, make sure that you have the SPSS Authorization code that was provided to you by Software Distribution and Sales. The Authorization code is a string of 20 alphanumeric characters consisting of digits and lower case letters. Entering this number at the end of the installation process will ensure that SPSS remains functional for more than 14 days. To begin installation, place the SPSS installation CD in the CD drive. When the following window appears, click Install SPSS.
For installation on your personal computer or laptop, click Site License, then click the Next button.
In the next window that appears, review the license agreement and click “I accept the terms in the license agreement” and then click Next.
Review the ReadMe information and then click Next.
Enter your name, organization, and the serial number that is printed on your SPSS CD (enter the serial number without the hyphen). Click Next.
You can install SPSS to the default location (C:\Program Files\SPSS) or select one of your own choosing. It is generally recommended that you install to the default location as shown in the view below.
However, if you are authorized for two different versions of SPSS and want to keep both versions of SPSS fully functional, or if you want to change the installation location for other reasons, then click the Change button. In the dialog box that appears, enter the new path (for example, C:\Program Files\SPSS15\) in the Folder name box and click OK.
The new path should appear in the Destination Folder dialog box. Click Next.
At this point you are ready to install SPSS. Click Install.
It will take several minutes to install.
The following window appears at the end of installation. Make sure to click “Launch License Authorization Wizard” to ensure that SPSS will remain active longer than the 14 day trial period.
When the License Authorization window appears, click Start.
In the next window, make sure “Use Authorization via Internet to get License” is checked, then click Next.
In the window that appears, enter the SPSS Authorization code that was provided to you by Software Distribution and Sales in the Authorization Code box. Then click Next.
After a short period, the License Authorization Wizard will indicate that you have successfully licensed your copy of SPSS. Click Finish.
Back to Top