📄 ksmirnov.hlp
字号:
{smcl}
{* 01dec2004}{...}
{cmd:help ksmirnov}{right:dialogs: {dialog ksmirnov1:one-sample} {dialog ksmirnov2:two-sample}}
{hline}
{title:Title}
{p2colset 5 21 23 2}{...}
{p2col :{hi:[R] ksmirnov} {hline 2}}Kolmogorov-Smirnov equality-of-distributions test{p_end}
{p2colreset}{...}
{title:Syntax}
{phang}
One-sample Kolmogorov-Smirnov test
{p 8 17 2}
{cmd:ksmirnov} {varname} {cmd:=} {it:{help exp}} {ifin}
{phang}
Two-sample Kolmogorov-Smirnov test
{p 8 17 2}
{cmd:ksmirnov} {varname} {ifin} {cmd:,} {opth "by(varlist:groupvar)"}
[{opt e:xact}]
{title:Description}
{pstd}
{cmd:ksmirnov} performs one- and two-sample Kolmogorov-Smirnov tests of the
equality of distributions. In the first syntax, {varname} is the variable
whose distribution is being tested, and {it:{help exp}} must evaluate to the
corresponding (theoretical) cumulative. In the second syntax,
{it:{help varlist:groupvar}} must take on two distinct values. The
distribution of {it:varname} for the first value of {it:groupvar} is compared
with that of the second value.
{pstd}
When testing for normality, please see {helpb sktest} and {helpb swilk}.
{title:Options}
{dlgtab:Main}
{phang}
{opth "by(varlist:groupvar)"} is required. It specifies a binary variable
that identifies the two groups.
{phang}
{opt exact} specifies that the exact p-value be computed. This may take a
long time if n > 50.
{title:Examples}
{phang}{cmd:. summarize x}{p_end}
{phang}{cmd:. ksmirnov x = normprob((x-r(mean))/sqrt(r(Var)))}
{phang}{cmd:. ksmirnov x, by(group)}{p_end}
{phang}{cmd:. ksmirnov x, by(group) exact}
{title:Also see}
{psee}
Manual: {bf:[R] ksmirnov}
{psee}
Online: {helpb runtest}, {helpb sktest}, {helpb swilk}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -