Fixed length data file with multiple records per line |
Data files transferred to PC's from Mainframe computers are frequently in a fixed-length format with no "Carriage Return - Line Feed" indicators at the end of the records. For these files, each record contains a fixed number of characters, its "record length".
Here is such a file. I have broken it into lines of twice the "record length" for the sake of convenient display, but the file itself is just one long string of numbers.
This is data file, TAPEDAT.txt:
Fred 2625232032131000110110George 2925202423320100110111
Mabel 2622212643411001000003Alice 2923212421321010010011
Grace 2723262424311111011012Arthur 2523222222140001010111
Mary 2825212412431100000003Belinda 2627222431320111011111
The test is of 10 items, divided into 4 groups. Group 1 is items 1,2,3. Group 2 is items 4,5,6. Group 3 is items 7,8,9. Group 4 is just item 10. The judging plan rotates the judges across subjects, item groups and sessions in a random manner, but without duplication of rating. Thus the items in group one for subject Fred were rated by judge 26 in session 3. Item 1 was rated 1, Items 2 and 3 were rated 0. The first 9 items are dichotomies (0=failed, 1= passed). Item 10 is on a four-point Likert scale scored 0, 1, 2 ,3. Schematically the data record is:
This is entered in each 30 character record as follows:
Columns
1-8 Subject
9-10 Judge for item group 1
11-12 Judge for item group 2
13-14 Judge for item group 3
15-16 Judge for item group 4
17 Session number for item group 1
18 Session number for item group 2
19 Session number for item group 3
20 Session number for item group 4
21-30 Ratings for Items 1-10
The Facform keyword file, TAPEkey.txt, to reformat this fixed length file is:
; File: TAPEkey.txt
; This converts a file with multiple records per data line
$Input = tapeDAT.txt
$Length = 30 ; the fixed length record length
$Output = tapeFAC.txt
$Facets = 5 ;Subject, Item group, Judge, Session, Item
$Flabel = 1, Subject
$Flabel = 2, "Item Group" ; This facet is included "just in case"
$Flabel = 3, Judge
$Flabel = 4, Session
$Flabel = 5, Item
$Spec = "Title = Demonstration of Fixed Length data file"
$Spec = "Output = tapeOUT.txt ; the output of the FACETS analysis"
$Spec = "Models = ; we model only subject-judge-item here"
$Spec = "?,,?,,10,R ;Item 10 has a rating (or partial credit) scale"
$Spec = "?,,?,,?,D ;Items 1-9 dichotomies"
$Spec = "*"
$Label = 1,,$S1W8 ;Subject name
Ig = 0 ;used to keep track of item group
Item = 0 ; reset item number
$Do = 4
Ig = Ig +1
$Label = 2,Ig ;Item group
$Label = 3,$S(IG*2+7)W2 ;Judge
$Label = 4,$S(IG+16)W1 ;Session
$Do = 3 ;Items in groups of 3
Item = Item +1
$If = (Item=<10) ;No item greater than 10
$Label = 5,Item,Item ;Item
$Rating = $S(Item+20)W1 ;Rating
$Endif
$Again
$Again
The resulting Facets file is TAPEFAC.txt:
; FACFORM Version No. 1.20, May 4, 1992
; Run on 05-04-1992 12:44:12
; from Keyword file: TAPEkey.txt
Facets = 5
Title = Demonstration of Fixed Length data file
Output = tapeOUT.txt ; the output of the FACETS analysis
Models = ; we model only subject-judge-item here
?,,?,,10,R ;Item 10 has a rating (or partial credit) scale
?,,?,,?,D ;Items 1-9 dichotomies
*
Labels =
1,Subject
1=Alice
2=Arthur
|
7=Mabel
8=Mary
*
2,Item Group
1=
2=
3=
4=
*
3,Judge
20=
21=
|
28=
29=
*
4,Session
1=
2=
3=
4=
*
5,Item
1=
2=
|
9=
10=
*
Data =
4,1,26,3,1-3,1,0,0
4,2,25,2,4-6,0,1,1
4,3,23,3,7-9,0,1,1
4,4,20,3,10,0
5,1,29,2,1-3,0,1,0
|
8,4,24,3,10,3
3,1,26,3,1-3,0,1,1
3,2,27,1,4-6,1,0,1
3,3,22,3,7-9,1,1,1
3,4,24,2,10,1
Help for Facform Rasch Measurement Software: www.winsteps.com. Author: John Michael Linacre
Facets Rasch measurement software.
Buy for $149. & site licenses.
Freeware student/evaluation Minifac download Winsteps Rasch measurement software. Buy for $149. & site licenses. Freeware student/evaluation Ministep download |
---|
![]() |
Forum: | Rasch Measurement Forum to discuss any Rasch-related topic |
---|
Questions, Suggestions? Want to update Winsteps or Facets? Please email Mike Linacre, author of Winsteps mike@winsteps.com |
---|
State-of-the-art : single-user and site licenses : free student/evaluation versions : download immediately : instructional PDFs : user forum : assistance by email : bugs fixed fast : free update eligibility : backwards compatible : money back if not satisfied Rasch, Winsteps, Facets online Tutorials |
---|
Coming Rasch-related Events | |
---|---|
Jan. 17 - Feb. 21, 2025, Fri.-Fri. | On-line workshop: Rasch Measurement - Core Topics (E. Smith, Winsteps), www.statistics.com |
Feb. - June, 2025 | On-line course: Introduction to Classical Test and Rasch Measurement Theories (D. Andrich, I. Marais, RUMM2030), University of Western Australia |
Feb. - June, 2025 | On-line course: Advanced Course in Rasch Measurement Theory (D. Andrich, I. Marais, RUMM2030), University of Western Australia |
Apr. 21 - 22, 2025, Mon.-Tue. | International Objective Measurement Workshop (IOMW) - Boulder, CO, www.iomw.net |
May 16 - June 20, 2025, Fri.-Fri. | On-line workshop: Rasch Measurement - Core Topics (E. Smith, Winsteps), www.statistics.com |
June 20 - July 18, 2025, Fri.-Fri. | On-line workshop: Rasch Measurement - Further Topics (E. Smith, Facets), www.statistics.com |
Oct. 3 - Nov. 7, 2025, Fri.-Fri. | On-line workshop: Rasch Measurement - Core Topics (E. Smith, Winsteps), www.statistics.com |
Our current URL is www.winsteps.com
Winsteps® is a registered trademark