Level Link - Mean Difference Example
Summary | This article describes the level link with a mean difference example in AskiaAnalyse. |
Applies to | AskiaAnalyse |
Written for | Data processor |
Keywords | level; link; mean; difference; analyse; askiaanalyse |
Understanding the Level link
Download the example QES file
If you want to compare wo questions which belong to different loops, you need to create a level link. If this has not been done before the data collection, you need to recreate the level link following the steps below.
Imagine we have two loops LA1 and LB6 which contain a numeric variable each (A1GRID & B6GRID).
The requirement is to create a table that subtracts means score. We want to see (B6 mean scores) – (A1 mean scores) for common items in their loops.
- Add three codes to LA1 so that both loops now have 15 iterations.
- Paste entry codes 1 to 15 over the code-frame of LA1 so there are no complaints about duplicate entry codes.
- At this point take a backup copy of your QES file (we will use this to merge interviews later). My working file is called HIV_ATU_W1_USE.qes and my backup HIV_ATU_W1.qes
- Open HIV_ATU_W1_USE.qes in Tools.
- Verify data structure.
- 'Delete all interviews' from your QES file.
- Compact and repair database.
- Open it in Design and delete the codes from LB6.
- Level link it to LA1.
- Open in Tools.
- Verify data structure.
- Merge > Interviews.
- Navigate to your BACKUP QES file (which contains data) HIV_ATU_W1.qes > OK.
- After the import, open HIV_ATU_W1_USE.qes in Analyse.
- Drag LA1 into the rows and set the level to be LA1.
- Insert 3 calculations:
- LA1 Mean [Script (mean)] where script = A1GRID.
- LB6 Mean [Script (mean)] where script = B6GRID.
- LB6 - LB1 [Calculation arithmetic (number)] where script = {2}-{1}.
Hit the Results, you should get something like the following:
If you are required to do this in a QEW then a few of the steps will need to be different.
Instead of amending your existing variables, you could create two new variables and populate them to match exactly your original variables using edits. (I only do this because it's easier to map new variables into a QEW set-up than amend existing ones).
Open .qes file in Design.
Since LB6_New is level linked to LA1_New we can move B6GRID_New into the loop LA1_New i.e. the structure goes from left image to right image below.
We no longer need the edit routings so in case of warning messages, just delete the routings.
Now, Open your file in Surf and map LA1_New, A1GRID_New & B6GRID_New in to the QEW.
Open your QEW in Analyse.
You will need to drag LA1_New to the rows as LB6_New no longer exists. Then insert the calculations as described previously (LA1 Mean / LB6 Mean / LB6 - LB1) and hit results.