1. Home
  2. Select items from CSPro survey file

Select items from CSPro survey file

To import CSPro data two files need to be supplied: CSPro data dictionary (*.dcf) and an associated data file. When the CSPro data dictionary file is opened you are prompted with a dialog where the records are selected. Once the records have been selected an associated data file should be supplied. This dialog will appear after the associated data file has been opened. It can then be used to select items from the selected records.

Item List

This gives a list of the items in the selected records (Import Items), whether the column will be converted to a factor (Factor) and how missing value codes will be handled for each item (Missing code as *).

Items that are selected will be imported. The selection of an item can be toggled by clicking on the box associated with the record, or by double clicking the item name. This can also be set for the items by using the Include or Exclude buttons.

The setting for Factor for each item is set initially based on the options selected in Select Records dialog. These can be modified for individual items by either double clicking the Yes, No options in the column for by using the Factor or Variate or Text buttons.

The setting for Missing code as * for each item is set initially based on the options selected in Select Records dialog. These can be modified for individual items by either double clicking the Yes, No options in the column for by using the Genstat missing value or Numeric code buttons. If an item has no CSPro missing value code, then the option for that column will display as ‘-‘.

Include

Select (tick) the current item or selection of items so that these are included in the import.

Exclude

Deselect (remove tick) the current item or selection of items so that these are excluded in the import.

Factor

Set the attribute for Factor column to Yes for current item or selection of items so that these are made into factors.

Variate or Text

Set the attribute for Factor column to No for current item or selection of items so that these are made into a variate or a text column (depending on the type of the CSPro item).

Genstat missing value

Set the attribute for Missing code as * to Yes for current item or selection of items so that for these items, the CSPro missing value codes are converted into a Genstat missing value (*).

Numeric code

Set the attribute for Missing code as * to No for current item or selection of items so that for these items, the CSPro missing value codes are left as numerical values.

Select All

Select all the items in the list. Items can also be selected using the mouse or with the arrow keys with the shift button.

Create sheet containing value set info

A separate sheet is added to the workbook containing 7 columns (Record, Item, ValueSet, From, To, Label, Special) containing all the value set information. Record, Item and ValueSet are factors giving the names of the record, item and value set for each group, From and To are variates giving the ranges (or single value if To is set to a missing value) for each group, Label is a text giving the label for each group, and Special is a factor indicating whether the group is a special item (Missing, NA or Other).

Create separate factors from value sets

If this option is selected, for each item with value sets, a column just containing the numerical or text information, untranslated is read in, and then for each value set with more than 1 group, a factor column is created. The names of the factor columns are the names of the value sets in CSPro. If this option is not selected, then just a single factor column is created using the first value set for that column. For example, if a column P04_AGE has value sets P04_AGE_VS2 and P04_AGE_VS3, if this is selected then you will get a variate column P04_AGE and two factor columns P04_AGE_VS2 and P04_AGE_VS3, but if not set then there will be just one factor column P04_AGE created using the value set information in P04_AGE_VS2.

Leave empty factor levels

When updating the data into the Genstat server you generally get a warning if groups in a factor are empty (ie there is a level defined in the factor with no cases within the factor). If this option is selected, then you will get no warning about empty groups, otherwise you will be prompted to remove the empty groups.

Merge records into one sheet

If this option is selected, all the data from the different strata in the survey will be merged into a single sheet, otherwise the data with be on separate sheets – one for each stratum in the survey.

Create unknown group for value set omissions

If a value set does not cover the full age of the values in the column then this option gives a choice of making the values outside the defined groups either into Genstat missing values (option not ticked) or into a separate group with label ‘Unknown’.

Duplicate factor labels

If two groups in a CSPro value set have identical labels, this option tells Genstat how to process these:

Combine The groups with duplicate labels will be combined and use the level from the first group
Rename The labels from the duplicate groups will have a numeric suffix ‘(2)’ etc add to the label
Ignore The groups will be left separate but with the same label

Action Icons

Clear Clear all fields and list boxes.
Help Open the Help topic for this dialog.

Example

Click here for an example of importing a CSPro survey.

See also

The CSPRO procedure can be used to import data directly into the server.

Updated on May 16, 2019

Was this article helpful?