Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Tuesday, January 18, 2022 at 22:59

This tutorial is a basic guide for GNU PSPP. Divided into three exercises, we hope this will be sufficient for beginners to understand the basics. Now let's start PSPP!

Subscribe to UbuntuBuzz Telegram Channel to get article updates.

What we will learn

The objective of this tutorial is to analyze a dataset of imaginary students, male and female, by  age around 20, who either know or don't know about GNU/Linux operating system. For that purpose, we will do the following:

- Install GNU PSPP
- Run PSPP
- Getting Started to the User Interface
- Learn Basic Navigations
- First Exercise

  • Download a CSV file
  • Import CSV file
  • Edit the variables
  • Save document as SAV file
  • Get dataset ready for analysis

- Second Exercise

    • Do a descriptive analysis
    • Get the analysis output

    - Third Exercise

    • Export the output into various file formats including Writer's, Calc's, PDF and Web Page

    These should be enough as starter.


    How To Install PSPP

    On Ubuntu, do the following command line to install PSPP:

    $ sudo apt-get install pspp

     

    Run PSPP

    Open applications menu and run PSPP from there.

    Alternatively, on the Terminal run command line below.

    $ psppire 


    Getting Started to the User Interface

    PSPP looks very similar to another program called IBM SPSS. Its window is divided into two parts, main and output.

    From the top to bottom:

    • Menubar, consists of menus starting from File to Help.
    • Toolbar, consists of buttons starting from Open to Show Labels.
    • Value display, area for data content to be displayed, similar to formula area in Calc documents.
    • Data area, area for data to be displayed and edited. If variable view is enabled, it will display variables instead.
    • Statusbar, area to display information like case counter, filter use, weight status, and split file.
    • Data view, the mode for displaying data rather than variables.
    • Variable view, the mode for displaying variables rather than data.

    (PSPP main window)

    Learn Basic Navigations

    Here's a few basic navigation skills you will often use on PSPP.

    • Import data file:

    Click menu File → Import Data. 

    • Show labels instead of their numeric values:

    View → Value Labels.

    • Do descriptive analysis: 

    Analyze → Descriptive Statistics → Frequencies. 

    • Switch between data view and variable view:

    View → Data and View → Variables.


    First Exercise

    We will do our first statistics exercise with PSPP as the following. 

    1. Download the dataset file in CSV format below:

    statistika.csv

    If you cannot download it, copy it from last section of this article.

    2. Run PSPP > go to menu File > Import > open the CSV file.

    3. On first page, select All Cases.

    4. On second page, select the second line of dataset > select the option Line above selected line contains variable names.


    5. On next page, select Comma (,) as the separators.


    6. On last page, click Apply.

    7. First landing, you will see PSPP displays this dataset as Variable View on the main window and detailed information on the output window. Switch to Data View to display the dataset in normal table view. To this point, your dataset is not ready yet, except you edit some variables first. Note that Output Window will always opened and recording everything you do on PSPP and that's normal.


    8.  Open Variable View > edit Label column to follow the corresponding Name column > edit Value Labels like pictured below > click menu File > Save As > give it name statistika.sav.


    9. Open Data View > your dataset is ready.

    10. Still in Data View, click menu View > Value Labels > your dataset displayed in human readable form, that is, the numbers switched into values.


    To this point, you finished the first exercise. 


    Second Exercise

    We will do descriptive analysis with the dataset we already had.

    1. Make sure you are opening the dataset.

    2. Go to menu Analyze > Descriptive Analysis > Frequencies. 

    3. On the Frequencies dialog, from left to right, first move Age, second move Gender, and third move KnowGnuLinux by clicking triangle button. You should have the three variables in correct order. 


    4. Click Charts button > enable Draw Histogram, Draw Bar Charts, Draw Pie Charts > click Continue.

    5. Click OK. 

    6. Output window will open.

    Based on our dataset and analysis, this output is divided into three. First is the analysis of age:


    Second is the analysis of gender, and:


    Third is the analysis of whether the students know about GNU/Linux operating system or not:


    Third Exercise

    Now, as the final exercise we will export our output into different document formats. We can save it as Comma Separated Values (CSV) file, save it as SPSS file, as Writer document (can also be opened with Word), as PDF, and also as web page (can be opened with web browser) aside from print it out to papers.

    0. Create a folder named pspp-output to save the files.

    1. Make sure you are still opening the output window.

    2. Click menu File > Export > click Infer file type button at bottom left > select SPSS Viewer (.spv) > give it file name statistika and put it inside 'pspp-output' folder > Save > file saved as statistika.spv

    Note: this file format can be opened with both PSPP and SPSS.

    3. Click menu File > Export > select Comma-Separated Values (.csv) > give it file name statistika > Save > file saved as statistika.csv

    Note: this file format can be opened in PSPP, SPSS, Calc, Excel and text editor.

    (PSPP output opened in text editor)


    (PSPP output opened in Calc)

    4. Do similarly to point 3 but select format OpenDocument (.odt) > file saved as statistika.odt.

    Note: this file format can be opened in LibreOffice Writer and Word as well as further can be edited resulting in PDF and various other formats.

    (PSPP output opened in Writer)

    5. Do save but select format PDF (.pdf) > file saved as statistika.pdf.

    Note: this file format can be opened in PDF reader programs. 

    6. Do similarly but select format HTML (.html) and save > file saved as statistika.html.

    Note: this file format can be opened in web browser programs. By PSPP latest version, this is the best format to view and print out from.

    As a result, you should get several output documents like pictured below. 

    (All PSPP output files shown in file manager)

    To this point, you finished all exercises. Good for you as a start! Please continue your study with more books or tutorials. 

     

    Dataset

    If you cannot download the CSV file above, copy this dataset below, paste it in your text editor program, and save it as statistika.csv.

    Name,Age,Gender,Address,KnowGnuLinux,Source
    Adi,20,1,Mojokerto,1,3
    Cinta,21,2,Sampang,2,2
    Iqbal,22,1,Surabaya,1,3
    Maulana,22,1,Jombang,2,4
    Andre,22,1,Jember,1,3
    Citra,21,2,Gresik,2,1
    Lilia,20,2,Surabaya,2,2
    Cipto,20,1,Ponorogo,2,2
    Wayan,20,1,Bandung,2,3
    Dedi,20,1,Surabaya,2,1
    Silvie,22,2,Surabaya,1,1
    Nana,22,2,Malang,1,2
    Budi,21,1,Bondowoso,1,3
    Rizki,20,2,Pasuruan,2,4
    Huda,20,1,Lamongan,2,3
    Wawan,20,1,Kediri,2,3
    Dani,20,2,Kediri,2,3
    Toni,20,1,Mojokerto,2,3
    Joko,20,1,Gresik,2,3
    Wulan,21,2,Mojokerto,1,1
    

    Happy studying! 


    This article is licensed under CC BY-SA 3.0.