Unit 4 - Data Modification

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Unit 4 Data Modification

Objectives
To successfully complete this learning unit, you will be expected to:
1.

Remove cases.

2.

Understand the data editor function.

3.

Remove variables.

4.

Insert cases.

Learning Activities
u04s1 Studies
SPSS Help Tutorial
Pull down the "Help" menu in SPSS, and go through the "Using the Data Editor" tutorial.

Be sure to always notice there are two modes of view for the data editor, the "Variable View" and the
"Data View" tabs at the lower left of the screen.

Be sure to understand that SPSS data can be entered and changed by typing directly into the data
editor. Your text author only prefers to use other methods.

Adding and Deleting Cases and Variables in SPSS

Launch Presentation |

Transcript

Adding and Deleting Cases and Variables in SPSS


Please view this presentation for a demonstration of how to use the Data Editor to add and remove cases and
variables.

Assigning Random Numbers

Launch Presentation |

Transcript

Assigning Random Numbers


This presentation demonstrates how random numbers are assigned to each case. A new variable is created that
contains the random number for each case.

Creating Randomly Assigned Groups: Detailed Instructions

Launch Presentation |

Transcript

Creating Randomly Assigned Groups


This presentation shows how to use the RECODE command along with a random number variable to randomly
assign cases to two groups. Notice that the random number is sorted from lowest to highest value. Then a value that
falls between the two cases that separates the groups in the sequence is chosen. All values of the random number
below that value are given the group number 1. All above that value are given the group number 2. The only purpose
of the "44.01" on the second cut value is to make it slightly different from the original value of 44. This is not important
for practical purposes. The value of 44 could actually be used, but you can see it is ambiguous as to which group a
random number of 44 would be assigned to. If there were a 44 (but we chose 44 because there is not one) it would
actually be assigned to group 1 by SPSS. Remember the presentation is an example, and all values will be different
in your assignment.

u04d1 Data Modification


While the procedures explored in this unit are useful, there are risks associated with them. Prior to the advent of the
Data Editor, the contents of the data file were not directly accessible from the screen. In some statistical packages,
the software displays the data in a way similar to the Data Editor, but the data cannot be altered from the viewer.
Describe one risk you see in these features and ways to avoid the problems you describe.

Response Guidelines
Read the posts of other learners and respond to at least two by elaborating on the problems and solutions described.

Resources

Attributes and Evaluation of Discussion Contributions.

Professional Communications and Writing Guide.

u04a1 Modify a Data File and Create a Random Variable


Create a Unit4 subdirectory in your psy7615 directory.

Download the unit_4.sav data file from the Resources into your Unit4 subdirectory.

Open unit_4.sav in SPSS and perform the following operations.

Delete the cases with ID number 10543 and 29320.

Add a case with ID number 19345, with the following data:


gender=1, IQ=72, class=4, pets=0, test1=34.

Delete the variable "level1".

Assign random numbers to each case using the COMPUTE command with the RV.UNIFORM(?,?)
function.

Create two randomly assigned groups using the RECODE command (see presentation and detailed
instructions in Resources).

Save the file as unit_4_modified.sav into a Unit4 subfolder inside your psy7615 directory. Attach this file to your
assignment.

Resources

Modify a Data File and Create a Random Variable Scoring Guide.

Randomly Assigning Groups: Detailed Instructions

"unit_4.sav"

You might also like