### Data Entry and Manipulation

**How do I query an Access database from within SPSS? **

Start SPSS and follow these instructions:

**File -> Open Database -> New Query...**

Select **MS Access Database**

Select **Next -> Browse** to your files. Select all files you need then **OK. ****Finish**.

**I have lost any dates I had; they have been replaced by stars. It is not possible for me to re-enter all these dates. What happened to my dates?**

It seems the field width for the column holding your date data is too small. Just increase the column width and you should be able to see the dates. Move your cursor to the line separating your variable names and it will change to double-sided arrows, drag to the right to increase column width.

**I have produced lots of tables from SPSS. Can you help me to interpret these tables?**

It will be best for you to go through a case study of the analysis you have performed. From SPSS menu select **Help -> Case Studies…** SPSS will display a new window in your web browser. Use the content on the left to find a case study. You can go directly into a case study from the dialogue box of the procedure by selecting Help. For example, if you want a case study for linear regression you will select Help from the dialogue box **Analyze -> Regression -> Linear….Help**. Then click on **Show Me**.

**The version of SPSS that I got only installs the 'production facility' and not SPSS proper. I understand that these are two separate programmes. Could you please tell me how I can get the normal SPSS programme? **

SPSS may have installed fine but the icon for SPSS proper is missing from the Start Menu. Try to do a Find for spsswin.exe. If you could find it then it installed properly. Just double-click on it to start SPSS proper. Then you can create a shortcut on your desktop. However, if you can not find spsswin.exe then it has not installed properly. In this case, I would advise that you uninstall it and reinstall again.

**I did compute a new variable, by multiplying and add many others variables, but after I finished I have been asked to increase the cases, when I added the new cases, I tried to drag down the mouse by clicking on one of the computed variables as it is used in Excel (SPREADSHEET), but it doesn’t work! Is there any way to use the same equation for the rest of new cases?**

SPSS does not work like Excel. Before you compute new variable in SPSS you have to make sure that all cases are included into your data file. If this is not possible, you will need to re-compute the new variable each time you add a case to your data file. You may also need a new variable name as SPSS will not accept the previous name.

**What is the difference between Chi-square and t test? If I want to compare two means then I should use t test, and if I just have frequencies then I should use chi-square, is it right? There are some terms such as F, t, df, Sig. and so on, what should I choose to present the results of my data?**

The Chi-Square test applies mostly to categorical variable e.g. sex (male or female) while t-test applies mostly to interval variable (also known as continues variable) e.g. age, temperature, etc. If you want to compare two means use t-test. If you want to find out the relationship between two categorical variables use chi-square, e.g. the relationship between sex and blood group. If you want to find the frequency (count) of a variable just use the frequency procedure. For example the frequency for the variable sex will tell you how many males and females are there.

F stands for the F-statistics, t stands for the t-statistics, and df stands for degree of freedom. Sig stands for significant (this is also known as the p-value).

You can learn more about these by getting any good statistics book from the library. I recommend the following:

**SPSS for Windows Made Simple, Paul R. Kinnear and Colin D Gray, LEA,1994**

**I have been given an SPSS data file but would like to read it into SAS. How can I do that?**

SAS can read SPSS file directly. You can also save the data file within SPSS as an Excel data file. SAS can read Excel data file easily through **File -> Import**.

**How can I calculate the area under a curve using SPSS?**

Follow these instructions:

From the Data Editor window, choose **Transform->Compute variable...**from the menus.

Type *YAREA* as the **Target Variable**.

Type "(2*SUM(y1 to y4)-y1-y4)/2" into the **Numeric Expression** box (without the quotation marks). Click **OK**.

If the variables Y1 to Y4 are not adjacent and ordered in the data file, then you will need to list the all the variables as arguments as in SUM(y1,y2,y3,y4). Note: The Trapezium Rule with slight modification has been use to calculate the area.

**In my data file I have a continuous data that I would like to recode into a categorical data. How can I do this in SPSS?**

For example if you want to create a new categorical variable from *salary*, you first have to decide on the cut off values, that is,

