Example 6: Keys in data record format

Up  Previous  Next

Do not use FORMAT= unless there is no other way. It is tricky to set up correctly. MFORMS= is much easier.

 

A test of 165 multiple-choice items with multiple data lines per data record. The scoring key is formatted in the same way as the data lines:

 

; This file is EXAM6.TXT

TITLE='Demonstration of KEY1 record'        title

FORMAT=(1X,10A,T23,50A,/,T23,50A,/,T23,50A,/,T23,15A)

; The first character is ignored,

; then 10 characters in first record are person id,

; then starting in column 23,

; 50 columns in first 3 records,

; and 15 responses in fourth record.

 

;  Using MFORMS= to reformat the same data record

;  MFORMS=*

;  Data= filename        ; put the input data in a separate file

;  L=4                        ; 4 data input lines per output record

;  P1-10=2                ; person label characters 1-10 start in column 2 of line 1 of input data

;  I1-50=23                ; responses to items 1-50 start in column 23 of line 1 of input data

;  I51-100=2:23        ; responses to items 51-100 start in column 23 of line 2 of input data

;  I101-150=3:23        ; responses to items 101-150 start in column 23 of line 3 of input data

;  I151-165=4:23        ; responses to items 151-165 start in column 23 of line 4 of input data

;  *                        ; end of MFORMS=

;                        ; Note this does not reformat the Keyfrm=, so use KEY1=

 

; In the reformatted record

NAME1=1                ; Person-id starts in column 1

ITEM1=11                ; Item responses start in column 11 of reformatted record

NI=165                ; There are 165 items

CODES="ABCD "        ; The raw responses are ABCD and BLANK.

                       ; Put character strings in " " if blanks are to be included.

MISSCORE=0                ; Blanks and invalid codes scored wrong=0

KEYFRM=1                ; There is a KEY1 record after &END which is formatted

                       ; exactly like a data record specifying the correct responses.

RFILE=exam6rf.txt        ; this shows effect of reformatting and scoring

PTBISERIAL=YES        ; Raw score point-biserial excluding extremes

TFILE=*                ; List of desired tables

1.0                        ; Subtable 0 of Table 1

3                        ; Table 3.1, 3.2, etc.

6

10

20

*                        ; end of list

 

&END                        ; KEY1= formatted like your data follows:

Key 1 Record          CDABCDBDABCADCBDBCADBABDDCDABCBABDCACBADACBADBAACD

after &END            CCBDACABDADCBDCABBCACDBAABCDADCDCADBCABCDCADABACDA

in FORMAT= format     BADCDBADCBADCDBACBADBCAADBCBBDCBACDBACBADCDADBACDB

before item names     ABDACDCDBADBCAB

A1                        First item name

A2

 .

A164

A165

END NAMES

090111000102   10001  BDABADCDACCDCCADBCBDBCDDACADDCACCCBCCADBDABADCAADD

                     ABDDDCABDADCBDACDBCACADABCDCCDCBDBCCABBCDCADDCDCDA

                     BDCCDBABCDCDDDCBADCACBDCBDBACBCBCADBABAADCDCBABAAC

                     DCBCCACABCDDCBC

090111000202   10002  BDCDCDCDADCBCCBDBDCABCBDACDABCAABCAACBBBACAADDAACA

                     ACBCACBBDADCBDCBBBCDCCDACCBCADCACCAACDBCCDADDBACDA

                     BADCDCBDBDCDCCBACCCBBAABDBCDBCCBAADBABBADBDDABDCAA

                     DCDBCDCDBADBCCB

 

  .

 

090111008402   10084  CDABCDADDDCDDDDCBDCCBCCDACDBBCACDBCCCBDDACBADCAACD

                     ACBDCCDBDADCCBCDDBBDCABACCBDBDCBCCACCBACDCADABACDA

                     BABBDCADBDDBCDADDDCDDBCABCBDCCCAACDBACBDDBDBCCAACB

                     DBACDBCDBADDCBC

090111008502   10085  CDABADADABCADCDDBDADBBCBACDABCCABACCCDAAACBADAAACD

                     ACBCDCBBDADCDDCADBCCCDBADDBBBDCACAABCBDDDCADABACDA

                     BADABBADBBADCADACDABBAACACAABDCBACDBADBACCDBACBADA

                     BCABCBCDBADDCCC

 

or, using continuation lines for the key:

 

CODES="ABCD "        ; The raw responses are ABCD and BLANK

;KEYFRM=                ; omit this, not needed

KEY1 = CDABCDBDABCADCBDBCADBABDDCDABCBABDCACBADACBADBAACD+

      +CCBDACABDADCBDCABBCACDBAABCDADCDCADBCABCDCADABACDA+

      +BADCDBADCBADCDBACBADBCAADBCBBDCBACDBACBADCDADBACDB+

      +ABDACDCDBADBCAB

; "+" are continuation characters


Help for WINSTEPS® Rasch Measurement Software: www.winsteps.com.