📄 runtest.hlp
字号:
{smcl}
{* 16mar2005}{...}
{cmd:help runtest} {right:dialog: {bf:{dialog runtest}}}
{hline}
{title:Title}
{p2colset 5 20 22 2}{...}
{p2col :{hi:[R] runtest} {hline 2}}Test for random order{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 17 2}
{cmd:runtest} {varname} [{it:{help in}}]
[{cmd:,} {it:options}]
{synoptset 16}{...}
{synopthdr:options}
{synoptline}
{synopt :{opt c:ontinuity}}continuity correction{p_end}
{synopt :{opt d:rop}}ignore values equal to the threshold{p_end}
{synopt :{opt s:plit}}randomly split values equal to the threshold as above
or below the threshold; default is to count as below{p_end}
{synopt :{opt m:ean}}use mean as threshold; default is median{p_end}
{synopt :{opt t:hreshold(#)}}assign arbitrary threshold; default is
median{p_end}
{synoptline}
{p2colreset}{...}
{title:Description}
{pstd}
{cmd:runtest} tests whether the observations of {varname} are serially
independent{hline 2}that is, whether they occur in a random order{hline 2}by
counting how many runs there are above and below a threshold. By default, the
median is used for the threshold. A small number of runs indicates positive
serial correlation; a large number indicates negative serial correlation.
{title:Options}
{phang}
{opt continuity} specifies a continuity correction that may be helpful in
small samples. If there are fewer than 10 observations either above or below
the threshold, the tables in Swed and Eisenhart provide more reliable critical
values. By default, no continuity correction is used.
{phang}
{opt drop} directs {cmd:runtest} to ignore any values of {varname} that are
equal to the threshold value when counting runs and tabulating observations.
By default, {cmd:runtest} counts a value as being above the threshold when it
is strictly above the threshold and as being below the threshold when it is
less than or equal to the threshold.
{phang}
{opt split} directs {cmd:runtest} to randomly split values of {varname} that
are equal to the threshold. In other other words, when {it:varname} is equal
to threshold, a "coin" is flipped. If it comes up heads, the value is counted
as above the threshold. If it comes up tails, the value is counted as below
the threshold.
{phang}
{opt mean} directs {cmd:runtest} tabulate runs above and below the mean rather
than the median.
{phang}
{opt threshold(#)} specifies an arbitrary threshold to use in counting runs.
For example, if {varname} has already been coded as a 0/1 variable, the median
generally would not be a meaningful separating value.
{title:Example}
{psee}{cmd:. regress} {it:...}{p_end}
{psee}{cmd:. predict resid, resid}{p_end}
{psee}{cmd:. runtest resid, thresh(0)}{p_end}
{title:Also see}
{psee}
Manual: {hi:[R] runtest}{p_end}
{psee}
Online: {helpb ksmirnov}, {helpb kwallis}, {helpb signrank}{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -