{smcl}
{hline}
help for {cmd:prepar} {right:(Feb 4, 2010)}
{hline}

{title:Description}

{p 0 0 2}
Writes the code and data file needed to process variables in PARSCALE, {break}
with the option to run PARSCALE and merge in the scores and standard errors.

{p 8 17 2}
{cmd:prepar} {it: varlist} {cmd:,}
             {cmd:ID}{it:(subject id)} {cmd:RUnname}{it:(string)} 
             [{cmdab:MINsize(}{it:integer 20}{hi:)}{cmd:)}
              {cmd:SCALE(}{it:string 1.7}{hi:)}
			  {cmd:NQpt(}{it:string 11}{hi:)} 
    		   {cmd:CYcles(}{it:string 1000}{hi:)} 
              {cmd:SCORE(}{it:string EAP}{hi:)}
              {cmd:PARameterfile(}{it:string}{hi:)}
              {cmd:SKIP(}{it:varlist}}
              {cmdab:ALL(}{it:integer 0}{hi:)}{cmd:)}
              {cmdab:CLeanup(}{it:integer 0}{hi:)}{cmd:)}
            ]

{p 4 12 2}
where:

{p 8 12 2}
{it:varlist} is the list of variables (items, blocks) to be included in the PARSCALE run.

{p 8 12 2}
{cmdab:ID} is the subject id variable.

{p 8 12 2}
{cmdab:runname} is the name of the PARSCALE run to be generated. code_{it:runname}.psl will be the PARSCALE input file,
data_{it:runname}.txt will be the PARSCALE data file.

{title:Options}

{p 8 12 2}
{cmdab:MINsize} is the minimum category frequency (number of observations/category).  The default is 20.  
Categories will be combined, if possible, to meet the minsize.  
Any variable that does not have enough observations in at least 2 categories will be dropped.  
If you do not want any categories combined, specify minsize(1).

{p 8 12 2}
{cmdab:SCALE} changes the scale parameter from the default of 1.7.

{p 0 8 2}
{cmd:nqpt} - changes the number of quadrature points from a default of 11.

{p 0 8 2}
{cmd:cycles} - changes the maximun number of iterations in PARSCALE stage 2 from the default of 1000.

{p 8 12 2}
{cmdab:SCORE} Default is EAP.  You can specify MLE or WML instead.

{p 8 12 2}
{cmdab:PARameterfile} calculates scores using an existing PARSCALE parameter file.

{p 8 12 2}
{cmdab:SKIP} uses the existing PARSCALE parameter file only for the variables specified here.

{p 8 12 2}
{cmdab:ALL} ALL(1) runs the PARSCALE code, and merges the scores and their standard errors into the original data set.

{p 8 12 2}
{cmdab:CLeanup} CLeanup(1) deletes the PARSCALE files when the merge is completed.  CLeanup(2) deletes all but the PAR file.  Only for use with the ALL option.

{title:Remarks}

{p 8 12 2}
Drops any variable that does not have enough observations for at least 2 categories, and displays a warning message.

{p 8 12 2}
Warning message for variables with more than 15 levels (PARSCALE will reject).  Letter codes automatically made for 2-digit values.

{p 8 12 2}
Allows missing values.

{p 8 12 2}
Allows character or numeric ID's up to 9 digits.

{p 8 12 2}
Creates a numeric, 10-digit ID code for PARSCALE by adding 1,000,000,000 to the ID, first converting string IDs to a unique number if needed.

{p 8 8 2}
Default PARSCALE CALIB instructions are: 

{p 12 12 2}
        >CALIB GRADED, LOGISTIC, SCALE=1.7, NQPT=11, CYCLES=1000, CRIT=.001 

{p 12 12 2}
If you want other choices, you can edit the .PSL file before running it.  [Except for SCALE, CYCLES, and NQPT, which you can choose on the command line.]

{p 8 12 2}
The maximum number of variables is 230.

{p 8 12 2}
Written for Stata 8.0.  
 
{title:Examples}

{p 4 8 2}
prepar item1 - item13, id(id) ru(gender0)

{p 4 8 2}
prepar item1 - item13, id(id) ru(gender0) par(PRO) minsize(1) scale(1) score(MLE)

{p 4 8 2}
prepar item1 - item13, id(id) ru(gender0) par(PRO) minsize(1) skip(item1-item5) cleanup(2)

{p 4 8 2}
prepar item1 - item13, id(id) ru(gender0) all(1) cleanup(1)


{title:Authors}

{p 4 4 2}
Laura Gibbons and Paul Crane.  University of Washington, Copyright 2005-2010.
Email: {browse "mailto:":gibbonsl@u.washington.edu}{break}

We appreciate the assistance of Tom Koepsell and Rich Jones. 

{title:Also see}

{p 4 4 2}
{cmd:difwithpar} and {cmd:runparscale}.

