transform(deprecated)/statvalue - Maple Help

stats[transform, statvalue]

value of each datum

 Calling Sequence stats[transform, statvalue](data) transform[statvalue](data)

Parameters

 data - statistical list

Description

 • Important: The stats package has been deprecated. Use the superseding package Statistics instead.
 • The statvalue function of the subpackage stats[transform, ...] replaces each data point of data by its value. In other words, it resets the weight of each data point to 1.
 • The order of the data items is not changed.
 • Note that repeated items will still be repeated, though each instance will have a weight of 1. If it is required that only a single instance of the items remain, use transform[tally] prior to using transform[statvalue]. Of course, the call to tally will, in general, change the order of the data.
 • The name of this function is chosen to avoid the clash with the value() function.

Examples

Important: The stats package has been deprecated. Use the superseding package Statistics instead.

 > $\mathrm{with}\left(\mathrm{stats}\right):$
 > $\mathrm{data1}≔\left[\mathrm{Weight}\left(3,2\right),\mathrm{Weight}\left(4,5\right)\right]$
 ${\mathrm{data1}}{≔}\left[{\mathrm{Weight}}{}\left({3}{,}{2}\right){,}{\mathrm{Weight}}{}\left({4}{,}{5}\right)\right]$ (1)
 > $\mathrm{transform}\left[\mathrm{statvalue}\right]\left(\mathrm{data1}\right)$
 $\left[{3}{,}{4}\right]$ (2)

For the data list (which has the item 3 appearing twice)

 > $\mathrm{data2}≔\left[\mathrm{Weight}\left(3,2\right),\mathrm{Weight}\left(3,6\right),\mathrm{Weight}\left(4,5\right)\right]$
 ${\mathrm{data2}}{≔}\left[{\mathrm{Weight}}{}\left({3}{,}{2}\right){,}{\mathrm{Weight}}{}\left({3}{,}{6}\right){,}{\mathrm{Weight}}{}\left({4}{,}{5}\right)\right]$ (3)

compare

 > $\mathrm{transform}\left[\mathrm{statvalue}\right]\left(\mathrm{data2}\right)$
 $\left[{3}{,}{3}{,}{4}\right]$ (4)

with

 > $\mathrm{transform}\left[\mathrm{tally}\right]\left(\mathrm{data2}\right)$
 $\left[{\mathrm{Weight}}{}\left({3}{,}{8}\right){,}{\mathrm{Weight}}{}\left({4}{,}{5}\right)\right]$ (5)
 > $\mathrm{transform}\left[\mathrm{statvalue}\right]\left(\right)$
 $\left[{3}{,}{4}\right]$ (6)

A more general example is:

 > $\mathrm{data3}≔\left[\mathrm{Weight}\left(3,10\right),\mathrm{missing},4,\mathrm{Weight}\left(11..12,3\right),15..17\right]$
 ${\mathrm{data3}}{≔}\left[{\mathrm{Weight}}{}\left({3}{,}{10}\right){,}{\mathrm{missing}}{,}{4}{,}{\mathrm{Weight}}{}\left({11}{..}{12}{,}{3}\right){,}{15}{..}{17}\right]$ (7)
 > $\mathrm{transform}\left[\mathrm{statvalue}\right]\left(\mathrm{data3}\right)$
 $\left[{3}{,}{\mathrm{missing}}{,}{4}{,}{11}{..}{12}{,}{15}{..}{17}\right]$ (8)