How to use SPSS

© All Rights Reserved

7 views

How to use SPSS

© All Rights Reserved

- Anova en SPSS
- Untitled
- 2.pdf
- Case 9 Uniform Uniforms
- Teste 1 EXE3
- Investigating pianists’ Individuality in the performance of five timbral nuances through patterns of articulation,Touch,Dynamics,And pedaling
- bufalo
- Surveillance of Milk Adulteration and It
- parametric and non parametric test
- sw4810 syllabus fall 2014
- sw 4810 syllabus fall 2015 9 9 15
- Deconstructing Barriers to Access Higher Education: A Case Study of Students with Disabilities in University of Delhi Shalini Saksena 20
- ANOVA N-Way
- Quantitative Data Analysis
- Values of Tomorrow's City Managers
- PTCG_HandS_April0808.pdf
- Chi squre
- freqspss.pdf
- sw 4810 syllabus fall 2015 9 9 15
- Prominence of Knowledge Management in Indian Biotechnology Trade

You are on page 1of 6

Using SPSS and PASW/SPSS syntax - Wikibooks, open books for an open world

What Is Syntax?

Syntax is computer programming language. SPSS use a specific form of syntax that is unique to SPSS.

Although the nature of SPSS does not require that you utilize syntax, it can be your friend. Knowledge

of syntax is particularly beneficial if you are repeating the same task in SPSS with different variables; it

can save you from tedious, repetitive clicks.

Using the example data set on genetic counselors, suppose you want a frequency table for the variable

attend because you want an idea of how often genetic counselors are attending religious services. In

SPSS click Analyze Descriptive Statistics Frequencies (this is covered in more depth in

Chapter 14). Select the variable attend. After you click continue, this should show up in your output

window:

Now, suppose you want a frequency table of the variable relig in order to see what religions many of

the genetic counselors identify with. You could repeat the above procedure but choose relig instead of

attend. Or you can use syntax.

To begin using syntax, go to File New Syntax, like this:

http://en.wikibooks.org/wiki/Using_SPSS_and_PASW/SPSS_syntax

1/6

5/21/2015

Using SPSS and PASW/SPSS syntax - Wikibooks, open books for an open world

This window is the Syntax Editor window and it allows you to control the many statistical tests available

in SPSS (and many other functions) using programming language rather than point and click mouse

movements.

One of the easiest ways to get started using syntax is simply to change your Preferences in SPSS to

include syntax in the Output Window (see Chapter 7). You can then use that syntax to run the same

commands or similar commands in the Syntax Editor window.

Returning to the example... Since we want to run the frequencies on the variable relig, we can start by

returning to the original output window where you can copy the syntax from your original command just

above the frequency table. The syntax is located in the red box below:

http://en.wikibooks.org/wiki/Using_SPSS_and_PASW/SPSS_syntax

2/6

5/21/2015

Using SPSS and PASW/SPSS syntax - Wikibooks, open books for an open world

To copy the syntax, you will have to double-click on it, then select it and hit CTRL+C (the copy

command in most operating systems). Now return to the Syntax Editor window and paste the syntax into

the blank syntax window you have already opened, it should look like this:

While it is beyond the scope of this chapter to explain all of the syntax commands available in SPSS, the

above commands are relatively straightforward. Let's begin with the first word:

FREQUENCIES

This is a command that will tell SPSS which statistical test to perform. In our case, we simply want

Frequencies. The second word is paired with an equals sign and includes our variable of interest:

VARIABLES=attend

This is a modifier for the first word, FREQUENCIES, that tells SPSS which variables will be analyzed.

The last part of the syntax simply tells SPSS how to organize the analysis and output:

http://en.wikibooks.org/wiki/Using_SPSS_and_PASW/SPSS_syntax

3/6

5/21/2015

Using SPSS and PASW/SPSS syntax - Wikibooks, open books for an open world

/ORDER=ANALYSIS.

The period . at the end of ANALYSIS tells SPSS that is the end of a series of commands, so the

software knows where this small program ends.

Now, erase the word attend and replace it with the word relig, which is the name of the religious

affiliation variable in our example dataset, and click the blue arrow which tells SPSS to run the syntax.

The blue arrow is circled below:

The new frequency table for the variable relig should pop up in your output box. Voila! You have

