Aim Type Sample Code

Note: This page is from an older version of the Data Dictionary and may therefore contain information that is now out of date. It is included here for reference only.


1 The following pseudo code and SPSS code is provided to illustrate the Aim Type data definition

A_ATYPE

2 The following table shows the steps required to derive A_ATYPE

Step

Condition

Action if true

Action if false

1

Is A_LATYPE=0001, or 0002, or 1413

Set A_ATYPE to 1

Go to 2

2

Is A_LATYPE=0003

Set A_ATYPE to 2

Go to 3

3

Is A_LATYPE=0017, or 0028, or 0029, or 0030, or 0886

Set A_ATYPE to 3

Go to 4

4

Is A_LATYPE=0035 or 1414 or 1415 or 1416 or 1417 or 1418

Set A_ATYPE to 4

Go to 5

5

Is A_LATYPE=0036

Set A_ATYPE to 5

Go to 6

6

Is A_LATYPE=0004 or 0005 or 0007

Set A_ATYPE to 6

Go to 7

7

Is A_LATYPE=0031 or 0032

Set A_ATYPE to 7

Go to8

8

Is A09 of the form??CN????

Set A_ATYPE to 8

Go to 9

9

Is A09 of the form???CN???

Set A_ATYPE to 8

Go to 10

10

Is A09 of the form ZCAC????

Set A_ATYPE to 8

Go to 11

11

Is A09 of the form ?C??????

Set A_ATYPE to 8

Go to 12

12

Is A09 of the form ?BS?????

Set A_ATYPE to 8

Go to 13

13

Is A09 of the form ?9V??????

Set A_ATYPE to 9

Go to 14

14

Else

Set A_ATYPE to 10

3 The following SPSS code illustrates how to derive A_ATYPE

GET FILE=’……….Aims dataset’.

SORT CASES A09.
MATCH FILES /FILE=*
 /TABLE=’……….Analytical LAD dataset’
 /BY A09.

