How to get Quantum data from mrInterview

Last Updated on Wednesday, 21 January 2009 07:06 Written by Admin Wednesday, 21 January 2009 07:06

There are still a lot of people around doing the analysis of surveys using Quantum or other tools needing data to be in some fixed ASCII format. To get the data into this format you need to provide the location for each bit of information in terms of card/column definitions. This can be done using MDM2Quantum.

As the first step we need to be clear about how this information is stored in the metadata. The best way of understanding this is probably to look at the MDMExplorer. If you open a MDD file with this tool you will find a tree view of this structure its contents. There are different collections of objects belonging to this survey definition.

MDMExplorer

MDMExplorer

One important collection is named “fields”. It does contain the top level question elements. Amongst those there are some special objects containing themselves again another collection of fields. These special objects are called Grid questions or Loop questions or Compound questions (and some other). Even the field collections in these objects may contain again such complex objects. But in most cases there will be just one or some simple questions inside these objects.

Grid Question in MDMExplorer

Grid Question in MDMExplorer

The reason to talk about these structures is to think about the questions in this loop/grid (or other) will need as many data locations as there are repetitions of these questions. So the columnisation (that’s how we call the information about the location where the data is stored) cannot be applied at this place.

Variable Instances

Variable Instances

In the MDD file there is another collection named “VariableInstances”. In this collection each repetition of a question is stored as a single element and by this the collection does only contain a flat list of questions. Here you will find the columnisation information in the collection “Custom Properties (Datasource)”.

Custom Properties (Datasource)

Custom Properties (Datasource)

As there may be different data sources needing columnisation information the contents of this collection is depending on the setting for the current data source. So in MDMExplorer you will only see an already applied columnisation if the current data source is set to the according element.
If you want to use e.g. the mrPunchDSC for exporting data from an mrInterview project into the Quantum format you need to make sure to have the proper card/column information in the MDD file in your user folder. There are three different ways getting the data in Quantum format from the server:

  1. Provide the columnisation information in the MDD before you activate the project for the interviewing. From practise this will not be a usable way in the most cases, as there tends to be no time for adding this information before launching a project.
  2.  When the project is running, take a copy of the current version of the MDD file – i.e. check out the MDD from the project – and download the file to your local machine. Apply the columnisation using MDM2Quantum and upload the MDD file back to your users folder. Now you can run the data export as this is going to take the MDD from your private folder.
  3. Download the MDD as described above and add the columnisation. At the end of the project download the data in e.g. DDF format. Make sure not to overwrite the prepared MDD you already have stored locally. Now run an export script (using mrStudio or simply WinDMSRun) using the prepared MDD (for the input datasource AND the output datasource!) to create the Quantum data.

All three ways will deliver proper results. It depends on your own preferences which way to use. As mentioned before 1) tends to be not practically usable due to the timings in the workflow. With 2) and 3) you need to be absolutely clear about using the right version of the MDD file. You need to be sure to have taken the latest version from the server by using the “check out” facility in the files activity. Going for 3) there is a slight risk to overwrite the prepared MDD file with the MDD located in the downloaded ZIP file.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

3 Comments

  1. Padmaja   |  Thursday, 25 February 2010 at 4:32 pm

    How to capture data using MDM2Quantum, if more than one column width SINGLE PUNCH data. For Example we have 100 Brands from code 1 to Code 100 in the columns (121-123). I want to tabulate this question using Dimensions.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  2. Allison   |  Friday, 26 February 2010 at 7:31 am

    In order to format a question as a numeric, you have to manually setup DataFormat properties as specified in the documentation for AllocateCardColPunch in the Data Collection Developer Library.

    From the documentation:
    AllocateCardColPunch also takes into account the DataFormat custom property if it is set. Valid DataFormat values are “numeric, “literal”, “bitstring”, “date” and “time”. The “numeric” data format can be used on categorical variables to indicate that they should be exported as numerics. The CodeWidth custom property can be set to indicate the width of the numeric column. The value exported can be set in the Value custom property. A combination of the column offset and punch is used as the value if the Value custom property is not set. This data format also impacts the Quantum specifications that are produced by the Quantum DSC. The other data formats are typically setup by the Triple-S DSC and are most useful when exporting to that DSC. The “literal” and “bitstring” data formats can be used on categorical variables and impact the columns allocated and Quantum specifications produced. CodeWidth and Value custom properties can also be used to impact the behavior when using these data formats. The “date” and “time” data formats only impact the columns allocated.

    So you need to setup a custom property in the CARDCOL context, DataFormat = “numeric”. Then you can update the ColOffset and Punch properties that are allocated by MDM2Quantum and change them so that when they are concatenated, they provide your numeric values. For example to get 100, set ColOffset to 10 and Punch to 0.

    You can do this manually using MDM Explorer as described above or use a script.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  3. Padmaja   |  Tuesday, 20 April 2010 at 3:14 pm

    Hi Allison

    Thanks for the update. But when i use ColOffset to 10 and Punch to 0, it allaocates 10 columns and writing 0 after that.

    Assuming this is how the data gets punched, correct me if my assumption is worng.

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

Leave a Reply