Salary less than 20,750=Low Income (1)

Salary between 20,751 and 50,000=Medium Income (2)

Salary greater than 50,001=High Income (3)

To create the new category of salary based on these conditions, follow these steps carefully:

- From the menu bar select
**Transform->Recode Into Different Variables…** - Select
*current salary*[*salary*] and click on the arrow - In the
**Output Variable**area under**Name:**type*salacate*; under**Label**type*Salary Category* - Click on
**Change**. Click on**Old and New Values…** - In the
**Old Value**area, select**Range, LOWEST through value:**and type*20750*. - In the
**New Value**area, select**Value**and type*1*. - In the
**Old->New:**area click on**Add**. - In the
**Old Value**area, select**Range**: type*20751*and*50000*in the boxes respectively. - In the
**New Value**area, select**Value**and type*2*. - In the
**Old->New:**area click on**Add**. - In the
**Old Value**area, select**All other values**. - In the
**New Value**area, select**Value**and type*3*. - In the
**Old->New:**area click on**Add**. - Click on
**Continue**. Click on**OK**.

Notice that the new variable (*salacate*) has been added to the **Data Editor **and **Variable View** windows. Select the **Variable View** window and specify these **Values** and **Labels** for the variable: *1=Low Income*, *2=Medium Income* and *3=High Income*.

**How can I create cut-off values in SPSS using quartiles and then use the cut-off values to create groups based on the cut-off values?**

- To determine the cut-off values from SPSS menu select
**Analyze -> Descriptive Statistics -> Frequencies...**transfer the variable of interest of interest. - Click on
**Display frequencies table**to deselect it. - Click on
**Statistics**and click on**Quartiles**then click on**Continue**and**OK**.

Look at the output and it will give 3 cut-off values that you will use to create groups (quartiles). Now using the cut-off values follow these instructions to create the groups. Assumed that the cut-off values are 6.51, 7.27 and 8.77.

- From SPSS menu bar select
**Transform -> Compute Variable…**. - Under
**Target Variable:**type*group*(or a suitable name for your variable). - Under
**Numeric Expression:**type*1* - Click
**If…**and click the radio button next to**Include if case satisfies condition:** - Transfer the variable of interest (e.g.
*@3dNintakegd*). - Type
*<= 6.51*. The expression should now look like this*@3dNintakegd <= 6.51* - Click on
**Continue**and**OK**. - From SPSS menu bar select
**Transform -> Compute Variable…**. - Under
**Target Variable:**leave it as it is. Do not change it! - Under
**Numeric Expression:**type*2* - Click
**If…** - The expression to type is
*@3dNintakegd > 6.51 & @3dNintakegd <= 7.27* - Click on
**Continue**and**OK**. Click**OK**again. - From SPSS menu bar select
**Transform -> Compute Variable…**. - Under
**Target Variable:**leave it as it is. Do not change it! *16.*Under**Numeric Expression:**type*3*- Click
**If…** - The expression to type is
*@3dNintakegd > 7.27& @3dNintakegd <= 8.77* - Click on
**Continue**and**OK**. Click**OK**again. - From SPSS menu bar select
**Transform -> Compute Variable…**. - Under
**Target Variable:**leave it as it is. Do not change it! *22.*Under**Numeric Expression:**type*4*- Click
**If…** *24.*The expression to type is*@3dNintakegd > 8.77*- Click on
**Continue**and**OK**. Click**OK**again.

Examine the data file and you will see a variable called group with values of 1, 2, 3, or 4.

**I have two date variables in my data file and I want to calculate the time difference (time interval) between the two dates. How do I do that in SPSS?**

**Calculating time interval between two dates using Date and Time Wizard**