successfully run a small computer program using SPSS syntax. Your output window will now have

frequencies for both variables and should look like this:

http://en.wikibooks.org/wiki/Using_SPSS_and_PASW/SPSS_syntax

4/6

5/21/2015

Using SPSS and PASW/SPSS syntax - Wikibooks, open books for an open world

This same idea of copying the syntax and using it in the Syntax Editor to quickly run repetitive tasks can

be illustrated using several of the variables in the example data set. Let's pretend you want to know if the

religiosity of genetic counselors varies by their attitudes towards women obtaining abortions. In our

sample data set there are seven variables examining attitudes toward abortion, each for a different

reason. You could run the ANOVA seven times, pointing and clicking through the menus each time for

each of the seven abortion attitudes variables. Or you can run it once, copy the syntax, paste it six times

into the Syntax Editor, and simply replace the independent variable with the other six abortion attitude

variables.

To run the initial ANOVA, click Analyze Compare Means One-Way Anova (covered in

more detail in Chapter 21). For the dependent variable, you would select relscale and in the Factor

box (which is where the independent variable goes), put the first abortion attitudes variable, abpoor.

Run the test and you'll see this:

Now, if we wanted to see if the religiosity of genetic counselors varies by their attitudes towards women

getting abortions because they are single and do not wish to marry the father of their unborn baby

(absingle), we begin by copying and pasting the syntax from the ANOVA statistical test in the Output

Window into the Syntax Editor window. Replace the variable abpoor with the variable absingle. The

syntax window should look like this:

If you wanted to, you could also copy this syntax and paste it five more times, then replace the abortion

attitudes variable in the syntax each time. When you're ready, run the test, click Run. (Note: You can

run all six tests at one time by highlighting them all and selecting Run.) In your Output Window you

http://en.wikibooks.org/wiki/Using_SPSS_and_PASW/SPSS_syntax

5/6

5/21/2015

Using SPSS and PASW/SPSS syntax - Wikibooks, open books for an open world

Once again, genetic counselors' religiosity varies by their abortion attitudes. However, regardless of

whether or not the results show there is no significant relationship, what is important is that you can save

time and energy by using syntax, particularly when you have a repetitive task you need to run many

times. This chapter has only scratched the surface of syntax in SPSS; it can be used to run the entire

program, avoiding the Data Editor window almost entirely. It should also be noted that other statistical

software, like SAS and R, rely much more heavily on syntax. SPSS is known for being more userfriendly as it allows people to point and click to run tests.

Chapter contributed by Victoria Blyde.

Retrieved from "http://en.wikibooks.org/w/index.php?

title=Using_SPSS_and_PASW/SPSS_syntax&oldid=1884043"

Text is available under the Creative Commons Attribution-ShareAlike License.; additional terms

may apply. By using this site, you agree to the Terms of Use and Privacy Policy.

http://en.wikibooks.org/wiki/Using_SPSS_and_PASW/SPSS_syntax

6/6

- Anova en SPSSUploaded byvsuarezf2732
- UntitledUploaded byibrahimullah33
- 2.pdfUploaded byGag Paf
- Case 9 Uniform UniformsUploaded byVatsal Magajwala
- Teste 1 EXE3Uploaded byrui
- Investigating pianists’ Individuality in the performance of five timbral nuances through patterns of articulation,Touch,Dynamics,And pedalingUploaded byDianaPianist
- bufaloUploaded byJesus Quetglas
- Surveillance of Milk Adulteration and ItUploaded bySyedFaridAli
- parametric and non parametric testUploaded byAnkita Jaiswal
- sw4810 syllabus fall 2014Uploaded byapi-284406278
- sw 4810 syllabus fall 2015 9 9 15Uploaded byapi-312648765
- Deconstructing Barriers to Access Higher Education: A Case Study of Students with Disabilities in University of Delhi Shalini Saksena 20Uploaded byVaishnavi Jayakumar
- ANOVA N-WayUploaded byanjo0225
- Quantitative Data AnalysisUploaded bykalos
- Values of Tomorrow's City ManagersUploaded byŞenol Mumay
- PTCG_HandS_April0808.pdfUploaded byzilangamba_s4535
- Chi squreUploaded byAgus Setyo Utomo
- freqspss.pdfUploaded bySalman Butt
- sw 4810 syllabus fall 2015 9 9 15Uploaded byapi-310782911
- Prominence of Knowledge Management in Indian Biotechnology TradeUploaded byGlobal Research and Development Services
- 02 Sample Syllabus Undergrad One SemesterUploaded byBruno Marins
- Tre Marin 2017Uploaded byClee
- COMBINED-TOOLS.docxUploaded byvanessa anotay
- pt_02Uploaded byRozi Yuda
- Two Way Anova (18 Ms Pt Amd 03, 18 Ms Pt Amd 14)Uploaded byEngr Mujahid Iqbal
- A study on class & sex on exercise prescription of HRPFKT in high school and higher secondary school students in kerala, India.Uploaded byIJAR Journal
- inferential statistics- brenda arellanoUploaded byapi-221860675
- Sparse Unif TestUploaded byDaniels Pictures
- The Effectiveness of Different Treatment Methods to Curb Smoking AddictionUploaded byAzreZephyr
- applied_statistics_on13May2016.pdfUploaded byRam Iyer

