{smcl}
{* 27september2002}{...}
{hline}
help for {hi:qsim}
{hline}

{title:Automation for clarify} 

{p 8 16}{cmd:qsim}, 
[{cmdab:c:ommand(}{it:string asis)}  
{cmd:setx2(}{it:setx list} 
{cmd:by(}{it:xi variable} 
] 


{title:Description}

{p}{cmd:qsim} provides a wrapper for the {cmd: clarify} series of program that 
automates simulation with dummy variables produced by Stata's {cmd:xi} 
prefix. If xi: variables are not used, the automation process works without 
them.

{title:Remarks}

{p}Without {cmd:qsim} each of the 3 {cmd:clarify} programs has to be run
separately for each level of the xi: categorical variable. {cmd:qsim} can
be placed into one or more {cmd:foreach} loops and a large series of 
simulations can be run at one time.

{p} The output can be pasted into a text editor. Marking {cmd:E(} identifies
the line with the simulation data output. This line then can be cut to 
Excel (or similar programs) to make an output table. The whole process 
takes less than a minute.

{p} The {cmd:levels} module of Nicholas J. Cox (available from the Boston College archives)
is required to run {cmd:qsim} and is installed as part of this package.

{title:Options}

{p}{cmd:setx2()} expects the appropriate {cmd:clarify setx} commands. The 
contents of {cmdab:c:ommand} must be put in quotations.

{p}{cmd:by()} expects one xi: variable. If left blank the programs runs
as if there were no xi: variable. Do not enter the xi: variable in the
{cmd:setx2()} option.

{title:Examples}

{p 4 8}{inp:. qsim, c("reg euroutil age sex white ra i.edcat") setx2(age 55 sex 1) by(edcat)} {p_end}
{p 4 8}{input:. qsim, c("reg euroutil age sex white ra i.edcat") setx2(age 55)} {p_end}

{title:Author}

    Fred Wolfe, National Data Bank for Rheumatic Diseases, Wichita, KS  
    fwolfe@arthritis-research.org


{title:Also see}

 
{p 0 19}On-line help: {help clarify}, {help estsimp}, {help setx}, 
{help simqi}, if installed. {p_end}
  