- From the menu bar select
**Transform -> Date and Time Wizard…**. - Select
**Calculate with dates and times**and click**Next**. - Select
**Calculate the number of time units between two dates (e.g. calculate an age in years from birthdate and another date)**and click**Next**. - Select
*date1*and click on the arrow next to it. - Select
*date2*and click on the active arrow. Select the appropriate unit under**Units:**(years, months, weeks, days, hours, minutes, or second). Click on**Next**. - Under
**Result Variable:**type a name for the new variable, e.g.*timeinterval1*. Under**Variable Label**: type appropriate label. Click**Finish**.

Notice that the new variable (*timeinterval1*) has been added to the **Data Editor **and **Variable View** windows.

**I want to print out the variable names, variable labels, value and value labels for an SPSS file.**

**In the past I used the 'Utilities' drop down menu and chose "variables". Now when I do this, the variable descriptions are merely printed to a dialogue box (one at a time) and I can't see how these descriptions can be put into a form which would be useful for printing. Any ideas?**

From the menu bar select **File -> Display Data File Information -> Working File**. This will generate an SPSS output file that you can then print. This output will have some information about your data file, we call this metadata.

**I am trying to compare 2 different methods testing the same function. I just cannot find the Bland Altman graph/ analysis on SPSS. Could you please email me as early as you can how to find this on SPSS.**

SPSS does not do Bland Altman graph directly. That is why you could not find it. You first have to find the *average* of the 2 different methods (*ave*). Secondly find the *difference* between the 2 different methods (*diff*). That is take away one measure from the other. Then produce the Bland Altman graph via **Graph -> Legacy Dialogs -> Scatter/Dot...** *diff* is your **Y axis** and *ave* is your **X-axis**. Then click **OK**.

**I want to calculate the sensitivity and specificity of a classification in 2 systems. If I want to know the specificity of 2 normal groups does that mean that I can't calculate the sensitivity? **

Most commonly people report the sensitivity and 1-specificity. You can calculate this in SPSS via **Analyze -> ROC Curve...**.

**I have a group of 5 variables and I want to calculate the average for all 5 variables per respondents provided the respondent have entries on all 5 variables. How do I do this in SPSS?**

This is best done using SPSS Syntax. Start the syntax window via **File -> New -> Syntax..**.Then copy and paste the syntax below into this window:

COMPUTE *ave*=MEAN.5(*var1*,*var2*,*var3*,*var4*,*var5*).

EXECUTE.

In this syntax you are creating a new variable called *ave* which is the average of the following variables *var1*,*var2*,*var3*,*var4*,*var5. *MEAN.5 means that calculate the average provided there are entries for all 5 variables.

**I am presently using SPSS to analyse my data but being unable to determine the p-value and the percentage variability of the dependent variable due to each principal component. Please, I would love to know if it's possible to determine the p-value and percentage variability using SPSS.**

The p-value in SPSS is normally shown under the column Sig. (short for significance). When you talk of percentage variability, I assumed you mean coefficient of variation (COV). This can easily be calculated for a single variable using this formula COV=(Standard Deviation/Mean)* 100.

You can also calculate COV as a ratio between two variables. To do this follow this instructions:

From the menus choose:

** Analyze -> Descriptive Statistics -> Ratio...**

Select a numerator variable.

Select a denominator variable.

Then click on the Statistics push button and select Mean Centered COV.

**I am having some difficulties with SPSS in the form of capturing data from a series of Excel files. I am asked for an ODBC driver login and password when using the database wizard. I have tried copying and pasting into SPSS but this has not worked and to re-enter the data would be a considerable duplication of time.**

The best way is to tell SPSS that you want to open an Excel file. You have to be within SPSS to do this. From the menu bar select **File -> Open-> Data...** Then under **Files of types:** specify Excel (*.xls). Now go to the directory where the file is stored to open it in SPSS. It will be best to now safe the file as an SPSS file.

**I'm a qualitative researcher. I need to randomise potential participants for our study can you advise how best to do that?**

The way to select a random sample will depend on what access you have on your potential participants. For example say you 100 potential participants you could identified each one with a number and use a software like SPSS to select a random sample for you.

Or you could simply use the toss of a coin, heads a participant is included and tails not included.

You could also use Table of Random numbers.

Any good statistics book will include random sampling techniques.

**How would you define inter quarter range (IQR)?**

IQR = Upper quarter – Lower quarter.

**I have data like this:**

** **

** stroke non-stroke**

**'n' sign present 79 25**

**'n' sign absent 100 180**

**Would be grateful if you could email me with a step by step method to come to the solution (creating 2 by 2 table, and computing Chi-square and Odds Ratio)?**

You need to enter your data as follows:

Var1 Var2 Var3

N Sign Present Stroke 79

N Sign Present Non-stroke 25

N Sign absent Stroke 100

N Sign absent Non-stroke 180

Because your data is in a summarised form you must tell SPSS that the numbers under *var3* are frequency counts from many respondents. Select **Data** -> **Weight Cases**

The **Weight Cases** dialog box will be loaded on the screen. Select the item **Weight cases by**. Click on the variable *var3* and on the arrow (**>**) to transfer it into the **Frequency Variable** text box. Click **OK**.

After your data has been correctly entered and you have weighted the cases, you can proceed to compute Chi-square and Odd Ratio using SPSS Crosstabs procedure as follows: **Analyze** -> **Descriptive Statistics** -> **Crosstabs**

The **Crosstabs** dialog box will be loaded on the screen. Click on the variable *var1* and on the top arrow (**>**) to transfer into the **Row(s) **text box. Click the variable *var2* and then on the middle arrow (**>**) to transfer into the **Column(s)** text box.

Click on **Statistics** to open the **Crosstabs: Statistics** dialog box. Select the **Chi-square** and **Risk** check boxes. Click on **Continue** to return to the **Crosstabs **dialog box.

**When I am working with SPSS it crashes on me. This has happened a few times, I don’t understand why.**

This problem may be related to your profile. Your profile need to be reset. Contact the IT Service Desk via via https://nuservice.ncl.ac.uk and ask that your profile be reset.

**I really don’t understand the difference between Fixed and Random Factors in Univariate or Multivariate analysis.**

There is a subtle difference between Fixed and Random Factors. Random Factors will usually represent a variable that have many possible choices from a given population while Fixed Factors represent a variable that have limited choices from a given population. As an example, consider an experiment that was conducted to study the effect of anxiety on a learning task. *Subjects* were assigned to one of two *anxiety* groups according to their anxiety measurement scores. The subjects were given four sets of *trails*, called block of trials. Here *subjects* will be a random factor while *trails* and *anxiety* will be fixed factors.

**How to Open an Excel file in SPSS?**

Since SPSS can read Excel file, it is best to open your Excel file directly in SPSS. Before you do this, make sure that your Excel file is clean, i.e. it does not contain graphs or other unnecessary text. In other words your Excel file should contain just the data in rows and columns. Also ensure that the first row contains the columns names.

To open a clean Excel file in SPSS follow these instructions:

Make sure that the Excel file you want to open is not already opened it Excel.

- Within SPSS from the menu bar select
**File -> Open -> Data...** - Under
**Files of type:**click on the downward pointing arrow next to**SPSS (*.sav)**and select**Excel**. - Under
**File name:**enter the name of your Excel file. (Note that you may need to browse to the folder that contains the file first!). - Click
**Open**. - If you have many worksheets in your workbook, make sure you select the correct one. Click on the downward pointing arrow to select the correct worksheet.
- Click
**OK**.

This should open your Excel file in SPSS.

You may need to do some modification before saving the file as an SPSS file.

**How to Save an SPSS File as Excel File**

- From SPSS menu bar select
**File -> Save As...**. - Under
**Files of type:**click on the downward pointing arrow next to**SPSS (*.sav)**and select**Excel 97 through 2003 (*.xls)**. - Give the file a name and save it in the folder you want.
- Now close SPSS. Open Excel and go to the same folder to open the file.

**Could you please tell me if there is any way to get the % in SPSS tables without decimals as I am dealing with number of patients or cases.**

