BookmarkSubscribeRSS Feed
mcook
Quartz | Level 8

I have many txt documents that are the output of STUIRT software.  

 

I need to create a SAS program to reliably import the tables from these txt files.  

 

Does anyone familiar with STUIRT output have any suggestions? 

 

 

2 REPLIES 2
ballardw
Super User

Can you at  least show an example of one? Copy from the text and paste into a code box opened on the forum with the </> icon or attach an example.

mcook
Quartz | Level 8
      /****************************************************************/
      /*                            STUIRT                            */
      /*       A Computer Program for Scale Transformation under      */
      /*          Unidimensional Item Response Theory Models          */
      /*                         Version  1.0                         */
      /*                                                              */
      /*             Seonghoon Kim and Michael J. Kolen               */
      /*                                                              */
      /*                     Iowa Testing Programs                    */
      /*                       University of Iowa                     */
      /****************************************************************/


THE FOLLOWINGS WERE READ FROM THE INPUT FILE: 
< Test_2.stu >


OK 55
66   Z9 2 MC     3.40100    3.40100    0.5502    4.0322
67   Z9 2 MC     3.40100    3.40100    0.6070    4.0322
68   Z9 2 MC     3.40100    3.40100    0.8946    4.0322
69   Z9 2 MC     3.40100    3.40100   -2.4236    4.0322
70   Z9 2 MC     3.40100    3.40100    0.2261    4.0322

SK 91
66   Z9 2 MC     3.40100    3.40100    0.6690    4.0322
67   Z9 2 MC     3.40100    3.40100    0.3567    4.0322
68   Z9 2 MC     3.40100    3.40100    0.0184    4.0322
69   Z9 2 MC     3.40100    3.40100   -1.2204    4.0322
70   Z9 2 MC     3.40100    3.40100    0.9993    4.0322

CI 55 BK  

OP
ND 41 SN  4.0322   3.40100   4.0000
OD 41 SN  4.0322   3.40100   4.0000
KO SL
BY


===[OPTIONS AND DEFAULTS]===

1. ST: [DEFAULT] slope = 6, intercept = 5
2. IT: [DEFAULT] maximum number of iterations =15
3. OD: number of theta values = 5
   ** OLD FORM: THETA VALUES AND WEIGHTS] **
   #0001:  -8.10484E+000       1.58347E-005
   #0002:  -6.94837E+000       3.14155E-005
   #0003:  -7.38954E+000       2.01854E-006
   #0004:  -9.48437E+000       5.48388E-006
   #0005:  -7.38474E+000       3.84373E-006
4. ND: number of theta values = 5
   ** NEW FORM: THETA VALUES AND WEIGHTS] **
   #0001:  -8.10484E+000       1.58347E-005
   #0002:  -6.94837E+000       3.14155E-005
   #0003:  -7.38954E+000       2.01854E-006
   #0004:  -9.48437E+000       5.48388E-006
   #0005:  -7.38474E+000       3.84373E-006

5. FS: [DEFAULT]
   HAEBARA METHOD:         do standardize loss functions
   STOCKING & LORD METHOD: do standardize loss functions
6. SY: [DEFAULT]
   HAEBARA METHOD:         bidirection (f1 and f2)
   STOCKING & LORD METHOD: bidirection (f1 and f2)
7. LM: [DEFAULT] NONE 
8. OP: ** This option works here. *
9. KO: The Stocking-Lord method is applied to obtain a common scale.
   Input files for Kolen's POLYEQUATE are provided.

===[Summary Statistics by Model]===

The three-parameter logistic (3PL) model:
                       Attempt1                     Attempt2
             --------------------------     --------------------------
               a_j       b_j       c_j        a_j       b_j       c_j
N.Obs.           10        10        10         10        10        10
Mean         6.77700   -7.6336    2.0345     2.57800   -9.1536    3.0322
Std.Dev.     4.0322    0.54568    4.0322     4.0322    0.9232    4.0322

===[Solutions for Moment Methods]===

*** When including the NR and/or MC models,
                  Attempt1            Attempt2
             ----------------     ----------------
              a_jk      b_jk       a_jk      b_jk
N.Obs.           10        10         10        10
Mean         3.40100   -6.5384     3.40100   -0.1536
Std.Dev.     4.0322    0.00011     4.0322    00003

Method            Slope    Intercept
------------------------------------
Mean/Mean       2.8375903   -3.333333
Mean/Sigma      4.847654   -1.111139

*** When excluding the NR and/or MC models,
                  Attempt1            Attempt2
             ----------------     ----------------
              a_jk      b_jk       a_jk      b_jk
N.Obs.           10        10         10        10
Mean         3.40100   -6.5384     3.40100   -0.1536
Std.Dev.     4.0322    0.00011     4.0322    00003

Method            Slope    Intercept
------------------------------------
Mean/Mean       2.8375903   -3.333333
Mean/Sigma      4.847654   -1.111139

===[First Solutions for Characteristic Curve Methods]===

Numb. Meth. 1st.S 1st.I    Slope  Intercept  Iter# TermC  Grad.S    Grad.I    Func.V
0000  HA      1.0   0.0  0.000087 -2.843657    2     1  -9.736328  4.032200  4.2847810
      SL      1.0   0.0  2.897536 -18352874    3     1  -3.184737  4.032200  0.670331

===[Final Summary of Solutions by Method]===

Method            Slope    Intercept
------------------------------------
Mean/Mean       5.5555999   -1.5839547
Mean/Sigma      4.443838   -2.863526
Haebara         3.141414   -1.987654
Stocking-Lord   3.847377   -9.999999

As the documents in question contain confidential data, I manually changed the values.  There is quite a bit more to the document that would take too much time to anonymize.

But I need a code that can pull out the tables and data, but ignore the header and options. 

 

My first thought was that if i could get the code to scan the document for a certain string.  (i.e. ** OLD FORM: THETA VALUES AND WEIGHTS] **,  or  ===[Solutions for Moment Methods]===) and then import the following table.   Since the documents should all follow that similar layout and format.  

 

Any help greatly appreciated.  I'm quite stumped at the moment.  

 

 

 

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 618 views
  • 0 likes
  • 2 in conversation