2010-08-16
QPL Reference Manual

Four types of files may be exported from the main administrative page:

After clicking on one of the export file links you will go to a second page that lets you select various options that control how the file will be created. Then click on the Download button to build the export file. When the file has been created, your browser will display a download dialog box that you can use to specify where the file will be copied on your computer. You can also use it to change the name of the file. (The content analysis link will not appear on the main project administrative page until you have used the content analysis functions to code responses to open-ended questions.)

The cases included in the export data files are set by the System Administrator on the Default Project Settings page and by default will not include records created by test accounts.

You also have the choice of exporting the original data as entered by the respondent (i.e., the "raw" data) or the a copy of the data where answers that were made that are off of the respondent's skip path are reset to missing values (i.e., the "clean" data). The export file names will include "raw" or "clean" to indicate which version of the file it is.

myproject-raw.dat
myproject-clean.dat

In this example, the original QPL program name was myproject.pg6, so the project name is "myproject". And the fixed file export name will be myproject-raw.dat when exporting the original data, and myproject-clean.dat when exporting the cleaned copy of the data.

The QPL-generated SAS and SPSS programs are created using the file name without the raw or clean information (ex., myproject.dat), so you will need to modify the program to use the file you have chosen for your analysis.

Fixed Format File

The fixed format file option produces an ASCII text file where the system variables and the responses to your questions are stored in defined "column" and "card" locations. The QPL compiler automatically defines the record layout when you build your questionnaire web site.

Unlike other data file types, a fixed-format data file contains no information about how the data is structured. A program must be written that defines how the data should be read from the file.

The QPL converter builds SAS and SPSS programs that can be used to with these statistical software packages to read and analyze the fixed format data file. You must have one of these packages to run the SAS or SPSS programs that QPL generates.


Building a SAS or SPSS Program to Read a Fixed Format File Using HomeSite

1. Open your project's source QPL program (i.e., the "pg6" file) in HomeSite.

2. Check the "CONVERT Options" line that may appear near the top of your program. Some of the options here affect how the SAS or SPSS program will be created. For example, the "/dv" option tells the QPL converter to not define the specified questions when creating a SAS or SPSS program. (Note: In this case, the data is still in the data file; it is just not read by SAS or SPSS because it has not been defined in the program that reads the file.) See Summary Statistics Report and Statistical Program Options for a complete list of all of these options.

3. On the QPL tool bar, click on the "Build SAS system program" button (Build SAS Statistical Program) to build the SAS program or click on the "Build SPSS system program" button (Build SPSS statistical program). The resulting program will have the same name as your source questionnaire program, but will have a ".sas" or ".sps" file name extension, according to the type of file you created.

Building a SAS or SPSS Program to Read a Fixed Format File Using the Console Tools

Using the console window in your project directory, run the qpl_convert program with the "/sas" or "/sps" option to build a SAS or SPSS program that will read the fixed format data file that you exported.

C:\myjob> qpl_convert job.qpl /sps

In this example, the project file called job.qpl, will be converted into an SPSS program called job.sps.

See Summary Statistics Report and Statistical Program Options for a complete list of all of the qpl_convert options.

Next Steps

You may now take this program file you generated, with the data file you exported, and run it in the SAS or SPSS systems to begin the analysis of your data.

You can edit the program file that QPL generates to edit the variable labels (the first 255 characters of the question text with any HTML tags removed) and the value lables (the first 40 characters for SAS or the first 60 characters for SPSS of multiple choice question answer lables.)

Responses to open-ended questions are not included in the fixed format file. Instead, the questions are defined in the SAS and SPSS programs as numbers. And field in the fixed format data file for these questions contains the number of characters a respondent entered in the text box in the questionnaire. (If you are interested in analyzing the open-ended responses in more detail than is provided by default in the on-line Summary Statistics report, see the discussion of the askSam file below and the Content Analysis functions.)

Tab-Delimited File

A tab-delimited file is an ASCII text file which uses (1) tab characters (ASCII code 9) to separate question responses and (2) line feed and carriage return characters (ASCII codes 10 and 13) to separate all the responses to each questionnaire.

This is a generic data file that can be loaded into many different applications, such as Microsoft Excel.

The Export Tab Delimited File options page lets you select the system variables and questions that will be included in the data file.

Here are a few important points about the tab-delimited file generated by the QPL Export function:


askSam Import File