- art%3A10.1007%2Fs10549-015-3293-7Uploaded byMohammad Safiqul
- Lecture 28 - 3rd Asessment - Sedatives, HypnoticsUploaded byapi-3703352
- 1766104_635010808135917500Uploaded byMohammad Safiqul
- Preeclamptic Pregnant WomenUploaded byMohammad Safiqul
- Users Guide to HapmapUploaded byMohammad Safiqul
- Endog Pge2 f2a TnfaUploaded byMohammad Safiqul
- Arachidonate ReactionUploaded byMohammad Safiqul
- Advantages of ChemotherapyUploaded byMohammad Safiqul
- LungUploaded byMohammad Safiqul
- _pdf-3Uploaded byMohammad Safiqul
- k4Uploaded bySajid Khan Sadozai
- RFLPUploaded byMohammad Safiqul
- lect14Uploaded byMohammad Safiqul
- Breast cancerUploaded byMohammad Safiqul

- marked final FUZZY_LOGIC_BASED_FOREST_FIRE_DETECTION_USING_WSN.docxUploaded byPankaj Mahatha
- Crack Width Example problem solvedUploaded bySuhail Ahamed
- PowerQuery-PowerPivot-DAX.pdfUploaded byJuank Pulecio Reyes
- Simulation_Choosing_Solver.pdfUploaded byNarendra Palande
- Math lesson 5_5.pdfUploaded bycermatika
- 153091360-Fluid-Bed-Drying.pdfUploaded bysouhir gritli
- Mastec Placement Paper | Freshers ChoiceUploaded byfresherschoice
- graduation numeracy brochureUploaded byapi-105885756
- Theoretical Models of Social MediaUploaded bymaine
- ElectrollhuyUploaded byAbhinav Mishra
- lab3Uploaded byMayank Agarwal
- Monitoring FBDUploaded byAwalunisa Istiqomah
- Autocorrelation 01-07-2012Uploaded byInamullah Khan
- Contribution of Great Mathematician S.ramanujan in MathematicsUploaded byVikas Mehta
- (II) MECHANICAL Syllabus and SchemeUploaded byMuthu Kumar
- R30D Drehwinkelaufnehmer EnUploaded byJay R SV
- Assignment of RM2.Uploaded byRana BIlal
- unit 3 family letterUploaded byapi-292860997
- 1. Questions & Answers on Magnetic CircuitsUploaded bykibrom atsbha
- ComplexUploaded byAnonymous l1WYNnGp
- The Challenge of Self-regulated Learning in Mathematics Teachers' Professional TrainingUploaded byadyan_95336
- Convert Logarithms and Exponentials.pdfUploaded bywienslaw5804
- 770650 ExplainationsUploaded byRahul Paul
- LC Handbook Complete 2Uploaded byspmoralesa
- Eamcet Qr Chemistry Sr Chem 08.Thermodynamics 133-153Uploaded byJagadeesh Goli
- Herzen, Selected Philosophical WorksUploaded byv_koutalis
- D1 Specimen PaperUploaded byhallixrap
- Phan 2016Uploaded byTarek Bmr
- Revision Psy10005Uploaded bydanika
- Deepsoil User Manual v6Uploaded byJoy Mondal