MFORMS= reformat input data and multiple data forms

Top  Up  Down  A A

MFORMS= supports the reformatting of input data records, and also equating multiple input files in different formats, such as alternate forms of the same test. Data after END NAMES or END LABELS is processed first, as is data specified by DATA= in the core control file.

 

Data reformatted by MFORMS= can be accessed, viewed, edited and "saved as" permanently using the "Edit" pull-down menu. It has a file name of the form: ZMF.....txt

 

Here is the layout:

 

mforms=*

data=forma.txt

; the name of an input data file

L=2

; there are 2 lines in input data file for each data record

I1 = 20

; response to item 1 of the combined test is in column 20 of the input data file

I3-5 = 21

; items 3, 4, 5 are in columns 21, 22, 23 of the input data file

I16-20=11

; items 16, 17,18, 19, 20 are in columns 11, 12, 13, 14, 15

P1=9

; the first character of person label is in column 9 of the input data file

P3-8=1

; person label characters 3 through 8 start in column 1

C20-24="FORMA"

; put in columns 20-24 the letters FORMA

C40-90 = 2:1

; put in columns 40-90 the characters in the second line of the data record

#

; end of definition - start of next file reformat

DATA=formb.txt

; name of input data file

P3-7=1

; information for columns 3-7 of person label starts in column 1 of data record

.....

 

*

; end of mforms= command

 


 

Details:

 

mforms=*

instructions follow in control file, and end with another *.

mforms=filename

instructions are in a file but in the same format as above.

data=filename

name of input file name to be reformatted.

The reformatted records are placed in a temporary work file. This may be accessed from the Edit pull-down menu, and saved into a permanent file.

This temporary file is processed after any Data Files specified with the master data= instruction and in the same way, e.g., any FORMAT= command will be applied also to the temporary work file.

L=nnn

nnn is the count of lines in each input data record.

If L=1 this can be omitted.

L=4 means that 4 input data lines are processed for each data record output.

Cnnn=....

nnn is the column number in the formatted data record.

XWIDE= does not apply. C10-12 means columns 10, 11, 12 of the formatted record.

C1= refers to column 1 of the formatted data record.

This can also be used to move item and person information.

Innn=....

nnn is the starting item number in the formatted data record.

nnn-mmm are the starting to ending item numbers in the formatted data record.

XWIDE= is applied, so that I3-5= with XWIDE=2 means 6 characters.

I1= points to column Item1= in the formatted data record.

Pnnn=....

nnn is the starting column number in the person label in the formatted person label.

XWIDE= is not applied. P6-8= always means 3 columns starting in column 6.

P1= points to column Name1= in the formatted data record.

.....=nnn

nnn is the starting column of the only, or the first, line in the input data record.

....=m:nnn

m is the line number in each data record

nnn is the starting column number of that line

....="xxxx"

xxxx is a character constant to be placed in the formatted data record.

Note: for I18-20="abc" with XWIDE=2, then response to Item 18 is "ab", 19 is "c ", 20 is "  ".

#

end of processing of one file, start of the next

*

end of Mforms= processing

 

Example 1: See Exam10c.txt

 

Example 2: Three data files with common items and one MCQ scoring key.

 

Item bank

1-3

4-6

7-9

10-12

Datafile1.txt

1-3

4-6

 

 

Datafile2.txt

1-3

 

4-6

 

Datafile3.txt

1-3

 

 

4-6

 

Datafile1.txt: (Items 1-6)

TOMY      ABCDAB

BILL      BCDADD

 

Datafile2.txt (Items 1-3 and 7-9)

TOTO      BBADAB

MOULA     BADADD

 

Datafile3.txt (Items 1-3 and 10-12)

IHSANI    ACCDAB

MALIK     CBDDCD

 

Control file:

TITLE="Multiple MCQ forms with one scoring key"

NI=12  ; 12 ITEMS IN TOTAL

ITEM1=11

NAME1=1

CODES="ABCD"

KEY1=BACCADACADDA

mforms=*

data=datafile1.txt ; name of data file

L=1   ; one line per person

P1-10=1  ; person label in columns 1-10

I1-3=11  ; items 1-3 in columns 11-13

I4-6=14  ; items 4-6 in columns 14-16

#

data=datafile2.txt

L=1

P1-10=1

I1-3=11

I7-9=14  ; items 8-9 in columns 14-16

#

data=datafile3.txt

L=1

P1-10=1

I1-3=11

I10-12=14  ; items 10-12 in columns 14-16

*

&END

; item identification here

END NAMES

 

Here is how the data appear to Winsteps for analysis:

TOMY      ABCDAB