An askSam import file is an ASCII text file that is specially formatted so it may be easily imported into the askSam software system and manipulated. askSam provides a combination of text-retrieval and database manipulation capabilities that are useful for analyzing the open-ended text comments gathered in a QPL questionnaire.

Here are a few important points about the askSam import file generated by the QPL Export function:

Content Analysis

The Review and Reconcile options listed on the Export askSam Import File page are only important if you are also conducting a content analysis on one or more of the STRING and OPENEND questions. These options let you specify which reviewer's content analysis tags to include in the askSam export file or, if you select more than one reviewer, how multiple tags from different reviewers will be combined for each response in the askSam export file.

If content analysis tags have been applied to a STRING or OPENEND response, three new fields will be added at the end of the askSam document for that record that show the results of this analysis for that question for each respondent.

Q33_TAG[ Flexible_schedule
         Primary_benefit_to_GAO
         Primary_benefit_to_employee ]
Q33_AGREE[ NO ]
Q33_NUM_REVIEWERS[ 2 ]

In this example, question Q33 was tagged. The new askSam fields, Q33_TAG[, Q33_AGREE[, and Q33_NUM_REVIEWERS[ were automatically created when the file was exported.

Importing an Exported File Into askSam

1. Follow the links on the main administrative page to export an askSam import file.

2. Launch askSam.

3. On the Start dialog box,

4. On the Save New File dialog box,

5. Delete the "Enter a Name for Your Database" page, if necessary. (This page appears as the first page of your askSam Version 4.1 and is not needed for this particular application.) On the menu at the top of the askSam window,

6. On the menu at the top of the askSam window, select File > Import...

7. On the Import dialog box,

8. On the Import Status dialog box, click the "Close" button after all the documents have been imported. (Note: The document count listed here should match the number of questionnaire records.)

9. Use the "Automatic Field Recognition Wizard" to define how the data is structured.

Now you can browse your data interactively, using the functions on the Action menu, or build complex reports that search, sort, and extract specific information using Tools > Reports... functions. (See askSam Help for more information.)

Content Analysis Tab-Delimited File

If you are conducting a content analysis on one or more of the STRING or OPENEND questions, you may use this function to export the topic tags as numerically coded data in a tab-delimited file. This is a generic type of data file that can be loaded into a variety of data analysis packages including SAS or SPSS. You can analyze the tags using just this file, or you can match the tag records to the main questionnaire record (using the q_id value) to compare responses, for example, to the MULT questions with the tags that were applied to STRING and OPENEND questions.

The Export Tag Data page lets you select which revierwer's tags to export or, if you select more than one reviewer, how to merge multiple tags for particular responses. You may also choose to include the response itself in this data file.

The tag names will be used as column names in the first row of the tab delimited file. Each row in the data file represents one set of tags for one response to one question.

q_id»q_varname»q_agree»q_num_reviewers»Do_Not_Know_Much_About_Program»Family_friendly»Flexible_schedule»...
1»Q33»0»2»1»1»0»1»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0
1»Q34»1»2»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»1»0»0»0»0»0»0»0»0
2»Q33»0»2»0»0»1»0»1»1»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0
2»Q34»1»2»0»0»0»0»0»0»1»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0
3»Q33»1»2»0»0»1»0»0»1»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0
3»Q34»1»2»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»0»1»0»0»0»0»0»0»0»0

The » character shows where tabs will be inserted between columns in the data file.

The q_id column shows the system case identification number that identifies a particular respondent.

The q_varname column shows the name of the question to which the tags apply. In this example, two questions were tagged for case #1: Q33 and Q34.

The q_agree column shows whether all of the reviewers agreed on all of the tags that were applied for each particular case and question (1=agreed, 0=disagreed).

The q_num_reviewers column shows how many reviewers looked at each question.

The following columns show that tag data for each tag (1=tag applied, 0=tag not applied).

The text of the response would be added at the end of each line if that option was selected.

If the tag data was exported for a single reviewer, that reviewer's comments would also be included in the file after the q_num_reviewers column. The reviewer's user name is used to name their comments column.

The system allows one tag to be associated with any number of questions, and tags can be associated and un-associated with any question at any time during the analysis process. (Un-associating doesn't remove any tags that may have been applied while it was 'on' unless the designer removed them.) So, because of this over-lapping ability, it exports one file with all the response records labeled by record id and question name and with all of the tag values for each response. You will likely need to first filter the rows and columns that you happen to be interested in before you can apply your analysis procedures.