Why the Row Is Not Always the Unit
An economic dataset is often presented as a table, which makes it tempting to treat each row as one observational unit. That is sometimes correct, but it is not guaranteed. A row might instead summarize a household, describe a transaction, or record one person’s response on behalf of several people. Correctly identifying what the data describe is essential: the unit of analysis determines what a statistic or estimated relationship refers to.
For example, a study of wages may concern individual workers, while a dataset of tax returns may have one record per filing unit. A study of household spending may use transaction records even though its question concerns households. The records contain information, but their format alone does not determine which units answer the research question.
These terms describe different things. The unit is the object of interest; the record is how information is stored; a variable is one of the recorded fields. In a person-level survey, the three may line up simply: a person is the unit, a row is that person’s record, and fields such as age and earnings are variables. In other datasets, the record and unit do not have a one-to-one correspondence.
Start With the Empirical Question
To identify the unit of analysis, first state the question in a way that names the entity or event whose outcome or characteristic is being studied. Then ask what one row represents. Finally, inspect the variables and identifiers to check whether the rows actually correspond to the units named in the question.
Ask whether the question concerns people, households, firms, purchases, loans, or another unit.
Use the dataset’s documentation and fields to determine what a row describes, rather than assuming it is one person or one unit.
For each field, say what it measures and whether it varies across the target units, the records, or both.
Ask whether each unit has exactly one record and each record represents exactly one unit. If not, describe the many-to-one or one-to-many structure explicitly.
The last check is a logical one. If there is exactly one record for every unit, with no record representing multiple units, then row count and unit count agree. If the mapping is not one-to-one, row count alone cannot tell you how many units are represented.
This is not a statistical theorem about the economic process; it is a bookkeeping condition about how the data are organized. A mismatch does not automatically make the data unusable. It does mean that the analysis must respect what each row represents. The estimand and identification assumptions introduced in the earlier material remain tied to the question and target of the study, not automatically to the number of rows in a file.
Person-Level Records
In a person-level dataset, one record typically describes one person. Fields might include age, education, employment status, and earnings. A person identifier is useful for distinguishing records, but it is not itself a measure of age, education, or earnings. The analyst should still confirm whether the row refers to an individual person, rather than a household member’s answer about everyone in the household.
Worked Example: A Person-Level Earnings File
Suppose a hypothetical labor-market file contains the following records. The research question concerns the distribution of annual earnings among the workers represented in the file.
| Worker ID | Age (years) | Annual earnings (dollars) | Employment status |
|---|---|---|---|
| W-14 | 29 | 48,000 | Employed |
| W-27 | 41 | 63,500 | Employed |
| W-38 | 35 | 0 | Not employed |
Unit of analysis. The question concerns workers, so the unit is an individual worker. Record. Each row is described as one worker’s record. There are three rows and, under that stated structure, three worker units represented.
Variables. Age is measured in years; annual earnings are measured in dollars; and employment status is categorical. Worker ID distinguishes records, but its labels are not a quantitative characteristic: an average worker ID would have no meaningful interpretation. The value of zero earnings for W-38 is a recorded value of the earnings variable; it does not change the identity of the unit or turn that row into a different kind of entity.
Household-Level Records
A household-level record describes a household rather than each person living in it. Variables may include household size, total income, rent, or whether the household owns its home. A household’s total income is not the same variable as any one member’s earnings. If a question concerns households, treating each household record as a separate person would change the unit and the interpretation.
Worked Example: Household Totals and Member Counts
Consider a hypothetical dataset assembled to describe household resources. It has one record for each of two households.
| Household ID | Number of members | Total monthly income (dollars) | Monthly rent (dollars) |
|---|---|---|---|
| H-08 | 2 | 4,200 | 1,450 |
| H-19 | 4 | 6,100 | 1,900 |
Unit of analysis. If the question asks how monthly resources vary across households, the unit is a household. Record. Each row summarizes one household, so two records represent two household units—not six person records, even though the member counts sum to \(2+4=6\).
Variables. Number of members is a household characteristic expressed as a count. Total monthly income and monthly rent are household-level amounts, each measured in dollars per month. Household ID is an identifier. The values do not provide the income of each household member separately; that would require person-level information. Thus, one cannot infer how income is distributed among members from these records alone.
Firm Records and Transaction Records
The distinction also matters in business data. A firm-level file may contain one record per company, with variables such as industry, number of employees, or annual revenue. A transaction-level file instead has one record per sale, invoice, or payment. A firm can appear in many transaction records, so the number of rows may exceed the number of firms. If the question concerns firms, the transaction rows are not automatically firm-level observations.
Worked Example: Transactions Linked to Firms
A hypothetical sales file contains the following records. The study question asks how the value of individual purchases varies across transactions.
| Transaction ID | Firm ID | Purchase value (dollars) | Payment type |
|---|---|---|---|
| T-101 | F-3 | 80 | Card |
| T-102 | F-3 | 35 | Cash |
| T-103 | F-9 | 120 | Card |
Unit of analysis. Because the question concerns individual purchases, the unit is a transaction. Each row represents one transaction, giving three transaction units. Purchase value is measured in dollars per transaction, and payment type is categorical at the transaction level.
Where firms enter. Firm ID identifies the firm associated with each transaction. There are only two distinct firms in the three records: F-3 appears twice and F-9 once. Thus, three records represent three transactions but only two firms. If the question instead concerned firm-level outcomes, the target unit would be the firm, and these transaction records would need to be related to that question in an appropriate way. The row count of three would not be a count of firms.
When One Unit Has Multiple Records
One unit can generate several records when the data are recorded at a finer level than the question of interest. A person may make multiple purchases; a firm may issue multiple invoices; a household may have records for several members. In such cases, the repeated appearance of an identifier can be legitimate because the records describe different events or components. It does not, by itself, mean that the file has multiple distinct units of the broader type.
The reverse mismatch is also possible: one record can summarize several units. A record might report a neighborhood average derived from many residents or a household total derived from multiple members. If the analysis is about the group represented by that summary, the group may be the unit. If it is about the underlying people, the summary alone does not supply separate person-level records.
These distinctions can be expressed as a mapping from records to units. A one-to-one mapping means every record represents one unique unit and every unit has one record. A one-to-many pattern, from a unit’s perspective, means one unit appears in several records. A many-to-one pattern means a record aggregates information about multiple smaller units. State the direction in words; “many-to-one” can otherwise be ambiguous about which side is being counted.
A Short Justification: Why Row Counts Can Mislead
Suppose \(R\) is the set of records and \(U\) is the set of target units. If each record corresponds to exactly one distinct unit, the correspondence pairs every element of \(R\) with one different element of \(U\), and every unit is paired. That is a one-to-one correspondence, so the two sets have the same size: \(|R|=|U|\). If one firm has two transaction records, two elements of \(R\) map to the same firm in \(U\); the mapping is not one-to-one, and the equality need not hold. In the sales example, \(|R|=3\), while the number of represented firms is \(2\).
Common Mistakes
- Assuming one row always means one person. A row may represent a household, firm, event, or group summary. Check the record definition.
- Calling every row a separate firm because it contains a firm identifier. A firm may occur in several transaction records. Distinguish the transaction unit from the firm named by the identifier.
- Confusing a variable’s level with the unit of analysis. A person-level record might include a household-level income measure. Say what the field measures and what entity it describes.
- Treating identifiers as substantive measurements. IDs distinguish entities; arithmetic on their labels is generally meaningless.
- Inferring individual values from group totals. A household income total does not reveal each member’s earnings. Do not claim more detail than the record contains.
Check Your Understanding
For each question, identify the unit of analysis and say what one record represents.
- A file has one row per loan application, with applicant ID, loan amount, and decision. The research question concerns approval rates across applications. What is the unit, and which field is an identifier?
- A dataset has one row per store and reports total monthly sales and number of employees. If the question concerns variation in sales across stores, what is the unit? Are the records person-level?
- A household has three members, and a file contains three rows with the same household ID, one per member. How many person records and household units are represented?
- A neighborhood summary file has one row per neighborhood and reports average rent. What is the unit if the question compares average rent across neighborhoods? Can the file reveal each resident’s rent?
- Explain why five transaction records linked to two firms do not represent five firm units.