Previous: Data Sets Up: Data Sets Next: Loading Data

Data Structures

Zelig uses only three of R's many data structures:

  1. A variable is a one-dimensional vector of length 2#2 .
  2. A data frame is a rectangular matrix with 2#2 rows and 3#3 columns. Each column represents a variable and each row an observation. Each variable may have a different class. (See Section [*] for a list of classes.) You may refer to specific variables from a data frame using, for example, data$variable.
  3. A list is a combination of different data structures. For example, z.out contains both coefficients (a vector) and data (a data frame). Use names() to view the elements available within a list, and the $ operator to refer to an element in a list.

For a more comprehensive introduction, including ways to manipulate these data structures, please refer to Chapter [*].



Gary King 2011-11-29