Complex Files: Pasting And Cutting With SPSS

1y ago
3 Views
2 Downloads
995.05 KB
22 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Sutton Moon
Transcription

Complex Files: Pasting and Cutting with SPSS Data Liberation Workshop April 25, 2001 Université de Montréal

Dealing with Complex Files by Pasting and Cutting with SPSS Hands-on Session The purpose of this workshop is to introduce you to the procedures needed to deal with complex files—that is, files that come in pieces and files that are combined. Note: These exercises use drive and path names for Carleton University Library’s setup. You will be given the correct drive and path names at the workshop. Please do not assume that, if you use the drive and path names below, the program will work. By the same token, if you use this as a guide back at your institution, you will have to modify the drive and path names to suit your setup. Pasting with SPSS – Separate Hierarchical Files The General Social Survey, Cycle 13, Victimization, is a good example of separate hierarchical files. For the purposes of this exercise, we’ll be using the Main and Incident files. What we’d like to determine is who in terms of gender and language, reports the largest amount of property stolen during a crime. To begin, double-click on the SPSS icon, then click on File, Open and Data. 2

Next, choose gss13incsub.sav. This is the Incident file for the GSS 13. It contains records of the incidents reported by the respondents. Data for the respondents is contained in the Main file. 3

Look at the first column of numbers, recid. You’ll notice that some id’s are missing and some have more than one record. That’s because not all respondents reported an incident, while others reported more than one. Since we’re interested in combining information from the respondent with these data, we’ll now match this file to the Main file. To do this, go to Data, Merge Files and Add Variables. Highlight and open gss13mainsub.sav. 4

Now comes the tricky part. Tick Match cases on key variable in sorted files and External File is keyed table. Finally, highlight recid[ ] and, using the bottom arrow button, move it into the Key Variables box. Click OK. Note: Both files are already sorted so that recid is in order. If this is not the case, you must first sort and save both files. You will receive the following warning whether or not the files are sorted. 5

Click OK. The matched file will look like this: Now the file must be weighted. Because the person is the unit of analysis, the appropriate weight is wght per. To weight the file, go back to Data and Weight Cases. 6

Tick Weight cases by and move wght per into the box. Click OK. Harking back to last year’s training, you will recall that when you are looking at the relationship between a nominal variable and an interval variable, the SPSS procedure that is appropriate is Means. Go to Analyze, Compare Means and Means. 7

Highlight Estimated Value . and move it into the Dependent List box. Next, highlight Language of Interview and Sex and move them into the Independent List box. Click OK and answer the following questions: What is the mean (average) estimated value of all property and cash stolen as reported by: males females those answering the questionnaire in French those answering the questionnaire in English What percentage of the population reported a loss of cash or property? (Hint: look at the summary box at the top of your output and check for the percentage of cases included.) If you were an insurance company, whose premiums would be highest? 8

Pasting with SPSS – Split Files Many of the DLI files come in pieces. This is usually done for data management reasons. Data may be collected monthly or by region and the files may be disseminated that way. Users, however often want the entire file. This exercise will show you how to use SPSS to put the files together. Unlike the separate hierarchical files, each of these files has exactly the same variables. SPSS is used to add them together, one after the other. For our purposes, we’ll look at the Canadian Travel Survey, 1998 and just use the winter travel file. This file combines the person and trip files (as above, but conveniently already done by Statistics Canada). The question to answer here is twofold: first, do males and females differ in the reasons they travel in the winter and second, who, males or females, spends more on travel? First things first—we need to put the files together. Again, open SPSS (File, Open, Data) and retrieve cts-jan-pt.sav. Then return to Data, Merge Files, but this time, Add Cases. 9

Open cts-feb-pt.sav. The following screen will appear. 10

Simply click OK . Repeat the process with cts-mar-pt.sav. You will now have the person-trip files for January, February and March combined in one file. (If you wanted the full annual file, you would simply repeat the steps until you had all twelve components.) Because the files have identical variables, there is no need to go through the more laborious matching procedure. Once again, the data must be weighted if the results are to be valid. The correct weight for this file is ptripwt. Go to Data and Weight Cases. Tick the Weight cases by circle and move Person-trip weight into the box. Click OK. Answering the research question will require two different operations. The first question asked about whether males and females differed in the purpose of their trip. Both variables here are at the level of measurement. That means using to look at the differences. (You can either try to recall last year’s workshop, or just look below at the screen shots.) Go to Analyze, Descriptive Statistics and Crosstabs. 11

