Using FHWAR Relational Data Entities

Introduction

 

Human dimensions survey data are commonly stored in flat files where the rows correspond to individuals and the columns are variables. As the number of variables increases (e.g., 1,000+) or when compressed variables are used, the complexity of understanding the data increases substantially. Beaman and Vaske (2008) demonstrate how data from the 2006 national survey of Federal Hunting, Fishing, and Wildlife-Associated Recreation (FHWAR) can be restructured into relational entities to facilitate analyses and interpretation.

 

This document provides access to the relational data entities and SAS code and SPSS syntax developed by Beaman and Vaske to illustrate using the data.

 

Background

 

The 2006 national survey of Federal Hunting, Fishing, and Wildlife-Associated Recreation (FHWAR) is distributed by the U.S Fish and Wildlife Service on a CD (contact: pubs@fws.gov) containing three ASCII “text” files:

 

  1. Screening data
  2. Sportsperson (fishing and hunting) data
  3. Wildlife Watcher data

 

See U.S. Department of the Interior [USDI], Fish and Wildlife Service, and U.S. Department of Commerce, U.S. Census Bureau [USDC] (2006) for a complete description of the methodology, http://www.census.gov/prod/www/abs/fishing.html.

 

The 2006 Screening file contains 144,509 records and 56 variables. The Sportsperson file includes 21,942 records with 3,765 variables. The Wildlife Watcher file has 11,285 records and 772 variables. Many of these 4,500 plus variables carry information about the values of three variables in a single variable (e.g., “days” of participation is combined with an “activity” such as big game hunting in a particular “state”). These “compressed” variables cannot be directly analyzed by statistical software commonly used by human dimensions researchers. Decompression is required to access all FHWAR data involving state specific responses. When groups of compressed variables in the Sportsperson data file are uncompressed to blocks of 50 states, there are about 20,000 FHWAR variables.

 

A Relational File Structure for FHWAR

 

For illustration purposes, Beaman and Vaske (2008) constructed four relational entities:

 

  1. PERSON
  2. SPORTSPERSON
  3. HUNTING_ACTIVITY
  4. TRIP_EXPENDITURES

 

The PERSON entity has data about persons in the U.S. and includes: six control variables (e.g., Person_Weight, Census_Division), (b) 10 demographic variables (e.g., Age, Sex), (c) eight hunting variables (e.g., Hunted_2005), (d) eight fishing variable (e.g., Fished_2005), (e) six residential wildlife watching variables (e.g., Home_Observe_2005), and (f) five non-residential wildlife watching variables (e.g., Trip_Watch_2005). All variables in the PERSON entity were obtained from the Screening data.

 

Sportsperson flat file data were used to create three entities: SPORTSPERSON, HUNTING_ACTIVITY, and TRIP_EXPENDITURES. The SPORTSPERSON entity contains: (a) six control variables (e.g., Person_ID, Sportsperson_Weight), (b) 11 demographic variables (e.g., Age, Sex), and (c) 15 national summary variables (e.g., Hunted_2006). Information from the compressed variables in the original flat file structure and other hunting activity information are in the HUNTING_ACTIVITY entity. The HUNTING_ACTIVITY entity replaces 840 compressed variables with 12 variables. The TRIP_EXPENDITURES entity reduces 844 compressed variables to 10 variables (e.g., Trip_Expend_Categories, Dollars). TRIP_EXPENDITURES contains all FHWAR fishing and hunting trip expenditure responses.

 

Some variables appear in more than one entity. Person_ID, for example, provides the “key” for linking the entities. Sportsperson_Weight is included in SPORTSPERSON, HUNTING_ACTIVITY, and TRIP_EXPENDITURES because this weight applies to these entities. Demographic information is included in both the PERSON entity and the SPORTSPERSON entity. Although the purist might argue that such repetition is not necessary, the goal was to facilitate analysis. Similarly, the “HUNTING_ACTIVITY” is actually a collection of tables to encourage using the FHWAR data.

 

A complete description (and frequencies) of all variables in the four entities can be found in the Excel file:

 

Entities – Variable-names – Variable-labels – Value-labels – Frequencies.xls

 

Beaman and Vaske (2008) illustrate the advantages of restructuring the FHWAR flat file data structure as a PERSON, SPORTSPERSON, HUNTING_ACTIVITY and TRIP_EXPENDITURES relational databases:

  1. Approximately 1,750 Sportsperson flat file variables were reduced to fewer than 60 variables.
  2. Obtuse variable names in the flat file were replaced with intuitive names.
  3. Most important, in contrast to the compressed flat file variables that cannot be directly used in SPSS or SAS, variables in the relational entities can be used in analysis.

 

