Overview of the stats[transform] Subpackage
Calling Sequence
Description
List of stats[transform] Subpackage Commands
Examples
stats[transform]command](arguments)
command(arguments)
Important: The stats package has been deprecated. Use the superseding package Statistics instead.
The stats[transform] subpackage provides various tools for transforming lists of statistical data.
Each command in the stats[transform] package can be accessed by using either the long form or the short form of the command name in the command calling sequence.
The following is a list of available commands.
apply
extends map() to statistical data.
classmark
replace data classes by their class mark (mid-point).
cumulativefrequency
count up the weights of the data items.
deletemissing
delete missing data from the data list.
divideby
divide the data by a number or a
descriptive statistics function.
frequency
give the weights of each data item.
moving
compute moving averages and other moving quantities.
multiapply
apply a formula across multiple data lists.
scaleweight
multiply the weights of the data by a given value.
split
split the data list into multiple lists
of the same weight.
standardscore
replace each data item by its standard score
(z-value).
statsort
sort statistical data.
statvalue
give the value of each data item. That is, set
their weight to 1.
subtractfrom
subtract from the data a number
or a descriptive statistics function.
tally
tally each data item.
tallyinto
tally each item into specified classes.
To display the help page for a particular stats[transform] command, see Getting Help with a Command in a Package.
Some commands either require or use parameters in addition to the data given as arguments. These parameters appear as an index to the command name. See transform[standardscore] for an example.
If a particular call cannot be evaluated, for example trying to find the mode of a statistical list that contains a non-numeric entry, then the call is returned unevaluated. Information is provided in the variable `stats/lasterror` as to the reason why a call was not evaluated. Also, this information is automatically given if infolevel[stats] has a value greater than or equal to one, prior to the unsuccessful call.
with⁡stats:
data≔4,Weight⁡3,10,missing,Weight⁡1..2,25
transformdeletemissing⁡data
4,Weight⁡3,10,Weight⁡1..2,25
transformstatsort⁡data
Weight⁡1..2,25,Weight⁡3,10,4,missing
data2≔1,1,1,2,3,3,4,4,4,4,5,6,6,6,7,8,9,10
transformtally⁡data2
Weight⁡1,3,2,Weight⁡3,2,Weight⁡4,4,5,Weight⁡6,3,7,8,9,10
Remembering that the left boundary of a class is inclusive, and the right boundary is exclusive (so the 10 above belongs to 10..15 and not 5..10, we have:
transformtallyinto⁡data2,0..5,5..10,10..15
Weight⁡0..5,10,Weight⁡5..10,7,10..15
See Also
Statistics
Statistics[DataManipulation]
stats(deprecated)
Download Help Document