/* Conversion of a_latype (alpha) into broader categpories in A_ATYPE (numeric).
RECODE a_latype ('0001','0002','1413'=1)('0003'=2) ('0017','0028','0029','0030','0886'=3) ('0035','1414','1415','1416','1417','1418'=4)('0036'=5)
('0004','0005','0007'=6)('0031','0032'=7) (ELSE=10) into A_ATYPE.

/* Assigns the value 8 for aims that are OCN aims
IF SUBST(A09,3,2)='CN' OR SUBST(A09,4,2)='CN' A_ATYPE=8.
IF SUBST(A09,1,2)='CN' A_ATYPE=8.
IF SUBSTR(A09,1,4)=’ZCAC’ A_ATYPE=8.
IF SUBST(A09,1,2)='XC' A_ATYPE=8.
IF SUBST(A09,1,3)='XBS' A_ATYPE=8.
IF SUBST(A09,1,2)='CN' A_ATYPE=8.
IF SUBSTR(A09,1,4)=’ZCAC’ A_ATYPE=8.

/* Assigns a value of 9 for aim that are generic additional GNVQ units.
IF (substr(A09,1,3)='X9V') A_ATYPE=9.

VARIABLE LABELS A_ATYPE 'DV - TYPE OF AIM'.
VALUE LABELS A_ATYPE
 1 'GCE A/AS/A2 level'
 2 'GCSE'
 3 'GNVQ precursor'
 4 'GNVQ/AVCE'
 5 'NVQ'
 6 'Access to HE'
 7 'HNC/HND'
 8 'OCN'
 9 'Additional NVQ/GNVQ'
 10 'Other'
 11 'Mixed - this is a temporary value only'.

L_ATYPE

4 The following SPSS code illustrates how to derive L_ATYPE

DO IF A_LIVE_B > 1.
 DO IF (L01=LAG(L01) AND L03=LAG(L03)).
  DO IF (LAG(A_NVQLEV) <> 9 AND A_NVQLEV <> 9).
   DO IF (LAG(A_NVQLEV) GT A_NVQLEV).
    COMPUTE A_ATYPE=LAG(A_ATYPE).
   ELSE IF (LAG(A_NVQLEV) = A_NVQLEV).
    DO IF (LAG(A_ATYPE) <> A_ATYPE).
     COMPUTE A_ATYPE=11.
    END IF.
   END IF.
  ELSE IF (LAG(A_NVQLEV) <> 9 AND A_NVQLEV = 9).
   COMPUTE A_ATYPE=LAG(A_ATYPE).
  ELSE IF ((LAG(A_ATYPE) <> A_ATYPE) AND (LAG(A_NVQLEV) = 9 AND A_NVQLEV=9)).
   COMPUTE A_ATYPE=11.
  END IF.
 END IF.
END IF.

/* Aggregate the file to learner level
TEMPORARY.
SELECT IF A_LIVE_B > 1.

AGGREGATE OUTFILE=*
 /PRESORTED
 /BREAK=L01 L03
 /L_ATYPE 'DV - IN-YEAR AIM OF THE LEARNER'=LAST(A_ATYPE).

MATCH FILES /FILE=’……………………..AIMS data set’
 /TABLE=*
 /BY L01 L03.

DO IF A_LIVE_B > 1.
 COMPUTE CYGLH1=0.
 COMPUTE CYGLH2=0.
 COMPUTE CYGLH3=0.
 COMPUTE CYGLH4=0.
 COMPUTE CYGLH5=0.
 COMPUTE CYGLH6=0.
 COMPUTE CYGLH7=0.
 COMPUTE CYGLH8=0.
 COMPUTE CYGLH9=0.
 COMPUTE CYGLH10=0.
 DO IF (L_ATYPE=11 AND A_NVQLEV=L_NVQLEV).
  IF A_ATYPE=1 CYGLH1=A_ACT_B.
  IF A_ATYPE=2 CYGLH2=A_ACT_B.
  IF A_ATYPE=3 CYGLH3=A_ACT_B.
  IF A_ATYPE=4 CYGLH4=A_ACT_B.
  IF A_ATYPE=5 CYGLH5=A_ACT_B.
  IF A_ATYPE=6 CYGLH6=A_ACT_B.
  IF A_ATYPE=7 CYGLH7=A_ACT_B.
  IF A_ATYPE=8 CYGLH8=A_ACT_B.
  IF A_ATYPE=9 CYGLH9=A_ACT_B.
  IF A_ATYPE=10 CYGLH10=A_ACT_B.
 END IF.
END IF.

TEMPORARY.
SELECT IF A_LIVE_B > 1.
AGGREGATE OUTFILE=*
 /PRESORTED
 /BREAK=L01 L03
 /L_ATYPE 'DV - In-year aim of the Learner'=last(L_ATYPE)
 /CYGLH1 TO CYGLH10=SUM(CYGLH1 TO CYGLH10).

/* Calculates for those of a mixed category aim type, which aim has the highest glh, AND allocates that aim to the aim type.
COMPUTE MAX_CY=MAX(CYGLH1 TO CYGLH10).
DO IF (L_ATYPE=11).
 DO IF MAX_CY=CYGLH1.
  COMPUTE L_ATYPE=1.
 ELSE IF MAX_CY=CYGLH2.
  COMPUTE L_ATYPE=2.
 ELSE IF MAX_CY=CYGLH3.
  COMPUTE L_ATYPE=3.
 ELSE IF MAX_CY=CYGLH4.
  COMPUTE L_ATYPE=4.
 ELSE IF MAX_CY=CYGLH5.
  COMPUTE L_ATYPE=5.
 ELSE IF MAX_CY=CYGLH6.
  COMPUTE L_ATYPE=6.
 ELSE IF MAX_CY=CYGLH7.
  COMPUTE L_ATYPE=7.
 ELSE IF MAX_CY=CYGLH8.
  COMPUTE L_ATYPE=8.
 ELSE IF MAX_CY=CYGLH9.
  COMPUTE L_ATYPE=9.
 ELSE.
  COMPUTE L_ATYPE=10.
 END IF.
END IF.

Creator

Analysis and MI Team

Date issued

25 January 2005

Date created

8 December 2005

Document ref.

\\records.lsc.local\NAT\23 LrngSkillsPolicyInfrastr\23-07 DataCollectAlysis\23-07-03 LrnrDataAlysisDiss\nat-aimtypesamplecode-report-25jan2005.doc

LSC office

Learning and Skills Council
Cheylesmore House Quinton Road Coventry CV1 2WT
T 0845 019 4170 F 024 7682 3675 www.lsc.gov.uk/

Last Modified: 26 Jan 06