Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Statscraft 0.61.0, release v0.61.0

NPAR TESTS

Nonparametric tests: one-sample, two and k related samples, two and k independent samples.

Syntax

NPAR TESTS [/CHISQUARE=varlist [(lo,hi)] [/EXPECTED=EQUAL | f1, n*f2, ...]]
           [/BINOMIAL[(p)]=varlist[(cut) | (value1,value2)]] [/RUNS(MEAN | MEDIAN | MODE | value)=varlist]
           [/K-S(NORMAL [mean,sd] | UNIFORM [min,max] | POISSON [mean] | EXPONENTIAL [mean])=varlist]
           [/WILCOXON | /SIGN | /MCNEMAR | /MH=varlist [WITH varlist [(PAIRED)]]]
           [/FRIEDMAN | /KENDALL | /COCHRAN=varlist]
           [/M-W | /K-S | /W-W | /MOSES[(n)] | /K-W | /J-T | /MEDIAN[(value)]=varlist BY var(value1,value2)]
           [/STATISTICS=[DESCRIPTIVES] [QUARTILES] [ALL]] [/MISSING=ANALYSIS | LISTWISE [INCLUDE]]
           [/METHOD=EXACT [TIMER(n)] | MC [CIN(n)] [SAMPLES(n)]] [/SAMPLE]
           [/KS_SIM [CIN(level)] [SAMPLES(n)] [NONORMAL]].

Long names work too: CHI-SQUARE, KOLMOGOROV-SMIRNOV, MANN-WHITNEY, WALD-WOLFOWITZ, KRUSKAL-WALLIS, JONCKHEERE-TERPSTRA. Without WITH every variable is paired with every later one; (PAIRED) pairs the n-th with the n-th. M-W, two-sample K-S, W-W and MOSES compare the two groups (MOSES: the first is the control group); K-W and J-T take every value from value1 to value2 as a group; MEDIAN does so when value1 < value2, and compares the two values otherwise. Exact significance where the method gives it for small samples: binomial; sign and McNemar up to 25 changes; Mann-Whitney when n1 n2 <= 400 and n1 n2 / 2 + min(n1, n2) <= 220; median test up to 30 cases (Fisher); W-W up to 30 cases; Moses.

K-S with normal parameters taken from the data uses the Lilliefors significance. A one-sample K-S against a normal, uniform or exponential distribution fitted to the data also gets a Monte Carlo significance with its interval: SAMPLES samples (10000) of the fitted distribution, the parameters estimated again in each, each test starting at the SET SEED value; KS_SIM sets SAMPLES and the level CIN (99), and NONORMAL leaves the normal out. Past 200,000,000 draws (cases times samples) a warning replaces it. METHOD adds exact significances for Wilcoxon, sign, McNemar, Mann-Whitney and the runs tests (MC gives them too, as exact results replace simulated ones), for the two-sample K-S (every assignment of the cases to the groups), the median test of several groups (every split of the cases above the median), Kruskal-Wallis and Jonckheere-Terpstra (every labelling of the cases), marginal homogeneity (each case off the diagonal puts either value of its pair first) and for Friedman, Kendall and Cochran (every arrangement of each case’s values over the columns, as Exact Sig. and Point Probability; too large a problem keeps the asymptotic one with a warning), for CHISQUARE (every way the cases can fall in the categories), the median test of two groups past 30 cases (Fisher) and the one-sample K-S against a normal, uniform or exponential distribution whose parameters are given (the exact distribution of the largest difference); a one-sample K-S against the Poisson or with parameters from the data keeps the asymptotic significance, with a warning. ANALYSIS (default) leaves out cases missing on a test’s variables, LISTWISE cases missing on any variable of the command.

A weight repeats each case as often as its weight rounded to a whole number. SAMPLE changes nothing.

Example

NPAR TESTS /M-W=income BY gender(1,2) /WILCOXON=before WITH after /STATISTICS=QUARTILES.

statscraft help NPAR TESTS prints the same text in the terminal. All commands