Can SPSS do ... ? If so, how?
------------------------------
Occasionally, people with full access to SPSS documentation
look through it carefully, and still have questions about
the capabilities of SPSS. This is normal.
This page briefly addresses questions like this that have
come in to ITS Statistics Consulting, so that others may
benefit from what was learned. Additions to this page
are always welcome, in the form of questions and/or
answers. (See below.)
===========================================================
===========================================================
Q. How can I find out what Version of SPSS (Windows or Mac)
I have installed and when/if it is going to expire?
A. Open a Syntax Window (File > Open > Syntax) and
enter and run the following command:
SHOW LICENSE.
It can be upper or lower case, but must have the period.
===========================================================
===========================================================
Q. Can SPSS do hierarchical stepwise multiple regression
in which the programmer decides what variables to enter
(or remove) in what order?
A. Yes. The REGRESSION command does this.
(source: e-mail from SPSS tech support, 07-25-95)
===========================================================
===========================================================
Q. When doing a factor analysis with oblique rotation,
can SPSS provide the mean of the squared residuals?
A. The squared residuals can be written to a file, but
the mean must be calculated separately from the
factor analysis, by something similar to the following:
compute meanall=(mean1+mean2+mean3)/3.
(source: e-mail from SPSS tech support, 07-25-95)
===========================================================
===========================================================
Q. Can SPSS statistically compare the Beta weights or the
independent R-squared values for each of the independent
variables in a regression?
A. GLM and UNIANOVA procedures (under Analyze->>General Linear
Model in the menus) can do this, using command syntax, with
the LMATRIX subcommand. For example, if you have two predictors
in a linear regression, A and B, and wanted to test equality of their
regression coefficients, you could specify a structure like:
GLM y WITH a b
/PRINT PARAMETERS
/LMATRIX a 1 b -1.
This is further explained in SPSS Resolution 46820, available
(after logging in with an SPSS Web site user name and password,
available at no charge but required) from support.spss.com
Once there, click Troubleshooting>Resolution Search and enter 46820.
(source: e-mail from SPSS tech support, 04 May 2005)
===========================================================
===========================================================
Q. Can SPSS calculate quartile (or other division) rankings
and store the results in the Active File? In other words,
can SPSS determine what quartile a particular score is in,
and then store that quartile ranking in a new variable?
A. Yes. This is done using the RANK command, or the
Transform>Rank Cases menu choices in the SPSS Data Editor
window. Please see SPSS online Help or other documentation
for details.
===========================================================
===========================================================
Q. Can SPSS give separate explained variance values for each
variable in a Regression model?
A. Assuming the usual situation of correlated predictors,
there is no unique way to decompose the total R^2 or variance
accounted for into an additive set of values for the predictors.
If you want an additive decomposition, you have to select an
order for the predictors, which most people don't want to do.
If you want unique values for each variable, you can get them
by looking at the proportion of variance accounted for by each
predictor after adjusting for all others. These won't add up to
the total amount. This is done by using the TEST keyword on
the METHOD subcommand, as in:
REGRESSION DEP=y
/METHOD=TEST (x1) (x2) (x3).
The last column of the ANOVA table output will have the R^2 change
for each predictor on top of all others.
Source: eMail from SPSS on 11-30-98
===========================================================
===========================================================
Q. Can SPSS join together (concatenate) two string variables
into a single variable?
A. Yes. The new variable, also a string variable, will need to
be created first, then the concatenation is done with the
COMPUTE command and the CONCAT() function.
To create a new string variable, you need to run the STRING command.
SPSS cannot create a new string variable with just the COMPUTE
command (as is the case with numeric variables). The STRING
command tells SPSS the desired width of the new variable, so be
sure to make it long enough for the longest text string.
Then you can run the COMPUTE command with the CONCAT() function.
If you want the text to appear together, i.e., without the blanks
that are at the end of shorter values, you'll also need to use
the RTRIM() function to trim off the trailing blanks from variables
that have other text appearing after them.
These functions are documented in the SPSS Syntax Guide, V.8, p. 51.
Here is a sample program that probably does what you want to do:
data list / part1 1-10 (A) part2 15-25 (A).
begin data.
This is a test to
see if SPSS can
join these lines.
end data.
string new (A30).
compute new=concat(rtrim(part1),' ',part2).
execute.
The blank space between the first and second variable references
is so that you retain one space between words (after the RTRIM()
function takes out all the trailing blanks).
===========================================================
===========================================================
Q. How does SPSS correct for negative skewness in data?
A. For negative skewness, the simplest transformation is to first reflect
the data by finding the maximum of the data, call it MAX,
then subtracting the data from number larger than the maximum, and
finally computing the logarithm. Once MAX is known, this
can be done in one step with
COMPUTE new_y = LN(MAX + 1 - y).
Refer to Box and Cox, Mosteller and Tukey, or other references
in the literature for more general discussions of the selection
of transformations.
Source: eMail from SPSS Technical Support 14 Apr 2003 (thanks)
===========================================================
===========================================================
Q. Can SPSS do a statistical comparison of different plot lines?
A. What the user wants to do is what is often referred to as testing the
"homogeneity of slopes" assumption. Instructions for performing
this test are available on the SPSS AnswerNet webpage (you'll
need to set up your own personal login and password there; no charge)
as solution 19191.
Some research designs have only one factor (treatment);
the solution is put in more general terms of a multi-factor one,
but the principle is the same.
Source: eMail from SPSS Consultants, 7 May 2003
===========================================================
Q. Can SPSS overlay a regression line on a scatterplot?
A. Yes. Once the scatterplot is created, double click on the plot
itself, and in the dialog box that comes up, click Chart,
then Options, then click the box next to 'Fit Line'.
===========================================================
Q. Can SPSS perform Seemingly Unrelated Regression (SUR)?
A. No. According to their Web site (Answernet entry #30691)
they don't have a procedure for SUR at the present.
===========================================================
Q. Can SPSS do a Generalized Least Squares (GLS) correction for
autocorrelation?
A. Yes, but only using the AREG command in the Trends module.
The Trends module is available at USC only in the Batch facility
of SPSS 11.x under UNIX.
A similar operation, the Maximum Likelihood (ML) correction,
can be done not only in AREG and ARIMA (both Trends
procedures), but in MIXED, too. Resolution Document Number
31763 explains the use of MIXED to correct for first-order
autocorrelations using the first-order autoregressive covariance
structure (AR1).
Source: eMail from SPSS Consultants, 17 September 2004
===========================================================
===========================================================
===========================================================
Comments and inquiries in this area should be directed to
<gpjones@usc.edu>, or call Gerald Jones (ITS Senior
Statistics Consultant) at 213/740-5555.