Database Reference
In-Depth Information
Table 3.2 NOIR Attribute Types
Categorical (Qualitative)
Numeric (Quantitative)
Nominal
Ordinal
Interval
Ratio
Definition The values
represent labels
that distinguish one
from another.
Attributes
imply a
sequence.
The difference
between two
values is
meaningful.
Both the
difference and
the ratio of
two values are
meaningful.
Examples ZIP codes,
nationality, street
names, gender,
employee ID
numbers, TRUE or
FALSE
Quality of
diamonds,
academic
grades,
magnitude of
earthquakes
Temperature
in Celsius or
Fahrenheit,
calendar dates,
latitudes
Age,
temperature
in Kelvin,
counts, length,
weight
Operations = ,
= , ,
< , , > ,
= , ,
< , , > , ,
+ , -
= , ,
< , , > , ,
+ , - ,
× , ÷
Data of one attribute type may be converted to another. For example, the quality
of diamonds {Fair, Good, Very Good, Premium, Ideal} is considered ordinal but
can be converted to nominal {Good, Excellent} with a defined mapping. Similarly,
a ratio attribute like Age can be converted into an ordinal attribute such as {Infant,
Adolescent, Adult, Senior}. Understanding the attribute types in a given dataset
is important to ensure that the appropriate descriptive statistics and analytic
methods are applied and properly interpreted. For example, the mean and
standard deviation of U.S. postal ZIP codes are not very meaningful or appropriate.
Proper handling of categorical variables will be addressed in subsequent chapters.
Also, it is useful to consider these attribute types during the following discussion
on R data types.
Numeric, Character, and Logical Data Types
Like other programming languages, R supports the use of numeric, character, and
logical (Boolean) values. Examples of such variables are given in the following R
code.
Search WWH ::




Custom Search