Move Gender into the top box and Main Purpose into the bottom. Next, click on Cells. 12

Tick Row and click on Continue. Then click OK. Overall, did more males or females travel? Who traveled more to visit friends and relatives? Are males or females more likely to travel for business? What about pleasure trips? We are also interested in the amount of money spent on travel. Since Statistics Canada reports the exact amount, the variable is at the level of measurement. The most appropriate procedure to use when one variable is nominal and the other is interval is . Go to Analyze, Compare Means and Means. 13

Move Total Reported Trip Expenditures into the Dependent List box and move Gender into the Independent List box. Click OK. What is the average (mean) amount of money males spent on trips? How much, on average did females spend? Can you think of a logical reason for the difference? 14

Cutting with SPSS – Combined Hierarchical Files The final exercise is an easy one. But sometimes things are too easy. You’ll see what is meant shortly. We’re looking at who’s more accident-prone, men or women. To do that, we have a subset of the General Social Survey, Cycle 3: Personal Risk. The first task is to open the file. Invoke SPSS by double-clicking on the SPSS icon. To begin the exercise, click on File, Open and Data. 15

Highlight gss3sub.sav and click on Open to open the file. To see what the variables are, you can either refer to the dictionary, move your cursor slowly over the variable names or toggle to Variable View by clicking the tab at the bottom of the worksheet. GSS Cycle 3 is a hierarchical, combined file. As such, it contains records pertaining to persons, crimes and accidents. Each crime and accident is associated with a particular person. However, the converse is not true. If a person had not either experienced a crime or had an accident in the year previous to the survey, s/he would have no crime or accident variables associated with him or her. Thus, it is extremely important to know just what unit of analysis you are using and to use the appropriate flag and weight associated with that unit of analysis. The documentation at the front of the Users’ Guide (the part that many people seem to skip) outlines this (pp. 35-42). Unfortunately, skipping this can have serious consequences. The exercises below show this clearly. Let’s get back to the research question: Who is more accident-prone, men or women? And in what categories? For our purposes, we’ll use some of the variables that measure different types of accidents(C2A NO to C6 NO), as well as the total number of accidents (C7 NO) and, of course, DVSEX, the gender variable. 16

To belabour a point, you will recall that when you are looking at the relationship between a nominal variable and an interval variable, the SPSS procedure that is appropriate is . Once again, before we start, we need to weight the data. Because we’re analyzing people, we’ll use the person weight, or Weight32. Go to the data editor, click on Data and Weight Cases . Then choose Person weight and make sure the Weight cases by circle is marked. Use the right arrow to move the variable into the box and press OK. 17

Next, move to Analyze, Compare Means and Means. You will see the following: 18

Highlight any three “accidental” variables and move them into the Dependent List box. (To see the full text of the variable label, run your cursor slowly over the list.) Next, choose the total number of accidents and add it to the same box. Last, choose the gender variable and move it into the Independent List box. Click OK. Using your output, answer the following: Type of Accident Total Accidents Female Average Male Average Canadian Average How many males are represented in the survey? How many females? Given that the Canadian population was just 25,000,000 in 1986, and that the GSS only interviews folks over the age of 15, this seems a little high. That brings us back to the flag variable. Because individuals, accidents and crimes are combined in this file, we are counting some people more than once. To correct for this, we need to use the flag variable. Go back to the Data Editor and click on Data and Select Cases. 19

You will bring up the following box: 20

Mark the If condition is satisfied and click on the If button. Move the Occurrence flag variable into the box and add 1 after it. Press Continue. You will return to the previous box. Press OK. This will select only the first occurrence of each individual in the file. Now run through the previous exercise and answer the same questions. Type of Accident Total Accidents Female Average Male Average Canadian Average How many males are represented in the survey? How many females? You can see that the number of cases and the scores in your two exercises were quite different. Yet there was no error message to warn that something was wrong. The moral here is to be sure to read the documentation. This is especially true when it comes to complex files. Now we can answer the research question—who is more accident-prone, males or females? Were there any areas where this was the reverse? 21

