Updating a Generalized 

Imputation System to Include a 

Quadratic Program

Laura Bechtel

Nicole Czaplicki

Thong Nguyen

1
Background

• Standard Economic Processing System (StEPS) 

• Generalized software based entirely in SAS used for the various stages of a 

survey like data entry, editing, imputation, and estimation.

• SAS is no longer supporting the AF screens that StEPS uses, so the next 

generation of generalized software is under development, StEPS II.

• General Imputation Subcommittee 

• Our foIus is iマputatioミ aミd testiミg the ミew geミeralized software’s 

imputation capabilities.

• We found a problem! 

• Erroneous solutions could arise when resolving an out of balance complex with negative 

data. 

2



Fictitious Motivating Example

Order of xi’s Y x1x2(nonnegative)x3

Input -200 -12 59 -17

w/o

additional 

requirements

-200 -43 -95 -62

x1, x2, x3-200 -43 0 -157

x2, x1, x3-200 -138 0 -62

x1, x3,x2-200 -43 0 -62

6
Researching a Solution

• The Quarterly Financial Report (QFR)

• A sample survey used to produce estimates of

• Financial statements and ratios

• Two principal economic indicators

• Some data items can be negative

• Nested balance complexes

• Two Objectives for the Solution

• Analyst Correction (AC)

• Currently no automated procedures

• Corrections according to detail item reliability

• Raking Imputed Data

• All detail items being adjusted assumed to have equal reliability

7


Implementation

• Two-Phased

• Survey-specific code based on research code 

• This helped make it a priority for StEPS II

• Added to generalized software (StEPS II)

• Requirements Gathering

• User interface vs backend SAS code

• Largely based on research code

• Research Code

• SAS PROC NLP

10
Requirements Gathering

• Team 

• Project Managers

• Subject Matter Experts (Analysts)

• Methodologists (Mathematical Statisticians)

• User Interface Programmers 

• SAS Programmers

• Initial requirements developed for backend SAS code

• Used to guide user interface requirements

11
Interface Requirements

• Led by project managers not involved in the research

• Initial interpretation of backend SAS code requirements sometimes 

needed to be corrected

• Finding appropriate wording for parameter definition was difficult

• Sometimes exact directions on implementation needed to be 

provided

• Having the User Interface Programmer available during discussions 

was key to the timeliness of the project

12
Examples of Interface Issues

• Numerical Constant

• Constant Detail Item

13
Backend SAS Code Requirements

• Very complicated to explain a quadratic program

• Led by the researchers

• Researchers knew the research code AND the generalized imputation 

code very well, which helped bridge the gap

• Statistical background of backend SAS programmer was key

• Having the backend SAS programmer continually in communication 

was/is imperative to the success of the project

• Some issues were directly related to using PROC NLP

14
PROC NLP

• We briefly considered PROC OPTMODEL, but it requires more complicated input

• Input parameters

• Research – ALL input parameters for ALL cases had macro variables

• Generalized Code – backend SAS programmer cleaned this up 

• PROC NLP has ERRORs in the log that are not really errors

• When default algorithm does not converge and an alternative algorithm is used to resolve 

the balance complex, an error is output to the log

• Problem – Generalized Code bombs if there are errors in the log

• Solution – output PROC NLP log elsewhere

• Generalized Imputation processes all cases in one data step, but PROC NLP 

processes one case at a time

• CALL EXECUTE

• Update the output differently

15
The Database

• Adding the generalized capability to StEPS resulted in an additional 

100 (new) columns in the database for EVERY survey

• Changes to the database are met with resistance

• This is a challenge when adding a new method to a generalized 

system

16
It is a Cyclic Process and Communication is 

Key

Specifications 

for Programs

Programming and 

Testing 

Requirements 

Gathering

17

Vital issues came to light and 

were resolved when the key 

team members were in the 

same room or on the same 

phone speaking to one 

another.

We had a real customer, a real 

problem and a real need. This 

helped us to advocate for the 

implementation when needed.
We Are Still Working!

• New error was found two weeks ago!

• Another round of researchers troubleshooting, identifying the 

solution for the program managers and discussing the solution with 

the SAS programmer. 

18
Thank You

• Laura.Bechtel@census.gov

• Nicole.Czaplicki@census.gov

• Thong.Minh.Nguyen@census.gov

19