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.7.0, release v0.7.0

SAMPLE

Keep a random sample of the cases.

Syntax

SAMPLE proportion.
SAMPLE n FROM m.
A proportion between 0 and 1 keeps each case with that chance; n FROM m keeps exactly n
of the first m cases (fewer when there are fewer than m). Inside DO IF only the cases of
the branch are sampled. The random numbers come from the generator SET RNG chooses, started
by SET SEED or MTINDEX; a new session starts from the default seed.

Example

SAMPLE 500 FROM 3420.

statscraft help SAMPLE prints the same text in the terminal. All commands