Time commitment
5 - 10 minutes
Description
The purpose of this video is to introduce viewers to the basics of using SPSS, including how to open files, navigate between Data View and Variable View, and set up essential metadata for proper data analysis. It also covers key features such as labeling data, managing value labels, and handling missing data.
Video
Transcript
[Slide shows screenshot of SPSS with the File menu open.]
So the first thing I'm going to show you is how to actually open a file in SPSS if you've never done that before. It's similar to a lot of other softwares; in the very top left corner, you click the “File” button, you click “Open”, and then you click “Data”.
[Slide updates to show a second screenshot of SPSS beside the first with the Open Data dialogue box open.]
There's one trick to this that you might not be familiar with if you haven't used the software before: so if you click File > Open > Data, it will open a dialogue box, kind of like the File Explorer on your computer, and you can go through your file folders and find today's file which is called “Fake_Data.sav”. Because it's a .sav file, you should be able to find it pretty easily. The trick I was telling you about is, let's say you're not working with an SPSS file, it's not a .sav, you have to remember to click where it says “Files of type:” and change this from “SPSS Statistics (* .sav, * .zsav)” to “all file types”. The default in SPSS is to only look for SPSS files so .sav
but if you have something that is not a .sav, so let's say you've got an Excel file (an .xlsx), or let’s say you've got a .csv file, you just have to say I'm looking for all of my files and then you'll see it in this main box.
So what you do is you click on the file you want to open and you click “Open” and it should open in the software for you.
[Open button highlighted in the dialogue box.]
If you got it to work properly – you're welcome to open our fake data file for today or if you don't have SPSS yet, just sit and listen – if you open it, it should look something like this.
[Slide shows SPSS open with the Data View worksheet tab selected.]
So it looks kind of like your typical Excel spreadsheet, where it's got columns of data, and it's got rows, and it's got a lot of information inside of it.
So this is what we call “Data View”; in the bottom left hand corner, we’re in data view right now. Data view looks like an Excel spreadsheet.
Generally in SPSS, you want one column per variable (so columns going up and down), and you want one row per observation (rows going across the page).
This is called wide format and the format you need depends a little bit on which software you're using and a little bit on the test that you're trying to conduct, but generally we want this specific format. So each row would be one observation, so it could be: if you're working with people, it could be one person; if you're working with families, it could be data for one family; if you're working with cells, it could be one cell line; if you're working with animals, it could be a dog or a horse. One row per each observation.
Alright, so what we should notice here is that each column (which is vertical, or up and down) is labeled. So at the very top here, I've highlighted “Gender”; gender is going down the page, we've got male participants and female participants.
We can actually toggle back and forth between data view and variable view.
[Worksheet tabs are highlighted. The tabs from left to right are Overview, Data View, and Variable View.]
So I just said data view is in columns. If we switch to variable view by clicking the bottom left corner that says “Variable View”.
[Slide shows screenshot of SPSS in Variable View with the first row highlighted.]
We'll see now that that same gender column from data view is now a gender row in variable view. So it's all the same information, but what variable view is doing is this is your additional metadata. If you don't know the term metadata, it's additional information about the columns of data from data view. So it's not just your numbers or it's not just your text, there's extra information here for you.
So now we can see that each row (which is horizontal, or side to side) is labeled with the same labels that were columns in data view.
Alright, I'm going to stress something here. The important thing you need to remember about variable view is that your metadata must be set up properly in order for your analyses to be done correctly. So we're going to talk about this a little bit today and a little bit next week, but we have to make sure our data is set up properly or else we might run something accidentally or we might not be able to run something that we should be able to run, but the data is not set up right.
So the next thing I'm going to do, is I'm going to show you a little bit about some of the metadata here in variable view.
[Worksheet tabs are highlighted with Variable View still selected.}
So again, data view versus variable view, variable view is the metadata.
[Slide continues to show SPSS in Variable View with the Label column highlighted.]
So the first thing I'm going to show you is the label column. I cannot overemphasize the importance of appropriately labeling your data, and this is really important as well if you're finding Data online. So let's say you're working with Statistics Canada data, you downloaded a dataset: some of the names might not be very informative, it might say something like “age_group”. Well, without a label (more information about what's actually in that variable), you don't actually know what age group is, you just know that there might be some groups of age.
So in variable view, you can actually add labels to each of your columns from data view to add more information for the humans reading your spreadsheet.
So for example, I have a label here for the gender column that says 0 means male and 1 means female.
It's extra information, so if you're sharing your data with someone, whether that's an advisor or a teammate, or someone else who's going to pick up the project once you're done with the project, they can then read the labels to understand what's actually happening in that piece of data.
So this is very important if you're planning to share this data with others, whether you're planning to put it in a repository or whether you're planning to share it with your research team.
[Slide shows Variable View with the Value Labels dialogue box open. In the background the Values column is highlighted.]
Okay, the next part I'm going to talk about, is SPSS values, which is right beside labels.
So in values, we generally use this for categorical data, and we'll talk about different data types in our next task / our next class, but values essentially – categorical means you've got different buckets of information: you can be male, you can be female, you can be non-binary. Those are different buckets.
Something like age could be in different groups, so it could be in buckets of like 10 to 20, 21 to 30, 31 to 40. Or it could be continuous data anywhere from 10 to 40.
So values, really great for those buckets, those categories, and what this is used for is: SPSS works best with numbers.
[Cursor highlights the Value Labels dialogue box with an editable table with two columns, Value and Label.]
So if you had male and female data, you'll probably actually input that in SPSS with the numbers 0 and 1, but that's confusing sometimes because if you're just looking at a spreadsheet with 0s and 1s, you don't remember which one’s which, or if you pass it to someone else, they don't know which way you coded it, so you can add labels, i.e., some text, to say what does 0 mean, what does 1 mean?
So it's just making sure that you can use your spreadsheet in a little bit more of a user-friendly way.
The 0s and 1s are great for the computer, the male and female labels are great for us as humans, and you can add more labels than just two.
So if I had 0 means male, 1 means female, 2 means non-binary, you can add as many labels as you need.
[Slide shows two screenshots of the spreadsheet shown side by side.]
The excellent thing that even if you've used SPSS before, you might not know this, is if you've set up your value labels properly, and you go back to data view (so you click that button in the bottom left corner), right now, the gender column should say male and female, but if I click this button in the top section it kind of looks like a crossroads [Value Labels button is highlighted], it's like an “A” on the top and a “1” off to the side, if you click that button, you can actually toggle back and forth between text and numbers. [Spreadsheet on the left provides an example of text values and the spreadsheet on the right provides examples of numbers.]
So if you click it once, it'll say male / female and then it will switch to 0 / 1. If you click it again, it will go back and say male / female. So it's just another way that you can use SPSS into slightly more user-friendly fashion if you've set up those labels and those values correctly. So it's just a way to toggle back and forth so that the computer can read it and you can read it.
Okay. The last big piece of metadata I'm going to talk about in today's section is actually missing data.
[Slide shows SPSS in Variable View. The Missing Values dialogue box is open in the foreground. In the background a data cell is highlighted in the Missing column.]
So, what do you do if, let's say you've done a survey, your participants have filled out your survey, but some people missed a few questions or didn't want to answer a question. How do you deal with that in SPSS?
So in data view, you might have your columns of data. So let's say we've got our gender column. Let's say one of the participants didn't indicate their gender, so we've got no data for them; it might just be a decimal point in data view. You can actually change that value, you can say “999”, for example. You want this to be a value where it's very clearly not a real value for that piece of data. So, our gender variable is 0 and 1, our missing data could be 999 because that's very clearly not a 0 or a 1.
If you filled in those missing pieces of data in data view, so 999 for example, you then come to the metadata, so you can tell SPSS, look, anytime there's a 999, that's not a real value, it's missing. Treat it like it's missing. Don't use it for the analyses I'm planning to run.
So what you do is you would go to the gender column, or the gender in this case, row, gender, row, the column that says missing. You'd click where it says “None”, and it will pop open a dialogue box says “Missing Values”.
[Missing Values dialogue box contains three radio buttons. The first reads “No missing values.” The second reads “Discrete missing values.” The third reads “Range plus one optional discrete missing value.”]
You would click the “Discrete missing values” button and input the number 999, because what you have potentially done is filled in any missing data with a value that says this is missing, 999. And then you click “OK” and SPSS would then treat that value like it is missing, so any analysis you do will be dropped from the analysis. It won't use any of the 999s. SPSS will be smart enough, because you've told it 999 is missing, it will say okay cool, I won't use that.
Alright, I think that's everything I'm going to talk about today for data view, variable view, opening files.
So, we've covered today: how to download SPSS if you don't already have it, we have covered how to input some metadata and format your data in a way that's helpful for analyses, and we've also opened a file for the first time in case you've never done that.
One of our last slides here is if you're looking for some additional workshops or if you're looking to book an appointment, I've linked those on this last red slide so that you can come back at anytime and be like, oh, I didn't quite understand that, I need some more help, or maybe there's another workshop you want to do, or maybe you want to come meet with me because you're doing something like a t-test or a correlation, you're like I need some help with that.
[Closing slide reads, “Questions? Contact us. UG Library. lib.uoguelph.ca. library@uoguelph.ca.”]
License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
- Ask Chat is a collaborative service
- Ask Us Online Chat hours
- Contact Us