{smcl}
{.-}
help for {cmd:destest} {right: {browse "mailto:John_Hendrickx@yahoo.com":John Hendrickx}}
{.-}

{title:destest}

{p 8 27}
{cmd:destest} [{it:termlist}] [{cmd:using} {it:filename}] [{cmd:,}
{cmdab:j:oint} {cmdab:e:qual} {cmd:outraw} {cmd:replace}
    {cmd:ndec(}#{cmd:)} {cmd:sigcut(}numlist{cmd:)}
    {cmd:sigsym(}list{cmd:)} {cmd:sigsep(}#{cmd:)}

{title:Description}

{p}
{cmd:destest} is a companion program for {help desmat}. It is used after estimating
a model to perform a Wald test on model terms.
The {it:termlist} consists of one or more terms as specified in {help desmat}. A
{it:term} can consist of a single variable, or two or more variables separated
by either asterisks or periods. If asterisks are used, they will be
changed into periods by {cmd:destest}, i.e. only the highest order
interaction will be tested. If no arguments are specified, all terms
from the last {help desmat} model will be tested.

{p}
The default is to test whether the effects of each separate term are
equal to zero. If the option {cmd:joint} is specified, {cmd:destest} will test
instead whether all the effects in all the terms are jointly equal to
zero. If the option {cmd:equal} is specified, {cmd:destest} will test whether
the effects of each separate term are equal. The {cmd:joint} and {cmd:equal}
options may be combined to test whether all effects are jointly equal,
although this would be a somewhat peculiar hypothesis. Only the first
letter of the {cmd:joint} and {cmd:equal} option is sigificant.

{p}
If {cmd:using} {it:filename} is specified then the results are written to a tab-
delimited ascii file. The default extension for {it:filename} is {cmd:.out} (cf.
{help outsheet}). If {it:filename} already exists, {cmd:desrep} will attempt to find a
valid {it:filename} by appending a number (see {help outshee2}). The {cmd:replace} option
can be used to overwrite an existing file.

{title:Options}

{p}
The options {cmd:ndec()}, {cmd:sigcut()}, {cmd:sigsym()}, {cmd:sigsep()} have the same
usage as in {help desrep}.

{p 0 4}
{cmd:ndec(}#{cmd:)} specifies the number of decimal places. Default=3.

{p 0 4}
{cmd:sigcut(}{it:numlist}{cmd:)} specifies levels of significance to
be indicated in the output.
{cmd:destest} places a symbol next to the Chi-square or
F statistics to indicate whether these are significant at a certain level.
The {cmd:sigcut} option is used to specify these levels of significance.
The {it:numlist} should contain a list of values in descending order
with the same number of elements as the string list in {cmd:sigsym}. For
example, {inp:sigcut(.1 .05 .01 .001)} together with {inp:sigsym(# * ** ***)}
will use the symbols {res:#} for p < .1, {res:*} for p < .05, {res:**} for p < .01,
and {inp:***} for p < .001. The default is (.05 .01).

{p 0 4}
{cmd:sigsym(}{it:list}{cmd:)} specifies set of symbols corresponding
with the levels of
significance given by {cmd:sigcut}. Default=(* **).

{p 0 4}
{cmd:sigsep(}#{cmd:)} spcifies the number of spaces between coefficients and symbols
indicating significance. Default=0.

{p}
The following two options apply only if {cmd:using} has been specified to write
the data to a tab-delimited ascii file:

{p 0 4}
{cmd:outraw} requests that results be written using their
default formats, e.g. %9.0g for floats. In addition, a tab will be inserted
between coefficients and significance symbols. Otherwise, the variables are
written with a fixed number of decimal places as specified by the {cmd:ndec}
option (default 3) and significance symbols are appended to coefficients if
{cmd:sigsep}=0. Default={cmd:nooutraw}.

{p 0 4}
{cmd:replace} specifies that any existing output file should be replaced.
If not specified, {cmd:destest}
appends a number to the filename if it already exists. If no valid name has
been found after appending 1 to 20, the process stops and the output is not
saved. Default={cmd:noreplace}.

{title:Macro variables to control layout}

{p}
Global macro variables can be used to specify different defaults for
these options, either for the session or for all Stata sessions, by
placing the global variables in the user's {help profile:profile.do}.

{cmd:$D_NDEC}
{cmd:$D_SIGCUT}
{cmd:$D_SIGSYM}
{cmd:$D_SIGSEP}
{cmd:$D_RAW}
{cmd:$D_REPL}

{p}
Options specified in the {cmd:destest} command string will override these
global variables.

{title:Notes}

{p}
{help desmat} creates global macro variables {cmd:$term1}, {cmd:$term2}, etc.
containing a {it:varlist} for each term in the model. {cmd:destest} runs through
each of these terms, finds the terms corresponding with the {it:termlist}, and runs
{help testparm} with the {it:varlist} corresponding with each term.
If these global variables have not been
defined, {cmd:destest} will only print header information. These global
variables can of course also be used separately in {help testparm}, {help sw}, or
related programs.

{title:Aso see}

{p 0 21}
{bind: }Manual: {hi:[R] Test}
{p_end}
{p 0 21}
On-line: help for
  {help desmat}, {help desrep}, {help outsheet}, {help outshee2}, {help showtrms}, {help test}
{p_end}