Double-click on the table. Select the cells you want to change. Right-click on the selected cells. Select **Cell Properties** from the pop up dialogue box. Select the tab **Format Value**. Change **Decimals**: to 0 (zero). Click **Apply** and **OK**.

**I have a question regarding SPSS. I am trying to merge two different SPSS files using one identifier. The identifier in one file has some extra numbers that need to be cut out before both files have the same identifier. For example, the identifier in one file has the following value: AABBCC; and the identifier in the second file has the following value: 00AABBCC. I want to separate the "00" from the "AABBCC" so I can match the identifiers in both files. Can you advise on how to do this in SPSS?**

If the values of the identifier variable are the same length for all cases in the second file, then you can use this command in the **syntax** window. To open a syntax window select **File -> New -> Syntax…**.

STRING var1 (A6).

COMPUTE *var1*=CHAR.SUBSTR(*identifier*,3).

EXECUTE.

Where var1 is the new variable, and it will be added to your data file. Make sure that that the ID variable has the same name in the two files before you merge the files.

**How do I enter multiple response questions in SPSS data editor?**

Each choice of a multiple response question should make up a variable. For example, if there are three choices, you should create three variables. If a respondent select a choice, it is assigned a code of 1, otherwise 0. After this, you will need to define a set that contains all the variables you have created via **Analyze -> Multiple Response -> Define Sets…**.

**After I have defined my multiple response variables, how do I go about telling SPSS that the group of variables are really from a single question?**

- Choose
**Analyze -> Multiple Regression -> Define Variable Sets...** - Select and transfer all the variables that make up the question (set) to
**Variables in Set:**. - Type 1 next to
**Counted Value:** - Under
**Name:**type the name for the set. - Under
**Label**type a label for the set. - Click on
**Add**.

Define more sets as necessary. When you have finish click on Close.

Select **Analyze -> Multiple Regression -> Define Variable Sets...** Notice that **Frequencies** and **Crosstabs** are now available.

**How do I perform a Chi-Square Test with Multiple Response Variable?**

Define your multiple response variable via **Analyze -> Tables -> Multiple Response Sets...** Select all the variables that make up the set and transfer them to **Variables in Set:**. Specify the a *value in **Counted Value:**. Give your multiple response set a name under **Set Name:**. Click on **Add**. SPSS will append $ before the name. After you have defined your multiple response set, you can request Chi-Square via **Analyze -> Tables ->Custom Tables...** Click **OK**. Drag and drop one variable (e.g. *occupation*) into the **Columns** area. Drag and drop the other variable (*$setname*) into the **Rows** area. Click on the **Test Statistics tab** and select **Test of Independence (chi-Square)**. Click **OK**.

*usually 1 standing for Yes. But it depends on the codes you have used.

**I am trying to input a correlation matrix into SPSS using a syntax. I can't seem to get it to run. Could you offer any advice?**

This is an example (copy and paste the syntax into SPSS syntax window):

matrix data variables = rowtype_ t1 t2 t3 t4 t5 t6.

BEGIN DATA .

corr 1

corr 0.67 1

corr 0.29 0.29 1

corr 0.52 0.59 0.44 1

corr 0.43 0.38 0.33 0.56 1

corr 0.39 0.60 0.35 0.69 0.32 1

n 6 6 6 6 6 6

end data.

Factor /matrix= in (corr=*)

/format sort blank (0.5)

/print initail extraction rotation correlation det kmo repro

/plot eigen

/rotation varimax.

Just copy and paste this example into the syntax window and run. There are only 6 variables in the example (t1 t2 t3 t4 t5 t6). The sample size is 6.

## How is effect size calculated?

The effect size is just the standardised mean difference between the two groups. In other words:

#### Effect Size = [Mean of experimental group]-[Mean of control group]/ [pooled Standard Deviation]

If it is not obvious which of two groups is the ‘experimental’ (i.e. the one which was given the ‘new’ treatment being tested) and which the ‘control’ (the one given the ‘standard’ treatment – or no treatment – for comparison), the difference can still be calculated. In this case, the 'effect size' simply measures the difference between them, so it is important in quoting the effect size to say which way round the calculation was done.