BILL      BCDADD

TOTO      BBA   DAB

MOULA     BAD   ADD

IHSANI    ACC      DAB

MALIK     CBD      DCD

 

Example 3: Test 1 is a 4-item survey. Test 2 is a 4-item survey its first two items are the last two items on Test 1. Those items share the same rating scale, called "C". The other 4 items also share another rating scale, called "U".

 

Item bank

1-2

3-4

5-6

Datafile1.txt

1-2

3-4

 

Datafile2.txt

 

1-2

3-4

 

Datafile1.txt: (Items 1-4)

TOMY      3241

BILL      3352

 

Datafile2.txt (Items 3-4 and 5-6)

TOTO      3325

MOULA     2143

 

TITLE="Combing two surveys"

NI=6  ; 6 ITEMS IN TOTAL

ITEM1=11

NAME1=1

CODES="12345"  ; all valid codes on all the survey items

ISGROUPS = UUCCUU ; assigns items to rating scales

mforms=*

data=datafile1.txt ; name of data file

L=1   ; one line per person

P1-10=1  ; person label in columns 1-10

I1-4=11  ; items 1-4 in columns 11-14

#

data=datafile2.txt

L=1

P1-10=1

I1-2=13  ; items 1-2 on the second survey are items 3 and 4 on the first survey

I3-4=15  ; items 3-4 in columns 15-16

#

&END

; item identification here

END NAMES

 

Here is how the data appear to Winsteps for analysis:

TOMY      3241 ; items 1-2 unique, items 3-4 common

BILL      3352

TOTO        3325 ; items 3-4 common, items 5-6 unique

MOULA       2143

 

Example 4: Test 1 is a 4-item survey. Test 2 is a 4-item survey with two items in common with Test 1 which are to be anchored to their Test 1 values.

 

Data files

Combined Items

Item bank

1

2

3

4

5

6

data1.txt

1

2

3

4

 

 

data2.txt

 

3

 

2

1

4

 

Test 1 has 4 rating scale items. Each item has its own partial-credit structure:

title = "Test 1"

item1 = 1 ; items start in column 1

ni = 4 ; 4 items

name1 = 5 ; person label starts in column 5

namlen = 14 ; length of person name

codes =  01234  ; rating scale

ISGROUPS = 0 ; each item has its own rating scale structure

stkeep = YES ; this is probably what you want for these type of data

data = data1.txt

ifile = items1if.txt ; item calibrations from Test 1 for Test 2 (output)

sfile = items1sf.txt ; structure calibrations from Test 1 for Test 2 (output)

&END

Test 1 item 1

Test 1 item 2

Test 1 item 3

Test 1 item 4

END NAMES

 

data1.txt is:

1234Person 1-1

3212Person 1-2

......

 

Test 2 has 4 items. 1 and 4 are new - we will call these items 5 and 6 of the combined Test 1 and 2. Item 2 is Test 1 item 4, and item 3 is Test 1 item 2.

title = "Test 2 (formatted to match Test 1)"

item1 = 1 ; items start in column 1

ni = 6 ; 4 items in Test 1 + 2 more in Test 2

name1 = 7 ; person label starts in column 7

namlen =14 ; length of person name

codes =  01234 ; rating scale

stkeep = YES ; this is probably what you want for these type of data

ISGROUPS = 0  ; each item has its own rating scale structure

iafile = items1if.txt ; item calibrations from Test 1 (input - unchanged)

safile = items1sf.txt ; structure calibrations from Test 1 (input - unchanged)

MFORMS = *  ; reformat the Test 2 data to align with Test 1

data = data2.txt ; the name of an input data file

L = 1   ; there is 1 line in input data file for each data record

I2 = 3  ; response to item 2 of Test  1 is in 3 of the data2.txt file

I4 = 2  ; response to item 4 of Test  1 is in 2 of the data2.txt file

I5 = 1  ; item 5 is in column 1 of data2.txt

I6 = 4  ; item 6 is in column 4 of data2.txt

P1-14 = 5  ; the first character of person label is in column 5 of data2.txt for 14 columns.

*   ; end of mforms= command

&END

Test 1 item 1 (blank in Test 2)

Test 1 item 2 (Test 2 item 3)

Test 1 item 3 (blank in Test 2)

Test 1 item 4  (Test 2 item 2)

Item 5 (not in Test 1, Test 2 item 1)

Item 6 (not in Test 1, Test 2 item 4)

END NAMES

 

data2.txt is:

5426Person 2-1

1234Person 2-2

....

 

The formatted file (see Edit pull-down menu MFORMS==) is

2 456Person 2-1

3 214Person 2-2

....


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