Entity Data Files

 

All four data entities are available as SAS and SPSS files:

 

Entity SAS filename SPSS filename
PERSON Person.sas7bdat Person.sav
SPORTSPERSON Sportsperson.sas7bdat Sportsperson.sav
HUNTING_ACTIVITY Hunting_Activity.sas7bdat Hunting_Activity.sav
TRIP_EXPENDITURES Trip_Expenditures.sas7bdat Trip_Expenditures.sav

 

To download these files, right click on a “filename”, select “Save Target As…” and save to a directory of choice.

 

SAS code and SPSS syntax

 

Beaman and Vaske (2008) describe three examples to illustrate using the relationally structured FHWAR data. To download the SAS code and / or SPSS syntax associated with their figures right click on a “filename”, select “Save Target As…” and save to a directory of choice.

 

Figure number: SAS code SPSS syntax
Figure 3 Figure_3_Syntax.sps
Figure 4 Figure_4.sas Figure_4_Syntax.sps
Figure 5 Figure_5_Syntax.sps
Figure 6 Figure_6.sas
Figure 7 Figure_7_Syntax.sps

 

Some of the figures in Beaman and Vaske (2008) illustrate the steps in combining variables from different entities (MATCH FILES in SPSS) for a specific analysis. For example, to test the hypothesis that Wyoming males are more likely to have hunted in 2006 than Colorado males, data from both the PERSON and SPORTSPERSON entities were combined. Although the MATCH FILES syntax is straightforward, individuals who primarily use the drop down menus in SPSS may find it more convenient to have demographic and trip expenditures or hunting activity variables in a single entity. To encourage the use of the entity databases, two additional entities were created in both SAS and SPSS (see Vaske & Beaman, 2008):

 

Hunting_Activity_and_Demographics.sas7bdat

Hunting_Activity_and_Demographics.sav

 

Trip_Expenditures_and_Demographics.sas7bdat

Trip_Expenditures_and_Demographics.sav

 

As the names imply, these entities combine the demographic variables with the variables in the HUNTING_ACTIVITY and TRIP_EXPENDITURE entities.

 

Using the SPSS files

 

Value and variable labels have been incorporated into the SPSS entity data files. The syntax files assume that the data have been stored in “C:\Stats\” Data files created by these syntax files are also saved to “C:\Stats\” These statements can be changed to a directory of choice.

 

Using the SAS files

 

Because SAS is not trivial to use, the following illustrates one approach for setting up SAS to recognize the data entities and associated SAS formats.

 

The FHWAR SAS files have formats for variables. These must be recognized to open the data files and associated labels and formats. To download the formats file, right click on FHWAR_SAS_formats.sas and select “Save Target As…” to a directory of choice. For novice SAS users, it is often easier to save all of the files to a single directory.

 

Step 1 – Creating a SAS library

 

The SAS data need be saved into a SAS “library”. To create a library in SAS:

 

  • “Right click” on the “Libraries” icon in the left window (see below)
  • Select “New”
  • In the “New Library” dialog box:
  1. Type in a library name of no more than 8 characters (e.g., FHWAR)
  2. Check the box “Enable at startup”
  3. “Browse…” to select the directory where you saved the SAS FHWAR data.

 

 

 

Step 2 – Accessing the SAS Formats

 

The FHWAR SAS files have user written formats for variables that assign value labels. Formats must be recognized by SAS to open the data files.

 

From the main menu bar of SAS, click:

File

Open Program…

Navigate to the directory where the data and SAS formats have been stored

Open “FHWAR_SAS_formats.sas”

 

In this example, FHWAR_SAS_formats.sas was stored in C:\FHWAR – 2006\FHWAR06. This directory can be changed to a directory of choice.

 

Highlight the statements below and click the “Run” button��

 

*——————————————;

%let format_library=C:\FHWAR – 2006\FHWAR06;

libname library “&format_library”;

*——————————————;

 

The following message will be displayed in the SAS log file:

 

 

 

Once the “library” for formats is created:

  1. Return to the SAS editor window with FHWAR_SAS_formats.sas.
  2. Highlight from “Proc format library=library;” to “Run;” (i.e., the end of the file)
  3. Click the SAS “Run” icon.

 

The formats will be “permanently” stored for future use.

 

Subsequent Analyses

 

With formats permanently stored, every time you restart SAS and want to use FHWAR data, you must access a file with the lines below, highlight the lines (or your equivalent directory) and click the run button:

 

*——————————————;

%let format_library=C:\FHWAR – 2006\FHWAR06;

libname library “&format_library”;

*——————————————;

 

Every time you run the lines you should get the
“NOTE: Libref LIBRARY was successfully assigned…” .