**I wonder if you could let me know the best way to create a file that is easy for non-SPSS users to open and read, when starting with an SPSS 'output' files.**

From SPSS Output window you can export the file using various formats (e.g. Word, Html or pdf) via **File -> Export ...**. Make sure that you select **All visible.** Before clicking **OK** ensure that you have made note of the **File Name** (the path) where SPSS will export your file to.

**I have a dataset of just over 1000 sets of patient measurements, each one containing 192 data points.**

**The data are all numerical, numbers typically varying between 1 and 9.**

**Within each column of data, I can select cases (e.g. all cases >=5), which is useful for my analysis. (I do this by DATA – SELECT CASES, and then specify for each column of data to select if the value is >=5)**

**But, to do that seems to entail going through each column of data one by one and selecting all cases >=5…. and, I have over 1000 columns of data…. it will take forever!**

**Is there a way to select all values across the whole datasheet >=5 ?? **

Yes use this syntax:

The macro below will work. The macro assumed the names of your variables are var1, var2, var3, ........var1000. Note that you can either modify the names of your variables in your data file or modify **var** in the macro. The names of the variables in your data file and the macro MUST agree! Open your data file. Copy and paste the macro in the syntax window. Then do a test run for the first five variables. If you are happy with the results you can run it for all your variables by changing the last statement to: *macsplit arg1 = 1 arg2 = 1000*.

DEFINE macsplit (arg1 = !TOKENS(1) /arg2 = !TOKENS(1)) !DO !i = !arg1 !TO !arg2.

USE ALL.

COMPUTE filter_$=(!CONCAT(**var**,!i)>=5).

VARIABLE LABEL filter_$ !CONCAT(**var**,!i)>=5 (FILTER)'.

VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.

FORMAT filter_$ (f1.0).

FILTER BY filter_$.

EXECUTE.

*OTHER COMMANDS - DEPENDING ON WHAT YOU WANT TO DO...*

!DOEND

!ENDDEFINE.

macsplit arg1 = 1 arg2 = 5.

**I have over 100 variables and I want to produce bar charts for each variable. Is there a better way of doing this rather than doing it one variable at a time?**

You can do this through syntax. See the example below. This syntax assumes that the variables in the data file are named q1, q2, q3,......q100.

Define macdef (arg1= !TOKENS(1) / arg2 = !TOKENS(1)).

!Do !i = !arg1 !TO !arg2.

GRAPH /BAR(SIMPLE)=COUNT BY !CONCAT(q, !i).

!DOEND.

!ENDDEFINE.

macdef arg1=1 arg2=100.

**I forgot how I can find the sum of a group of variables in my data. Please provide the steps to follow:**

- Transform -> Compute variable....
- Under
**Target variable**type name of new variable you want to create (e.g*sum1*). - Under
**Function Group:**scroll down and look for and select**Statistical**. - Under
**Functions and Special Variables:**Look for and select**Sum**. - Click on the arrow to transfer Sum to the
**Numeric Expression:** - Now select the variables and use the other arrow to transfer them to Sum one by one separated by commas. When you finish Sum will be like this Sum(var1, var2, var3, var4). Click
**OK**.

These steps will create the new variable for you.

**How can I calculate the average (mean) of a group of variables and store the result as a new variable in my data file?**

- Transform -> Compute variable....
- Under
**Target variable**type name of new variable you want to create (e.g*average1*). - Under
**Function Group:**scroll down and look for and select**Statistical**. - Under
**Functions and Special Variables:**Look for and select**Mean**. - Click on the arrow to transfer
**Mean**to the**Numeric Expression:** - Now select the variables and use the other arrow to transfer them to
**Mean**one by one separated by commas. When you finish**Mean**will be like this**Mean**(var1, var2, var3, var4). Click**OK**.

These steps will create the new variable for you and store it in your data file.

**I have an SPSS query about table format. The two tables are analysing a variable that is the same for both samples of children. But if no-one scores in one response, then the response is missed from the table altogether, and in other cases there are blanks cells instead of zero scores.**

