Data Representation for the stats Package
|
Description
|
|
•
|
The fundamental data structure for the stats package is the statistical list. This is a list containing the following types of items.
|
item
|
a number, or symbolic expression representing
|
|
a single data value.
|
missing
|
a keyword representing missing data.
|
item..item
|
data grouped in a class. For example, 3..4,
|
|
designates a single data item whose value
|
|
is greater than or equal to 3 and
|
|
less than 4.
|
Weight(value, weight)
|
Weighted data.
|
|
The parameter value consists
|
|
of any of the preceding item types, and
|
|
the parameter weight is the weight associated
|
|
with this data item. For example, Weight(3..4, 10),
|
|
can be used to represent 10 entries
|
|
within the class 3..4.
|
|
|
•
|
Some functions, for example, stats[describe, mode], return unevaluated if their argument is a statistical list that contains non-numeric data.
|
|
|
Examples
|
|
Important: The stats package has been deprecated. Use the superseding package Statistics instead. Single entries, with missing observations.
>
|
|
This is equivalent to (if ordering is irrelevant)
>
|
|
Regrouped in classes (note that some information is necessarily lost)
>
|
|
Symbolic values can also be used
>
|
|
If data is numeric, then the mode can be computed.
>
|
|
| (1) |
However, if data contains a non numerical entry
>
|
|
| (2) |
>
|
|
| (3) |
the mode returned unevaluated. More information can be obtained using:
>
|
|
| (4) |
|
|
Download Help Document
Was this information helpful?