Pasting with SPSS – Longitudinal Files This section is included for completeness. We will not be using an example file or doing an exercise. The file will work, however, IF you provide the correct paths and filenames and IF you specify the correct matching variable/identifier. It will run on either SPSS for Windows in Syntax mode or on UNIX. If you are uncomfortable using syntax files and would rather use Windows, simply follow the steps for Separate Hierarchical files, omitting the Table portion. ***** sample SPSS syntax for combining longitudinal or panel files. This file will work with both SPSS for Windows and UNIX. You will need to specify the correct path, filenames and identifier (id number). ******. get file 'drive:\path\input1.sav'. sort cases by identifier. sort cases by identifier. xsave outfile 'drive:\path\sort1.sav'. execute. get file 'drive:\path\input2.sav'. sort cases by identifier. xsave outfile 'drive:\path\sort2.sav'. execute. match file file 'drive:\path\sort1.sav' /file 'drive:\path\input.sav' /by identifier. save outfile ’ 'drive:\path\matchedfile.sav'. execute. 22

To do this, go to Data, Merge Files and Add Variables. Highlight and open gss13mainsub.sav. 5 Now comes the tricky part. Tick Match cases on key variable in sorted files and External File is keyed table. . Pasting with SPSS - Split Files Many of the DLI files come in pieces. This is usually done for data management reasons.

Related Documents:

CNC PLASMA CUTTING MACHINE 3000X1500MM CUTTING TABLE MODEL: FLASHCUT/AC200 Plasma cutting machine with a 3000x1500mm cutting table TECHNICAL DATA: Power Voltage: 220V/380V, 50HZ Effective Cutting Width (mm): 1500 Rail width(mm) 1800 Effective Cutting Length (mm):

While "thermal cutting" would include plasma cutting, "oxyfuel cutting" would not. In many, and perhaps most cases, the use of the more restrictive term "oxyfuel cutting" was not selected to exclude plasma cutting but rather identified only the older technology that was in use before plasma cutting existed or became popular.

2.0 Smoothcut Plasma Cutters 8 2.1 Fundamentals of Plasma Cutting 8 2.2 Process operation 9 3.0 Plasma cutting components 10 3.1 Plasma cutting power sources 10 3.2 Plasma cutting capacity 10 3.3 Plasma cutting torches 10 3.4 Air supply 11 3.5 Process comparisons 11 3.6 Earth cable assembly 11 4.0 Cutting Technique 12 4.1 Cutting 12

2. Multi Point Cutting Tool The cutting tools may also be classified according to the motion as follow: 1. Linear motion tools 2. Rotary motion tools 3. Linear and Rotary motion tools 3. VARIOUS TYPES OF SINGLE POINT CUTTING TOOLS AND THEIR USES 3.1 Tools for Lathe machines: 1. Turning tool 2. Facing tool 3.

Hardox and Weldox are easily cut by the plasma cutting process. Plasma cutting has a limitation when it comes to material thickness and the main thickness to be cut is below 50 mm (plasma cutting machine dependent). Ge-nerally features for plasma cutting can be seen in table 4. Tabel 4. General features for plasma cutting. Figure 7 shows .

CC-S1 CNC cutting controller is used for flame and plasma cutting machines. 2. Controller features 1.2.1 CC-S1 CNC cutting controller is used for flame and plasma cutting machines. 1.2.2 It has a reliable design, anti-plasma interference, lightning proof and surge proof. 1.2.3 It has perfect flame/plasma cutting technology.

of the laser systems used for cutting. Section 4 summarises the chemistry of laser cutting and Sections 5 and 6 address the issues of, and novel laser technologies for the cutting of thick plate. 2. GENERAL ASPECTS OF LASER CUTTING The process of laser cutting may be considered as a sequence of the following mechanisms:

An industry code of practice is approved by the Minister for Commerce. It takes effect on the day specified in the code or, if no day is specified, on the day it is published in the NSW Government Gazette. An approved industry code of practice may be amended from time to time (or it may be revoked) by publication in the gazette. An approved industry code of practice is designed to be used in .