**Please could you advise how I can get the tables to return a zero when this is the true score.**

Make sure you specify the measurement level of the variables of interest as Nominal or Ordinal via the **Variable View window** under the column **Measure** before you use custom table.

If you want SPSS to return zero it is best to use the **Custom Table** procedure.

**Analyze -> Tables -> Custom Tables...**- Click
**OK**. - Drag and drop
*variable*to the column area. Drag and drop the other*variable*in the row area. - Click on
*variable*and under**Define**select**Summary Statistics**. - Select the statistics you want.
- If you want total for the row
*variable*, click on the row*variable*on**Custom Tables**dialogue box. Then select**Categories and Totals...**. Select**Total**under**Show**->**Apply**. - If you want total for the column
*variable*, click on the column*variable*on**Custom Tables**dialogue box. Then select**Categories and Totals...**. Select**Total**under**Show**->**Apply**. - Click
**Apply to Selection**. Then**OK**.

**I have been trying to figure out how to compare two data sets in SPSS all morning but getting nowhere! I was wondering if you would be able to help me or point me in the direction of where to get advice?**

I think the best way to ensure two datasets are identical would be to use the ADD FILES command to append one dataset to the end of the other and then to use the Identify Duplicate Cases wizard to see if they match.

So a more detailed breakdown:

First make sure each file has the same number of rows. If this doesn't match don't go further.

Use the menu **Data->Merge Files->Add Cases...**. Click **OK**.

Once the files are added from the menu bar select **Data -> Identify Duplicate Cases...** Transfer a maximum of 64 variables to the text area under **Define matching cases by:** Then click **OK**.

**I am a third year Trainee Clinical Psychologist. I am currently analysing my data for my thesis and need some advice/ help/pointers for writing a syntax file for SPSS for ****post-hoc comparisons. I am doing a mixed design anova with 2 between group factors and 2 within group factors. SPSS does not provide specific enough comparisons that both myself and two of my colleagues need. Where on earth do we start trying to generate syntax for this?!**

**Any advice or pointers would be gratefully received!**

Your syntax should look like this:

DATASET ACTIVATE DataSet1.

GLM resp1 resp2 resp3 pulse1 pulse2 pulse3 BY drug gender

/WSFACTOR=time 3 Polynomial

/MEASURE=resp pulse

/METHOD=SSTYPE(3)

/POSTHOC=drug gender(TUKEY)

/CRITERIA=ALPHA(.05)

/WSDESIGN=time

/DESIGN=drug gender drug*gender.

Note that:

*resp* is your first within subject factor with 3 levels and *pulse* is your second within subject factor with also 3 levels.

*drug* is your first between subject factor and *gender* is your second between subject factor.

**I have opened an SPSS file created in version 15 using version 17 and I get the warning message below. What does this mean?**

“Warning. Command name: GET FILE SPSS Statistics system file "U:\Gateshead Millennium Study\Angela\FAST

data analysis\y8_accelerometry_summary_data 30-10-09.sav" is written in a character encoding (utf-8) incompatible with the current LOCALE setting. It may not be readable. Consider changing LOCALE or setting UNICODE on. (DATA 1721) DATASET NAME DataSet1 WINDOW=FRONT”.

This is compatibility issue between two different versions of SPSS, they used two different encoding systems. If you have checked the data and it appears to have been read correctly then it should be okay to carry on working with your data. One way to check your data is to do descriptive statistics on one variable in the file in version 15 and repeat the same analysis in version 17. If the output are the same then the file was read correctly in version 17.

**I need some statistical training can you point me in the right direction?**

Contact the training managers in your faculties to arrange training:

Humanities and Social Sciences (HaSS): robin.humphrey@ncl.ac.uk Ext: 6763

Medical Sciences (FMS): richard.hetherington@ncl.ac.uk Ext: 7874

Science Agriculture & Engineering (SAgE): g.e.de.blaquiere@ncl.ac.uk Ext: 5901