What the command does
QCEW retrieves a public industry slice from the U.S. Bureau of Labor Statistics Quarterly Census of Employment and Wages. RainbowStats downloads the BLS CSV, normalizes annual and quarterly fields, removes suppressed observations from analysis, resolves county FIPS codes, and labels the requested industry.
Syntax
Annual data
QCEW(year, ANNUAL, "industryCode")
Uses annual-average establishments and employment, annual wages, average weekly wage, and average annual pay.
Quarterly data
QCEW(year, quarter, "industryCode")
Use quarter 1, 2, 3, or 4. Quarterly employment is the mean of the three reported monthly employment levels.
# All industries, annual county analysis qcew=QCEW(2025,ANNUAL,"10") slide(qcew) # Manufacturing, first quarter manufacturing=QCEW(2025,1,"31-33") slide(EXTRACT(manufacturing,cross_section))
"31-33" are supported; underscores are normalized when required by the BLS filename.
Industry codes
The bundled industry registry contains 2,159 QCEW code-and-title entries. The resolved title appears in the summary and slideshow, so the output says what the selected code represents.
| Code | Industry | Example |
|---|---|---|
10 | Total, all industries | QCEW(2025,ANNUAL,"10") |
31-33 | Manufacturing | QCEW(2025,ANNUAL,"31-33") |
5415 | Computer systems design and related services | QCEW(2025,ANNUAL,"5415") |
6211 | Offices of physicians | QCEW(2025,ANNUAL,"6211") |
Extractable outputs
Use EXTRACT to inspect the source or select a county-level measure.
| Extract | What it returns | Example |
|---|---|---|
slideshow, slides | Summary, interpretation guide, and analysis-ready data table. | slide(EXTRACT(qcew,slideshow)) |
summary, audit | Period, industry title, record counts, suppression count, employment, and wages. | slide(EXTRACT(qcew,summary)) |
data, records, table | Up to 250 analysis-ready county records. | slide(EXTRACT(qcew,data)) |
cross_section, counties, county | The default multivariable county regression and residual analysis. | slide(EXTRACT(qcew,cross_section)) |
count, size | Number of downloaded source records before analytical filtering. | EXTRACT(qcew,count) |
Individual measures
Convenience aliases include jobs, estabs, wages, weekly_wage, avg_weekly_wage, annual_pay, avg_annual_pay, employment_growth, and wage_growth. Average annual pay is available only for annual data.
Complete examples
All-industry county employment structure
qcew=QCEW(2025,ANNUAL,"10") slide(qcew) slide(EXTRACT(qcew,summary)) slide(EXTRACT(qcew,cross_section)) slide(EXTRACT(qcew,data))
Compare wage and employment measures
tech=QCEW(2025,ANNUAL,"5415") slide(EXTRACT(tech,employment)) slide(EXTRACT(tech,average_weekly_wage)) slide(EXTRACT(tech,employment_lq)) slide(EXTRACT(tech,employment_growth))
Readable county labels
County FIPS identifiers are resolved through the U.S. county registry. Regression residual tables therefore show labels such as Eureka, NV, Storey, NV, and Butte, ID rather than leaving the analyst to interpret five-digit codes.
Default cross-section model
The default model asks how county employment for the selected industry varies with the number of establishments and average weekly wages.
Establishment coefficient
An elasticity: the percentage association between establishment count and employment, holding the wage measure constant.
Wage coefficient
The conditional association between average weekly wages and employment. It is descriptive and is not automatically causal.
Positive residual
The county has more employment than the model predicts—possibly reflecting unusually large or employment-intensive establishments.
Negative residual
The county has less employment than the fitted relationship predicts for its establishment count and wage level.
exp(residual) equals actual employment divided by predicted employment. A residual of 0.69 is about twice predicted employment; a residual of -0.69 is about one-half of predicted employment.
How records are selected
The BLS industry file contains multiple geographic levels, ownership classes, establishment-size classes, and disclosure states. RainbowStats builds a coherent county cross-section by applying these rules:
- Keep identifiers recognized by the county registry.
- Keep the all-size establishment category (
size_code = 0). - Exclude records suppressed by BLS disclosure rules.
- Prefer ownership code
0when present, otherwise private ownership code5, otherwise the lowest available ownership code. - Keep one observation per county and use the county name as its analytical label.
- Screen constant and nearly perfectly correlated predictors before regression to avoid a singular design matrix.
The summary reports both downloaded records and county analysis records, making the effect of this filtering visible.
Responsible interpretation
- QCEW is establishment-based administrative data. It measures covered employment and wages, not every form of work or household income.
- Suppressed records are missing for confidentiality reasons; their absence can affect small-area and narrowly defined industry comparisons.
- A location quotient measures local concentration relative to a broader benchmark. It is not a measure of productivity or profitability.
- County results can reflect commuting, industry mix, ownership structure, and establishment scale. A large residual is a lead for investigation, not proof of an economic mechanism.
- Annual and quarterly fields are not interchangeable. Average annual pay is annual-only, while quarterly employment is constructed from three monthly observations.
- Use the period and industry title shown in the summary when publishing or comparing results.
Source and attribution
Data are supplied by the U.S. Bureau of Labor Statistics through the public QCEW data files and API. RainbowStats normalizes the source CSV and constructs the analytical county cross-section; it does not modify the underlying BLS observations.