Skip to main content

NLSY79

NLSY79 Appendix 28: NLSY79 Employer History Roster

The Employer History Roster (EHR) has been available to public data users since 2013. This sizeable set of variables incorporates a substantial amount of information about each employer into a single record for each. See Appendix 13: Development of Questionnaires and Codebooks for a description of rosters as a data structure.

Programs that created the EHR can be accessed at the bottom of this page.

Introduction

Throughout NLSY79 history, it has been a common exercise for users to track employer records through multiple survey years. The traditional means of linking job records is somewhat involved, requiring multiple steps and identification of job numbers in current, previous and subsequent survey years (See Appendix 9: Linking Employers Through Survey Years).

The EHR is intended to alleviate if not eliminate the burden of linking jobs for users. In the EHR, employer records through survey years have already been linked into a single continuous cumulative record for each employer ever reported by a respondent. The roster currently contains data for up to 67 employers (up to 67 records). This means that at least one respondent has reported 67 jobs over the course of the NLSY79's 30 survey rounds, spanning 44 years. Most respondents of course will have a much smaller number of jobs reported since 1979 and only a single respondent has reported 67 jobs.

While the EHR does not contain all information ever reported about each employer, it does contain a substantial amount of commonly used data items that are consistently found through the survey's history. Users can also more easily incorporate job-related data items that are not currently on the roster. Instructive examples of how the roster data can be used appear below. Variables that are part of the EHR are available through the NLS Investigator search and extraction tool. These variables can be found in Investigator by using the areas of interest that start with 'EMPLOYER HISTORY,' question names that start with 'EMPLOYERS_ALL' or reference numbers that start with 'E.' The variables in this roster are classified as 'XRND', meaning that they are not linked to any specific survey year (see the Glossary of NLS Terms for a full definition of XRND). Instead, they are updated each round with the most current cumulative data available.

Please note: Variables referenced in the following discussion are described in Table 1, which lists the contents of the Employer History Roster.

Roster construction

The process of constructing the historical EHR began by establishing preliminary linkages similar to that described in Appendix 9. Employers were tracked between current, previous and subsequent survey years using multiple employer numbers in each survey year. After preliminary matches were established, linkages and discrepancies were examined in detail, often using in-house data not available publicly. This might include items such as occupation and industry descriptions and interviewer comments made during the course of an interview, in conjunction with employer names. Examining these items could in some cases serve to clarify connections between jobs reported in various years. Consequently, at least some employer records built in the EHR may be of higher quality than those that can be established using publicly available data.

Employer order

Employers are listed on the EHR in chronological order by the earliest start date reported for a job. For instance:

  • Employer #1 will be the job with the earliest start date ever reported for any job.
  • Employer #4 will be the job with the 4th earliest start date. There will be three jobs with earlier start dates in the roster, numbered Employers #1, #2 and #3.

Please note that the order of an employer on the roster (from 1-67 possible) is based solely on the original start date (the earliest start date available) at the first report of that job. It is not based on the survey year in which the job was first reported. Consider the following example:

  • A respondent has reported 3 jobs through the 1987 survey year. These jobs with original start dates ranging from 1978 to 1984, have the following pattern:
    • Employer first reported 1979, original start date = Jan. 1978
    • Employer first reported 1983, original start date = Nov. 1982
    • Employer first reported 1987, original start date = Jan. 1987

During the 1988 interview, the respondent reports a 4th employer that s/he failed to report at an earlier interview with an original start date of March 1985. While this job will be numbered by the 'unique identification number' as a job reported in the 1988 survey year, its order on the roster will precede the job reported in 1987. Although the 1987 job was reported first, it actually started later. In this simple example, the order of employers on the roster would appear as:

  • Employer #1: first reported 1979, original start date = Jan. 1978, unique id = 19790100
  • Employer #2: first reported 1983, original start date = Nov. 1982, unique id = 19830100
  • Employer #3: first reported 1988, original start date = Mar. 1985, unique id = 19880100
  • Employer #4: first reported 1987, original start date = Jan. 1987, unique id = 19870100

These types of reporting irregularities along with possible isolated errors in recording and data entry errors are not common but are recurrent throughout the life of the survey. As many inconsistencies as possible were resolved in the construction of the EHR.

Roster content

The vast majority of variables currently included on the EHR are directly copied from responses collected during the survey or from data items already coded or created separately for the public release dataset. For example, start and stop dates, currently working status and class of worker are all responses collected during the interview. Occupation and industry variables are coded from responses collected during the interview. Start and stop weeks and array job numbers are variables created by the Work History programs (see Appendix 18: Work History Data).

Table 1 lists the contents of the Employer History Roster by area of interest and question name. The EHR currently contains data for up to 67 jobs ever reported.

Table 1: Employer Roster
EMPLOYER HISTORY Question names Description Source Variables included for:
JOB CHARACTERISTICS EMPLOYERS_ALL_GOVJOB_[YEAR].[JOB#] Was this job a government job? Direct survey responses Each job for each survey year through 1987 (a)
EMPLOYERS_ALL_CPSJOB_[YEAR].[JOB#] Was this job the CPS (current/most recent) job? Direct survey responses Each job for each survey year (a)
EMPLOYERS_ALL_UNION_[YEAR].[JOB#] R covered by union or employee contract on the job? Direct survey responses Each job for each survey year (a)
EMPLOYERS_ALL_CURWK_[YEAR].[JOB#] R currently working for employer at date of interview? Direct survey responses Each job for each survey year (a)
JOB EMPLOYER IDS EMPLOYERS_ALL_NUM_ARRAY_[YEAR].[JOB#] Number loaded into Work History Labor Force Status array Created by Work History Programs Each job for each survey year (a)
EMPLOYERS_ALL_PREVID_[YEAR].[JOB#] Job number of employer from previous interview Direct survey responses Each job for each survey year (a)
EMPLOYERS_ALL_ID_[YEAR].[JOB#] ID number of job in survey year Direct survey responses Each job for each survey year (a)
EMPLOYERS_ALL_UID.[JOB#] (c) Unique identification number for each job, consisting of survey year job first reported, appended with job number in that survey year * 100 (e.g. job #2 first reported in 1980 = 19800200) Created for EHR Each job (b)
JOB HOURS WORKED

EMPLOYERS_ALL_HOURSDAY_[YEAR].[JOB#]

User Note: These variables are not available for self-employed jobs.

Hours per day usually worked at job Direct survey responses Each job for each survey year (a)
EMPLOYERS_ALL_HOURSWEEK_[YEAR].[JOB#] Hours per week usually worked at job Direct survey responses Each job for each survey year (a)
JOB INDUSTRY, OCCUPATION AND CLASS OF WORKER

EMPLOYERS_ALL_IND_[YEAR].[JOB#]

User note: The coding frame for these variables is different for survey years 1979-2000 and for 2002 through current data releases. The 1970 Census coding frame was used for variables through the 2000 survey year. The 2000 Census coding frame was applied in 2002 and subsequent survey years.

Type of business or industry for employer Coded from survey responses Each job for each survey year (a)

EMPLOYERS_ALL_OCC_[YEAR].[JOB#]

User note: The coding frame for these variables is different for survey years 1979-2000 and for 2002 through current data releases. The 1970 Census coding frame was used for variables through the 2000 survey year. The 2000 Census coding frame was applied in 2002 and subsequent survey years.

Occupation for employer Coded from survey responses Each job for each survey year (a)

EMPLOYERS_ALL_COW_[YEAR].[JOB#]

User note: Researchers using these variables across multiple survey rounds should take careful note that the response categories changed in 1994. Categories are consistent from 1979-1993, and from 1994 through the current data release.

Class of worker for employer Coded from survey responses Each job for each survey year (a)
JOB ORIGINAL STARTDATES AND MOST RECENT STOPDATES EMPLOYERS_ALL_STOPDATE_MOST_RECENT.[JOB#]~[D/M/Y] (d) Most recent stopdates for employer Created from survey responses for EHR Each job (b)
EMPLOYERS_ALL_STARTDATE_ORIGINAL.[JOB#]~[D/M/Y] (c) Original startdate for employer Created from survey responses for EHR Each job (b)
JOB PAYRATES AND TIME UNITS EMPLOYERS_ALL_TIMERATE_[YEAR].[JOB#] Time unit for rate of pay Survey responses Each job for each survey year (a)
EMPLOYERS_ALL_PAYRATE_[YEAR].[JOB#] Payrate for employer Coded from survey responses Each job for each survey year (a)
EMPLOYERS_ALL_HRLY_WAGE_[YEAR].[JOB#] Hourly rate of pay for employer Coded from survey responses Each job for each survey year (a)
 JOB START DATES EMPLOYERS_ALL_STARTDATE_[YEAR].[JOB#]~[D/M/Y] Startdate for employer Direct survey responses Each job for each survey year (a)
JOB START WEEKS EMPLOYERS_ALL_STARTWEEK_[YEAR].[JOB#] Week number of start date for job Created by Work History Programs Each job for each survey year (a)
JOB STOP DATES EMPLOYERS_ALL_STOPDATE_[YEAR].[JOB#]~[D/M/Y] Stop date for employer Direct survey responses Each job for each survey year (a)
JOB STOP WEEKS EMPLOYERS_ALL_STOPWEEK_[YEAR].[JOB#] Week number of stop date for job Created by Work History Programs Each job for each survey year (a)
JOB TENURE AND PRETENURE EMPLOYERS_ALL_PRETEN_[YEAR].[JOB#] Months worked for employer before date of last interview Direct survey responses Each job for each survey year (a)
EMPLOYERS_ALL_TENURE_[YEAR].[JOB#] Total weeks tenure with employer Created by Work History Programs Each job for each survey year (a)
EMPLOYERS_ALL_PAST_[YEAR].[JOB#] R work for employer before date of last interview? Direct survey responses Each job for each survey year (a)
 JOB WHY LEFT

EMPLOYERS_ALL_WHYLEFT_[YEAR].[JOB#]

User note: Researchers using these variables across multiple survey rounds should take careful note that the response categories and assignments of response codes have changed a number of times over the 30 survey rounds. For example, response code "2" may mean 'Discharged or fired' in one survey year and 'Plant closed' in another. Likewise, 'Layoff' is grouped with 'Plant closed, or end of temporary or seasonal job' in some survey years and is listed as a separate response category in others.

Reason left job Direct survey responses Each job for each survey year (a)

EMPLOYERS_ALL_WHYLEFT_MOST_RECENT.[JOB#]

User note: This variable contains the most recent reason why the respondent left the job, even if the respondent has since returned and is currently working at that job. Also please note: Response categories for these variables incorporate all possible responses across survey years. For instance, 'Layoff' is listed separately from 'Layoff, plant closed, or end of temporary or seasonal job', because both of these responses categories existed in different survey years.

Reason left job most recent time left Created from survey responses for EHR Each job (b)

EMPLOYERS_ALL_WHYLEFT_MOST_RECENT_COL.[JOB#]

User note: Response categories for these variables collapses all possible categories in the EMPLOYERS_ALL_WHYLEFT_MOST_RECENT.[JOB#] variables into 6 broad categories. This variable contains the most recent reason why the respondent left the job, even if the respondent has since returned and is currently working at that job.

Reason left job most recent time left - collapsed Created from survey responses for EHR Each job (b)
WITHIN JOB GAPS REASON NOT WORKING EMPLOYERS_ALL_WHYNOWK_[YEAR].[JOB#].[GAP#] Reason not working for within job gap Direct survey responses Each job for each gap for each survey year (e)
WITHIN JOB GAPS START DATES EMPLOYERS_ALL_PERSTART_[YEAR].[JOB#].[GAP#] Week number of start dates for within job gap Created by Work History Programs Each job for each gap for each survey year (e)
WITHIN JOB GAPS STOP DATES EMPLOYERS_ALL_PERSTOP_[YEAR].[JOB#].[GAP#] Week number of stop dates for within job gap Created by Work History Programs Each job for each gap for each survey year (e)
WITHIN JOB GAPS WEEKS LOOKING EMPLOYERS_ALL_LOOK_[YEAR].[JOB#].[GAP#] Any weeks looking for work during within job gap Direct survey responses Each job for each gap for each survey year (e)
WITHIN JOB GAPS WEEKS NOT WORKING EMPLOYERS_ALL_NOTLOOK_[YEAR].[JOB#].[GAP#] Number of weeks not looking for work during within job gap Direct survey responses Each job for each gap for each survey year (e)
WITHIN JOB GAPS WEEKS NOT WORKING EMPLOYERS_ALL_WKSNOTWK_[YEAR].[JOB#] Any weeks not working for employer Direct survey responses Each job for each gap for each survey year (e)
  1. Variables created for 'each job for each survey year' will have one variable picked up for each survey year for each job the respondent has reported. For instance, the EMPLOYERS_ALL_CURWK_[YEAR].[JOB#] set of variables will include the 'currently working' status for each job reported, in each survey year that a job was active. If a respondent reports employer #1, spanning from 1980-1989, a variable will be present for employer #1 for each survey year (EMPLOYERS_ALL_CURWK_1980.01, EMPLOYERS_ALL_CURWK_1981.01, EMPLOYERS_ALL_CURWK_1982.01...EMPLOYERS_ALL_CURWK_1989.01). If the respondent reports employer #2, spanning from 1985-1990, another set of those variables would be available for employer #2 for each of those survey years (EMPLOYERS_ALL_CURWK_1985.02, EMPLOYERS_ALL_CURWK_1986.02, etc.). Users should note that the EMPLOYERS_ALL_GOVJOB_[YEAR].[JOB#] set of variables only exist through 1987, when that question was dropped from the survey.
  2. Variables created for 'each job' will have one variable per employer. EMPLOYERS_ALL_UID.[JOB#], EMPLOYERS_ALL_STARTDATE_ORIGINAL.[JOB#]~[D/M/Y] and EMPLOYERS_ALL_STOPDATE_MOST_RECENT.[JOB#]~[D/M/Y] are all examples of variables that appear only once for each job. Each employer has only one unique identification number, one original start date and one most recent stop date. These variables will be present for each reported employer, regardless of the survey years in which they were reported.
  3. Once assigned, the unique id and original start date for an employer will not change except under two conditions: 1) an error is found in the reporting record that necessitates either a correction to an original start date or a reordering of employers, and/or 2) more employers are recovered from archives that necessitate a chronological reordering of employers for a respondent.
  4. The most recent stop date for an employer will be updated with each successive interview during which that employer is reported, until the respondent leaves the employer and does not return.
  5. Variables created for 'each job for each gap for each survey' are similar to the variables in group (b) above, but are present for up to 4 gaps reported within the tenure of each job. For example, if a respondent reports two gaps within the tenure for employer #2 and one gap within the tenure for employer #3 in 1986, gap variables would be present for each employer for that survey year. EMPLOYERS_ALL_WHYNOWK_[YEAR].[JOB#].[GAP#] variables in that case would be EMPLOYERS_ALL_WHYNOWK_1986.02.01 and EMPLOYERS_ALL_WHYNOWK_1986.02.02 (gaps within tenure with employer #2), and EMPLOYERS_ALL_WHYNOWK_1986.03.01 (gap within tenure with employer #3).

Roster structure

The Employer History Roster is structured with a single 'record' for each employer. The information from survey year to survey year for the same employers has already been linked into this single record. This allows researchers to look at the record for an employer for the entire time the job was reported. Information for each specific job can be identified using the following search criteria:

  • Question Name (enter search term) + starts with + 'EMPLOYERS_ALL'
  • Word in Title (enter search term) + contains + 'JOB ##'

The NLS Investigator search captured in Figure 1 below will produce all variables on the roster pertaining to the first job a respondent ever reported, regardless of when that job was first reported. Some respondents may have reported their first job in 1979 while others may not have reported their first job until 1985.

Figure 1. Investigator search to produce all variables pertaining to first job reported

sample NLS Investigator search interface

  1. Select study = NLSY79
  2. Click the VARIABLE SEARCH tab
  3. Next, click the SEARCH sub-tab
  4. In the criteria section:
    1. Select QUESTION NAME (enter search term) from the first drop-down menu,
    2. select "starts with" in the second drop-down menu,
    3. type EMPLOYERS_ALL in the text box, and
    4. click ADD
  5. In the next row of criteria:
    1. Select WORD IN TITLE (enter search term) from the first drop-down menu,
    2. select "contains" in the second drop-down menu,
    3. type Job 01 in the text box, and
  6. Click DISPLAY VARIABLES

Each successive survey year presents the opportunity for a respondent to report additional employers. Consider a respondent with the reporting record depicted in Table 2:

Table 2: Hypothetical respondent's reporting record
Interview date Order in EHR Original start date Most recent stop date Unique ID Employer information reported in survey years Examples of variables present for each job
Feb. 1, 1979 4 Mar. 1, 1978 Feb. 2, 1980 19790100 1979, 1980

EMPLOYERS_ALL_UID.04, EMPLOYERS_ALL_STARTDATE_ORIGINAL.04~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.04~[D/M/Y],

EMPLOYERS_ALL_CURWK_1979.04, EMPLOYERS_ALL_ID_1979.04, EMPLOYERS_ALL_IND_1979.04, EMPLOYERS_ALL_OCC_1979.04, EMPLOYERS_ALL_CURWK_1980.04, EMPLOYERS_ALL_ID_1980.04, EMPLOYERS_ALL_IND_1980.04, EMPLOYERS_ALL_OCC_1980.04

3 Feb. 15, 1978 Dec. 15, 1979 19790200 1979, 1980

EMPLOYERS_ALL_UID.03, EMPLOYERS_ALL_STARTDATE_ORIGINAL.03~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.03~[D/M/Y],

EMPLOYERS_ALL_CURWK_1979.03, EMPLOYERS_ALL_ID_1979.03, EMPLOYERS_ALL_IND_1979.03, EMPLOYERS_ALL_OCC_1979.03, EMPLOYERS_ALL_CURWK_1980.03, EMPLOYERS_ALL_ID_1980.03, EMPLOYERS_ALL_IND_1980.03, EMPLOYERS_ALL_OCC_1980.03

1 Feb. 15, 1977 Jan. 15, 1979 19790300 1979

EMPLOYERS_ALL_UID.01, EMPLOYERS_ALL_STARTDATE_ORIGINAL.01~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.01~[D/M/Y],

EMPLOYERS_ALL_CURWK_1979.01, EMPLOYERS_ALL_ID_1979.01, EMPLOYERS_ALL_IND_1979.01, EMPLOYERS_ALL_OCC_1979.01

2 Apr. 1, 1977 Dec. 31, 1978 19790400 1979

EMPLOYERS_ALL_UID.02, EMPLOYERS_ALL_STARTDATE_ORIGINAL.02~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.02~[D/M/Y],

EMPLOYERS_ALL_CURWK_1979.02, EMPLOYERS_ALL_ID_1979.02, EMPLOYERS_ALL_IND_1979.02, EMPLOYERS_ALL_OCC_1979.02

Jan. 15, 1980 5 Jun. 15, 1979 Aug. 1, 1981 19800100 1980, 1981, 1982

EMPLOYERS_ALL_UID.05, EMPLOYERS_ALL_STARTDATE_ORIGINAL.05~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.05~[D/M/Y],

EMPLOYERS_ALL_CURWK_1980.05, EMPLOYERS_ALL_ID_1980.05, EMPLOYERS_ALL_IND_1980.05, EMPLOYERS_ALL_OCC_1980.05, EMPLOYERS_ALL_CURWK_1981.05, EMPLOYERS_ALL_ID_1981.05, EMPLOYERS_ALL_IND_1981.05, EMPLOYERS_ALL_OCC_1981.05, EMPLOYERS_ALL_CURWK_1982.05, EMPLOYERS_ALL_ID_1982.05, EMPLOYERS_ALL_IND_1982.05, EMPLOYERS_ALL_OCC_1982.05

6 Sep. 15, 1979 Jun. 1, 1980 19800200 1980, 1981

EMPLOYERS_ALL_UID.06, EMPLOYERS_ALL_STARTDATE_ORIGINAL.06~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.06~[D/M/Y],

EMPLOYERS_ALL_CURWK_1980.06, EMPLOYERS_ALL_ID_1980.06, EMPLOYERS_ALL_IND_1980.06, EMPLOYERS_ALL_OCC_1980.06, EMPLOYERS_ALL_CURWK_1981.06, EMPLOYERS_ALL_ID_1981.06, EMPLOYERS_ALL_IND_1981.06, EMPLOYERS_ALL_OCC_1981.06

Mar. 4, 1981 8 Nov. 15, 1980 Nov. 15, 1981 19810100 1981, 1982

EMPLOYERS_ALL_UID.08, EMPLOYERS_ALL_STARTDATE_ORIGINAL.08~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.08~[D/M/Y],

EMPLOYERS_ALL_CURWK_1981.08, EMPLOYERS_ALL_ID_1981.08, EMPLOYERS_ALL_IND_1981.08, EMPLOYERS_ALL_OCC_1981.08, EMPLOYERS_ALL_CURWK_1982.08, EMPLOYERS_ALL_ID_1982.08, EMPLOYERS_ALL_IND_1982.08, EMPLOYERS_ALL_OCC_1982.08

7 Aug. 15, 1980 Jun. 30, 1981 19810200 1981, 1982

EMPLOYERS_ALL_UID.07, EMPLOYERS_ALL_STARTDATE_ORIGINAL.07~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.07~[D/M/Y],

EMPLOYERS_ALL_CURWK_1981.07, EMPLOYERS_ALL_ID_1981.07, EMPLOYERS_ALL_IND_1981.07, EMPLOYERS_ALL_OCC_1981.07, EMPLOYERS_ALL_CURWK_1982.07, EMPLOYERS_ALL_ID_1982.07, EMPLOYERS_ALL_IND_1982.07, EMPLOYERS_ALL_OCC_1982.07

9 Dec. 1, 1980 Feb. 28, 1981 19810300 1981

EMPLOYERS_ALL_UID.09, EMPLOYERS_ALL_STARTDATE_ORIGINAL.09~[D/M/Y], EMPLOYERS_ALL_MOST_RECENT_STOPDATE.09~[D/M/Y],

EMPLOYERS_ALL_CURWK_1981.09, EMPLOYERS_ALL_ID_1981.09, EMPLOYERS_ALL_IND_1981.09, EMPLOYERS_ALL_OCC_1981.09

Feb. 2, 1982           Please note: Jobs with unique ids 19800100, 19810100 and 19810200 would still be active during the period between the 1981 and 1982 interview and would therefore have information reported during the 1982 interview.

In the example in Table 2, the respondent has reported four employers at the initial 1979 interview, two additional employers at the 1980 interview, and three more new employers at the 1981 interview.

  • The original start date, most recent stop date and unique id variables fall into the category of variables in Table 1 created for 'each job'. They will be present for all jobs reported by a respondent. If by 1990, the respondent has reported 13 jobs, 13 original start dates, 13 original stop dates and 13 unique ids will be present in the EHR for that respondent.
  • In the Table 2 example, those variables falling into the other categories in Table 1 (variables present for each job (and each gap if applicable) for each survey year in which the job is reported), will be present only for the survey years listed in column 6 ('Employer information reported in survey years'), as those are the survey years in which information on the specific jobs would have been collected. Examples of the variables that would be present for the respondent and jobs listed in Table 2 are in the final column ('Examples of variables present for each job').

Variables for all jobs will not be present for all respondents. For example:

  • A respondent reporting only 5 jobs through 2010 will have no data at all for jobs 6 through 67.
  • Likewise, a respondent reporting their 28th employer starting in 1990 will have no data for that 28th employer picked up from survey years 1979-1989. In this instance, variables EMPLOYERS_ALL_UID.28, EMPLOYERS_ALL_STARTDATE_ORIGINAL.28~[D/M/Y], and EMPLOYERS_ALL_MOST_RECENT_STARTDATE.28~[D/M/Y] will be present but variables from the specific survey years 1979-89 (for instance, EMPLOYERS_ALL_OCC_1979.28, EMPLOYERS_ALL_OCC_1980.28, EMPLOYERS_ALL_OCC_1981.28, etc.) will not be present. Those variables will appear for 1990 when the job is first reported and be present for each subsequent survey year in which the job is reported. If this employer is reported in 1990, 1991 and 1992, EMPLOYERS_ALL_OCC_1990.28, EMPLOYERS_ALL_OCC_1991.28 and EMPLOYERS_ALL_OCC_1992.28 will be present for that respondent for job 28. Occupation codes for all other survey years prior and subsequent will be missing for that job for that respondent.

In addition, different series of variables may have missing items, depending on the reporting pattern. For instance:

  • Users may find that there is data for jobs 1-33 and jobs 36-40 in 1994, but no data for jobs 34-35. Such a pattern would indicate that no respondents reported what would be their 34th and 35th job during the 1994 interview.
  • There are also instances in which specific variable series have similar gaps. For instance, in a specific year, one might find industry and occupation codes for jobs 1-33 and 36-40, but again not for the 34th and 35th job. Such a pattern could result because no one reported their 34th and 35th job that year. Alternatively if several respondents reported a 34th/35th job that survey year, but those jobs did not meet the criteria (based on hours worked and length of time) that would have led to collection of industry and occupation descriptions, there would be no industry and occupation data from that survey year.

Linking to non-roster employer variables

While a large number of commonly used employer-related variables have been incorporated into the EHR, there are some variables in various survey years that have not. Users can link employer variables from a specific survey year that are not currently on the EHR to the cumulative record for an employer on the EHR by using the EMPLOYERS_ALL_ID_[YEAR].[JOB#] variables. These variables contain the identification number of a job in a specific survey year in which it was reported. The following paragraphs describe several examples of linking scenarios.

Imagine that a researcher wants to link data on promotions asked in 1989 to the cumulative employer record found in the EHR. Using the EMPLOYERS_ALL_ID_1989.[JOB#] variables, one can link the promotions data for the correct employer in 1989 to the cumulative employer record in the EHR. To accomplish this, the value of EMPLOYERS_ALL_ID_1989.[JOB#] would be checked for each employer on the EHR. If that value is '1,' the promotion variables for job #1 in 1989 would be linked. If the value of EMPLOYERS_ALL_UID_1989.[JOB#] is '2,' promotion variables for job #2 in 1989 would be linked, and so on.

In another example, one might want to link the EHR cumulative employer record with the information on the respondent's employee status (regular, consultant, contractor, temp worker) asked in 1994, 1996 and 1998. One would again use the EMPLOYERS_ALL_ID_1994.[JOB#], EMPLOYERS_ALL_ID_1996.[JOB#] and EMPLOYERS_ALL_ID_1998.[JOB#] variables in the same way described above to link to the appropriate employee status variables in each year. If the value of EMPLOYERS_ALL_ID_1994.24 is '1' then the employee status variables for employer #1 in 1994 would be linked to the cumulative record for job #24 on the EHR. If the value of EMPLOYERS_ALL_ID_1994.30 is '1' then those variables would be linked to the cumulative record for job #30 on the EHR. Following a similar procedure, the employee status variables for 1996 and 1998 could be linked to the appropriate cumulative job record on the EHR.

In addition, it is now possible to identify which cumulative job records on the EHR link to specific job numbers on the Work History Labor Force Status and Dual Jobs arrays. The EHR includes a set of variables called EMPLOYERS_ALL_NUM_ARRAY_[YEAR].[JOB#]. These variables contain the job number assigned by the Work History programs to each job for each survey year. The job number assigned by the Work History programs consists of the survey round and the number of the job for that survey year. So for instance, the 2nd job reported in 1993 (round 15 of the survey) would appear as job #1502 on the Labor Force Status and/or Dual Job arrays. If this same job was reported as job #1 in 1994 (round 16 of the survey), it would appear as job #1601 in the Labor Force Status array. The EMPLOYERS_ALL_NUM_ARRAY_[YEAR].[JOB#] variables allow users to identify and track a specific employer through the Work History job arrays more easily. For instance, if a user wants additional information on the first job a respondent reported after a gap, and the Work History array job number is 1701, one would want to identify which of the employers in the EHR (1-59) contains 1701 in the EMPLOYERS_ALL_NUM_ARRAY_1996.[JOB#] variable. Establishing this link to the EHR then provides an expanded series of variables depicting the entire history of the employer.

User notes

The Employer History Roster was made available after a considerable effort and was a long time in the making. Improvements will continue to be made as time allows. Some possible areas of improvement and expansion are discussed below:

Each survey year there are a small number of cases that report more than five employers. Prior to 1993, jobs 6+ were provided and stored on separate media. With the many technological transformations that have taken place in the past two decades, much of the information on this small set of jobs in each older survey year has become very difficult to recover from original sources, and is generally not included in the EHR. Reporting of more than five jobs per survey year is not common.

As mentioned earlier, the EHR includes a great deal, but not all, information collected on employers in each survey. For instance, some information on employee status (regular, temp worker, contractor, etc.), starting wages and hours of a job, fringe benefits applying to a job, etc. have been collected in various survey years but are not included on the EHR. Users can access this additional data by linking to individual Employer Supplements in the appropriate survey years.

Employer History Roster programs

Click a topic below to view programming code. Note: ## index reference variables for employers 1-67 in the Employer History Roster.

Variable names in programs and NLSY79 data releases

/****************************** Variables Used ******************************/
/**Variable Names in program            Variable Names in data release**/
UID_## (1-67)				EMPLOYERS_ALL_UID.## (1-67)
STAD_ORI_## (1-67)			EMPLOYERS_ALL_STARTDATE_ORIGINAL.##~D (1-67)
STAM_ORI_## (1-67)			EMPLOYERS_ALL_STARTDATE_ORIGINAL.##~M (1-67)
STAY_ORI_## (1-67)			EMPLOYERS_ALL_STARTDATE_ORIGINAL.##~Y (1-67)
STOD_FIN_## (1-67)			EMPLOYERS_ALL_STOPDATE_MOST_RECENT.##~D (1-67)
STOM_FIN_## (1-67)			EMPLOYERS_ALL_STOPDATE_MOST_RECENT.##~M (1-67)
STOY_FIN_## (1-67)			EMPLOYERS_ALL_STOPDATE_MOST_RECENT.##~Y (1-67)
REASONLEFT_## (1-67)			EMPLOYERS_ALL_WHYLEFT_MOST_RECENT.## (1-67)
REASONLEFTC_## (1-67)			EMPLOYERS_ALL_WHYLEFT_MOST_RECENT_COL.## (1-67)
ID_2022_## (1-67)			EMPLOYERS_ALL_ID_2022.## (1-67)
STAD_2022_## (1-67)			EMPLOYERS_ALL_STADATE_2022.##~D (1-67)
STAM_2022_## (1-67)			EMPLOYERS_ALL_STADATE_2022.##~M (1-67)
STAY_2022_## (1-67)			EMPLOYERS_ALL_STADATE_2022.##~Y (1-67)
STOD_2022_## (1-67)			EMPLOYERS_ALL_STOPDATE_2022.##~D (1-67)
STOM_2022_## (1-67)			EMPLOYERS_ALL_STOPDATE_2022.##~M (1-67)
STOY_2022_## (1-67)			EMPLOYERS_ALL_STOPDATE_2022.##~Y (1-67)
STAWK_2022_## (1-67)			EMPLOYERS_ALL_STARTWEEK_2022.## (1-67)
STOWK_2022_## (1-67)			EMPLOYERS_ALL_STOPWEEK_2022.## (1-67)
COW_2022_## (1-67)			EMPLOYERS_ALL_COW_2022.## (1-67)
CPSJOB_2022_## (1-67)			EMPLOYERS_ALL_CPSJOB_2022.## (1-67)
CURWK_2022_## (1-67)			EMPLOYERS_ALL_CURWK_2022.## (1-67)
HRP_2022_## (1-67)			EMPLOYERS_ALL_HRLY_WAGE_2022.## (1-67)
HRSDAY_2022_## (1-67)			EMPLOYERS_ALL_HOURSDAY_2022.## (1-67)
HRSWK_2022_## (1-67)			EMPLOYERS_ALL_HOURSWEEK_2022.## (1-67)
IND_2022_## (1-67)			EMPLOYERS_ALL_IND_2022.## (1-67)
JOBNUM_A_2022_## (1-67)			EMPLOYERS_ALL_NUM_ARRAY_2022.## (1-67)
MOSLI_2022_## (1-67)			EMPLOYERS_ALL_PRETEN_2022.## (1-67)
OCC_2022_## (1-67)			EMPLOYERS_ALL_OCC_2022.## (1-67)
PREVID_2022_## (1-67)			EMPLOYERS_ALL_PREVID_2022.## (1-67)
RELEFT_2022_## (1-67)			EMPLOYERS_ALL_WHYLEFT_2022.## (1-67)
ROP_2022_## (1-67)			EMPLOYERS_ALL_PAYRATE_2022.## (1-67)
TENURE_2022_## (1-67)			EMPLOYERS_ALL_TENURE_2022.## (1-67)
TUROP_2022_## (1-67)			EMPLOYERS_ALL_TIMERATE_2022.## (1-67)
UNI_2022_## (1-67)			EMPLOYERS_ALL_UNION_2022.## (1-67)
WBEFDI_2022_## (1-67)			EMPLOYERS_ALL_PAST_2022.## (1-67)
UNEM_2022_## (1-67)			EMPLOYERS_ALL_WKSNOTWK_2022.## (1-67)
STAWK_GAP1_2022_## (1-67)		EMPLOYERS_ALL_PERSTAR_2022.##.01 (1-67)
STAWK_GAP2_2022_## (1-67)		EMPLOYERS_ALL_PERSTAR_2022.##.02 (1-67)
STAWK_GAP3_2022_## (1-67)		EMPLOYERS_ALL_PERSTAR_2022.##.03 (1-67)
STAWK_GAP4_2022_## (1-67)		EMPLOYERS_ALL_PERSTAR_2022.##.04 (1-67)
STOWK_GAP1_2022_## (1-67)		EMPLOYERS_ALL_PERSTOP_2022.##.01 (1-67)
STOWK_GAP2_2022_## (1-67)		EMPLOYERS_ALL_PERSTOP_2022.##.02 (1-67)
STOWK_GAP3_2022_## (1-67)		EMPLOYERS_ALL_PERSTOP_2022.##.03 (1-67)
STOWK_GAP4_2022_## (1-67)		EMPLOYERS_ALL_PERSTOP_2022.##.04 (1-67)
REA_GAP1_2022_## (1-67)			EMPLOYERS_ALL_WHYNOWK_2022.##.01 (1-67)
REA_GAP2_2022_## (1-67)			EMPLOYERS_ALL_WHYNOWK_2022.##.02 (1-67)
REA_GAP3_2022_## (1-67)			EMPLOYERS_ALL_WHYNOWK_2022.##.03 (1-67)
REA_GAP4_2022_## (1-67)			EMPLOYERS_ALL_WHYNOWK_2022.##.04 (1-67)
LOOK_GAP1_2022_## (1-67)		EMPLOYERS_ALL_LOOK_2022.##.01 (1-67)
LOOK_GAP2_2022_## (1-67)		EMPLOYERS_ALL_LOOK_2022.##.02 (1-67)
LOOK_GAP3_2022_## (1-67)		EMPLOYERS_ALL_LOOK_2022.##.03 (1-67)
LOOK_GAP4_2022_## (1-67)		EMPLOYERS_ALL_LOOK_2022.##.04 (1-67)
NLOOK_GAP1_2022_## (1-67)		EMPLOYERS_ALL_NOTLOOK_2022.##.01 (1-67)
NLOOK_GAP2_2022_## (1-67)		EMPLOYERS_ALL_NOTLOOK_2022.##.02 (1-67)
NLOOK_GAP3_2022_## (1-67)		EMPLOYERS_ALL_NOTLOOK_2022.##.03 (1-67)
NLOOK_GAP4_2022_## (1-67)		EMPLOYERS_ALL_NOTLOOK_2022.##.04 (1-67)

Linkjobs79_22

did2022=SYMBOL_CURDATE_D;
dim2022=SYMBOL_CURDATE_M;
diy2022=SYMBOL_CURDATE_Y;
stay20221=EMPLOYER_STARTDATE_01_Y;
stay20222=EMPLOYER_STARTDATE_02_Y;
stay20223=EMPLOYER_STARTDATE_03_Y;
stay20224=EMPLOYER_STARTDATE_04_Y;
stay20225=EMPLOYER_STARTDATE_05_Y;
stay20226=EMPLOYER_STARTDATE_06_Y;
stay20227=EMPLOYER_STARTDATE_07_Y;
stay20228=EMPLOYER_STARTDATE_08_Y;
stay20229=EMPLOYER_STARTDATE_09_Y;
stay202210=EMPLOYER_STARTDATE_10_Y;
stay202211=EMPLOYER_STARTDATE_11_Y;
stay202212=EMPLOYER_STARTDATE_12_Y;
stay202213=EMPLOYER_STARTDATE_13_Y;
stay202214=EMPLOYER_STARTDATE_14_Y;
array stay (i)		stay20221-stay20229 stay202210-stay202214;
array curf (i)		EMPLOYER_CURFLAG_01-EMPLOYER_CURFLAG_14;
array curwk (i)		curwk20221-curwk20229 curwk202210-curwk202214;
totemp2022=0;
do i=1 to 14;
	if stay~=. then do;
		totemp2022=totemp2022+1;
		if curf~=. then curwk=curf;
		else if curf=. then curwk=-3;
	end;
	else if stay=. then curwk=-4;
end;
array intyear (*) diy1979 diy1980 diy1981 diy1982 diy1983 diy1984 diy1985 diy1986 diy1987 diy1988 diy1989 diy1990 
				  diy1991 diy1992 diy1993 diy1994 diy1996 diy1998 diy2000 diy2002 diy2004 diy2006 diy2008 diy2010 
				  diy2012 diy2014 diy2016 diy2018 diy2020;
array intrd   (*) i1-i29 (1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 
				  1996 1998 2000 2002 2004 2006 2008 2010 2012 2014 2016 2018 2020);
if dim2022=. then dim2022=-5;
if did2022=. then did2022=-5;
if diy2022=. then diy2022=-5;
do i=dim(intyear) to 1 by -1;
	if (intyear(i)>0) then do;
		linty=intrd(i);
		leave;
	leave;
	end;
end;
array curwk22	    curwk20221-curwk20229 curwk202210-curwk202014;
do over prev;
	if diy2022=-5 then do;
		prev=-5;
		curwk22=-5;
		totemp2022=-5;
	end;
end;
array job2022 	   (j)  job2022_job2022_1-job2022_job2022_14;
array curwk2022	   (j)  curwk20221-curwk20229 curwk202210-curwk202214;
array jobnum2022   (j)  job_num_a2022_1-job_num_a2022_14;
totemp_wh2022=0;
do j=1 to 14;
	if curwk2022=-5 then do;
		job2022=-5;
		totemp_wh2022=-5;
	end;
	else if curwk2022>-4 then job2022=j;
	else job2022=-4;
	if jobnum2022>0 then totemp_wh2022=totemp_wh2022+1;
end;
array previd    (14)		previd2022_1-previd2022_14;
array check		(14)		check1-check14;
do h=1 to 14;
	do k=1 to 14;
		if h~=k then do;
			if previd(h)>0 and previd(h)=previd(k) then check(h)=k;
		end;
	end;
end;
%macro cc(linty);
	%do a=1 %to 19;
		%do i=1 %to 14;
			if previd2022_&i=&a then do;
				if linty=&linty and job&linty._job&linty._&a~=-4 then job&linty._job2022_&i=&a;
				if linty=&linty and job&linty._job&linty._&a=-4 then flag_jmatch2022_&i=1;
			end;
			else if previd2022_&i=-4 then do;
				job2020_job2022_&i=-4;
			end;
			else if previd2022_&i=-5 then do;
				job2020_job2022_&i=-5;
				flag_jmatch2022_&i=-5;
			end;
			if job&linty._job2022_&i=. then job&linty._job2022_&i=-4;
			if flag_jmatch2022_&i=. then flag_jmatch2022_&i=0;
		%end;
	%end;
%mend cc;
%macro lint;
	%do linty=2020 %to 1994 %by -2;
		%cc(&linty);
	%end;
	%do linty=1993 %to 1979 %by -1;
		%cc(&linty);
	%end;
%mend lint;
%lint;
*Have to break it down since there is not enough memory to run from 1979 to 2018 because of the macros;
*Link job# in 22 to job# in 1994-2018;
%macro cc(a,linty);
	%if job&linty._job2022_&a>0 %then %do;
		%do yr=2018 %to 1994 %by -2;
			%if &linty>&yr %then %do;
				%do i=1 %to 14;
					%do j=1 %to 14;
						if job&linty._job2022_&a=&i and job&yr._job&linty._&i=&j then job&yr._job2022_&a=&j;
						else if job&linty._job2022_&a=-5 then job&yr._job2022_&a=-5;
					%end;
				%end;
			%end;
		%end;
	%end;
%mend cc;
%macro job(linty);
	%do a=1 %to 14;
		%cc(&a,&linty);
	%end;
%mend job;
%macro lint;
	%do linty=2020 %to 1996 %by -2;
		%job(&linty);
	%end;
%mend lint;
%lint;
*Link job# in 22 to job# in 1987-1993;
%macro cc(a,linty);
	%if job&linty._job2022_&a>0 %then %do;
		%do yr=1993 %to 1987 %by -1;
			%if &linty>&yr %then %do;
				%do i=1 %to 14;
					%do j=1 %to 14;
						if job&linty._job2022_&a=&i and job&yr._job&linty._&i=&j then job&yr._job2022_&a=&j;
						else if job&linty._job2022_&a=-5 then job&yr._job2022_&a=-5;
					%end;
				%end;
			%end;
		%end;
	%end;
%mend cc;
%macro job(linty);
	%do a=1 %to 14;
		%cc(&a,&linty);
	%end;
%mend job;
%macro lint;
	%do linty=2020 %to 1994 %by -2;
		%job(&linty);
	%end;
	%do linty=1993 %to 1988 %by -1;
		%job(&linty);
	%end;
%mend lint;
%lint;
*Link job# in 22 to job# in 1983-1986;
%macro cc(a,linty);
	%if job&linty._job2022_&a>0 %then %do;
		%do yr=1986 %to 1983 %by -1;
			%if &linty>&yr %then %do;
				%do i=1 %to 14;
					%do j=1 %to 14;
						if job&linty._job2022_&a=&i and job&yr._job&linty._&i=&j then job&yr._job2022_&a=&j;
						else if job&linty._job2022_&a=-5 then job&yr._job2022_&a=-5;
					%end;
				%end;
			%end;
		%end;
	%end;
%mend cc;
%macro job(linty);
	%do a=1 %to 14;
		%cc(&a,&linty);
	%end;
%mend job;
%macro lint;
	%do linty=2020 %to 1994 %by -2;
		%job(&linty);
	%end;
	%do linty=1993 %to 1984 %by -1;
		%job(&linty);
	%end;
%mend lint;
%lint;
*Link job# in 22 to job# in 1979-1982;
%macro cc(a,linty);
	%if job&linty._job2022_&a>0 %then %do;
		%do yr=1982 %to 1979 %by -1;
			%if &linty>&yr %then %do;
				%do i=1 %to 14;
					%do j=1 %to 14;
						if job&linty._job2022_&a=&i and job&yr._job&linty._&i=&j then job&yr._job2022_&a=&j;
						else if job&linty._job2022_&a=-5 then job&yr._job2022_&a=-5;
					%end;
				%end;
			%end;
		%end;
	%end;
%mend cc;
%macro job(linty);
	%do a=1 %to 14;
		%cc(&a,&linty);
	%end;
%mend job;
%macro lint;
	%do linty=2020 %to 1994 %by -2;
		%job(&linty);
	%end;
	%do linty=1993 %to 1980 %by -1;
		%job(&linty);
	%end;
%mend lint;
%lint;
if diy2000>0 then diy2000=2000;
if diy2002>0 then diy2002=2002;
if diy2004>0 then diy2004=2004;
if diy2006>0 then diy2006=2006;
if diy2008>0 then diy2008=2008;
if diy2010>0 then diy2010=2010;
if diy2012>0 then diy2012=2012;
if diy2014>0 then diy2014=2014;
if diy2016>0 then diy2016=2016;
if diy2018>0 then diy2018=2018;
if diy2020>0 then diy2020=2020;
if diy2022>0 then diy2022=2022;
%macro cc(a);
	%do j=1994 %to 1979 %by -1;
		if (job&j._job2022_&a >0 and job&j._job2022_&a <=9) and diy&j>0 then do;
			staj1_job2022_&a=put(diy&j,4.)||'0'||put(job&j._job2022_&a,1.);
		end;
		else if job&j._job2022_&a >=10 and diy&j>0 then do;
			staj1_job2022_&a=put(diy&j,4.)||put(job&j._job2022_&a,2.);
		end;
	%end;
	%do j=2022 %to 1996 %by -2;
		if (job&j._job2022_&a >0 and job&j._job2022_&a <=9) and diy&j>0 then do;
			staj2_job2022_&a=put(diy&j,4.)||'0'||put(job&j._job2022_&a,1.);
		end;
		else if job&j._job2022_&a >=10 and diy&j>0 then do;
			staj2_job2022_&a=put(diy&j,4.)||put(job&j._job2022_&a,2.);
		end;
	%end;
%mend cc;
%macro job;
	%do a=1 %to 14;
		%cc(&a);
	%end;
%mend job;
%job;
%macro dd(b);
	%do i=2 %to 1 %by -1;
		if staj&i._job2022_&b ~=' ' then do;
			staj_job2022_&b=staj&i._job2022_&b;
		end;
	%end;
%mend dd;
%macro jb;
	%do b=1 %to 14;
		%dd(&b);
	%end;
%mend jb;
%jb;
array staj_job2022 (k) 	staj_job2022_1-staj_job2022_14;
array job2022 	   (k) 	job2022_job2022_1-job2022_job2022_14;
do k=1 to 14;
	if staj_job2022=. and job2022=-5 then staj_job2022=-5;
	else if staj_job2022=. then staj_job2022=-4;
end;
array staj2022 	(*)		staj_job2022_1-staj_job2022_14;
do i=1 to 14;
	do j=1 to 14;
		if i~=j then do;
			if staj2022(i)>0 and staj2022(i)=staj2022(j) then check=1;
		end;
	end;
end;

Endjob22

%macro id(yra,yrb);
	%do j=1 %to 19;
		%do i=1 %to 14;
			if job&yra._job&yrb._&j=&i then job&yrb._job&yra._&i=&j;
			else if job&yra._job&yrb._&j=-4 and job&yrb._job&yra._&i=. then job&yrb._job&yra._&i=-4;
			else if diy&yrb=-5 or diy&yra=-5 then job&yrb._job&yra._&i=-5;
		%end;
	%end;
%mend id;
%macro rd(yrb);
    %do yra = 1979 %to 1994;
        %id(&yra,&yrb);
    %end; 
    %do yra = 1996 %to 2022 %by 2;
        %id(&yra,&yrb);
    %end; 
%mend rd;
%macro rds;
    %do yrb = 1979 %to 1994;
        %rd(&yrb);
    %end; 
    %do yrb = 1996 %to 2022 %by 2;
        %rd(&yrb);
    %end; 
%mend rds;
%rds;
if diy2000>0 then diy2000=2000;
if diy2002>0 then diy2002=2002;
if diy2004>0 then diy2004=2004;
if diy2006>0 then diy2006=2006;
if diy2008>0 then diy2008=2008;
if diy2010>0 then diy2010=2010;
if diy2012>0 then diy2012=2012;
if diy2014>0 then diy2014=2014;
if diy2016>0 then diy2016=2016;
if diy2018>0 then diy2018=2018;
if diy2020>0 then diy2020=2020;
if diy2022>0 then diy2022=2022;
%macro dd(a,yrb);
	%do j=1979 %to 1994 %by 1;
		if &j>=&yrb then do;
			if (job&j._job&yrb._&a>=1 and job&j._job&yrb._&a<=9) and diy&j>0 then do; 
				endj1_job&yrb._&a=put(&j,4.)||'0'||put(job&j._job&yrb._&a,1.);
			end;
			else if job&j._job&yrb._&a>=10 and diy&j>0 then do; 
				endj1_job&yrb._&a=put(&j,4.)||put(job&j._job&yrb._&a,2.);
			end;
		end;
	%end;
	%do j=1996 %to 2022 %by 2;
		if &j>=&yrb then do;
			if (job&j._job&yrb._&a>=1 and job&j._job&yrb._&a<=9) and diy&j>0 then do; 
				endj2_job&yrb._&a=put(&j,4.)||'0'||put(job&j._job&yrb._&a,1.);
			end;
			else if job&j._job&yrb._&a>=10 and diy&j>0 then do; 
				endj2_job&yrb._&a=put(&j,4.)||put(job&j._job&yrb._&a,2.);
			end;
		end;
	%end;
%mend dd;
%macro job(yrb);
	%do a=1 %to 19;
		%dd(&a,&yrb);
	%end;
%mend job;
%macro rds;
    %do yrb = 1979 %to 1994;
        %job(&yrb);
    %end; 
    %do yrb = 1996 %to 2022 %by 2;
        %job(&yrb);
    %end; 
%mend rds;
%rds;
%macro ee(b,yrc);
	%do i=1 %to 2 %by 1;
		if endj&i._job&yrc._&b ~=' ' then do;
			endj_job&yrc._&b=endj&i._job&yrc._&b;
		end;
	%end;
%mend ee;
%macro jb(yrc);
	%do b=1 %to 19;
		%ee(&b,&yrc);
	%end;
%mend jb;
%macro rd;
    %do yrc = 1979 %to 1994;
        %jb(&yrc);
    %end; 
    %do yrc = 1996 %to 2022 %by 2;
        %jb(&yrc);
    %end; 
%mend rd;
%rd;

Stopdate22_final

%macro id(a,yra,yrb);
	%do i=1 %to 9;
		if endj_job&yra._&a=put((&yrb.0&i),6.) then do;
			stod_final&yra._&a=stod&yrb._&i;
			stom_final&yra._&a=stom&yrb._&i;
			stoy_final&yra._&a=stoy&yrb._&i;
		end;
	%end;
	%do i=10 %to 14;*14 jobs in 2022;
		if endj_job&yra._&a=put((&yrb&i),6.) then do;
			stod_final&yra._&a=stod&yrb._&i;
			stom_final&yra._&a=stom&yrb._&i;
			stoy_final&yra._&a=stoy&yrb._&i;
		end;
	%end;
%mend id;
%macro jb(yra,yrb);
	%do a=1 %to 19;
		%id(&a,&yra,&yrb);
	%end;
%mend jb;
%macro rd(yrb);
    %do yra = 1979 %to 1994;
        %jb(&yra,&yrb);
    %end; 
    %do yra = 1996 %to 2022 %by 2;
        %jb(&yra,&yrb);
    %end; 
%mend rd;
%macro rds;
    %do yrb = 2022 %to 2022;
        %rd(&yrb);
    %end; 
%mend rds;
%rds;

Employers_roster_7922_job

array staj  (236)            staj_job1979_1-staj_job1979_5 staj_job1980_1-staj_job1980_5 staj_job1981_1-staj_job1981_5 staj_job1982_1-staj_job1982_5
                                                             staj_job1983_1-staj_job1983_5 staj_job1984_1-staj_job1984_5 staj_job1985_1-staj_job1985_5 staj_job1986_1-staj_job1986_5
                                                             staj_job1987_1-staj_job1987_5 staj_job1988_1-staj_job1988_5 staj_job1989_1-staj_job1989_5 staj_job1990_1-staj_job1990_5
                                                             staj_job1991_1-staj_job1991_5 staj_job1992_1-staj_job1992_5 staj_job1993_1-staj_job1993_5 staj_job1994_1-staj_job1994_5
                                                             staj_job1996_1-staj_job1996_5 staj_job1998_1-staj_job1998_12 staj_job2000_1-staj_job2000_10 staj_job2002_1-staj_job2002_9 
                                                             staj_job2004_1-staj_job2004_12 staj_job2006_1-staj_job2006_11 staj_job2008_1-staj_job2008_11 staj_job2010_1-staj_job2010_9
                                                             staj_job2012_1-staj_job2012_9 staj_job2014_1-staj_job2014_14 staj_job2016_1-staj_job2016_8 staj_job2018_1-staj_job2018_19
                                                             staj_job2020_1-staj_job2020_13 staj_job2022_1-staj_job2022_14;

do i=1 to 236;
            do j=1 to 236;
                        if i~=j then do;
                                    if staj(i)=-4|staj(i)=-5 then staj(i)=' ';
                                    else if staj(j)=-4| staj(j)=-5 then staj(j)=' ';
                                    else if staj(j)=staj(i) then staj(j)=' ' ;
                        end;
            end;
end;

array job          (*)        job1-job236;

count=0;
do i=1 to 236;
            if staj(i)~=' ' then do;
                        count=count+1;
                        j=count;
                        job(j)=staj(i);
            end;
end;


array stad        (j)                    stad1979_1-stad1979_5  stad1980_1-stad1980_5  stad1981_1-stad1981_5  stad1982_1-stad1982_5
                                                            stad1983_1-stad1983_5  stad1984_1-stad1984_5  stad1985_1-stad1985_5  stad1986_1-stad1986_5
                                                            stad1987_1-stad1987_5  stad1988_1-stad1988_5  stad1989_1-stad1989_5  stad1990_1-stad1990_5
                                                            stad1991_1-stad1991_5  stad1992_1-stad1992_5  stad1993_1-stad1993_5  stad1994_1-stad1994_5
                                                            stad1996_1-stad1996_5  stad1998_1-stad1998_12 stad2000_1-stad2000_10 stad2002_1-stad2002_9 
                                                            stad2004_1-stad2004_12 stad2006_1-stad2006_11 stad2008_1-stad2008_11 stad2010_1-stad2010_9
                                                            stad2012_1-stad2012_9  stad2014_1-stad2014_14 stad2016_1-stad2016_8 stad2018_1-stad2018_19
                                                            stad2020_1-stad2020_13 stad2022_1-stad2022_14;
array stam       (j)                    stam1979_1-stam1979_5  stam1980_1-stam1980_5  stam1981_1-stam1981_5  stam1982_1-stam1982_5
                                                            stam1983_1-stam1983_5  stam1984_1-stam1984_5  stam1985_1-stam1985_5  stam1986_1-stam1986_5
                                                            stam1987_1-stam1987_5  stam1988_1-stam1988_5  stam1989_1-stam1989_5  stam1990_1-stam1990_5
                                                            stam1991_1-stam1991_5  stam1992_1-stam1992_5  stam1993_1-stam1993_5  stam1994_1-stam1994_5
                                                            stam1996_1-stam1996_5  stam1998_1-stam1998_12 stam2000_1-stam2000_10 stam2002_1-stam2002_9 
                                                            stam2004_1-stam2004_12 stam2006_1-stam2006_11 stam2008_1-stam2008_11 stam2010_1-stam2010_9
                                                            stam2012_1-stam2012_9  stam2014_1-stam2014_14 stam2016_1-stam2016_8 stam2018_1-stam2018_19
                                                            stam2020_1-stam2020_13 stam2022_1-stam2022_14;
array stay        (j)                    stay1979_1-stay1979_5  stay1980_1-stay1980_5  stay1981_1-stay1981_5  stay1982_1-stay1982_5
                                                            stay1983_1-stay1983_5  stay1984_1-stay1984_5  stay1985_1-stay1985_5  stay1986_1-stay1986_5
                                                            stay1987_1-stay1987_5  stay1988_1-stay1988_5  stay1989_1-stay1989_5  stay1990_1-stay1990_5
                                                            stay1991_1-stay1991_5  stay1992_1-stay1992_5  stay1993_1-stay1993_5  stay1994_1-stay1994_5
                                                            stay1996_1-stay1996_5  stay1998_1-stay1998_12 stay2000_1-stay2000_10 stay2002_1-stay2002_9 
                                                            stay2004_1-stay2004_12 stay2006_1-stay2006_11 stay2008_1-stay2008_11 stay2010_1-stay2010_9
                                                            stay2012_1-stay2012_9  stay2014_1-stay2014_14 stay2016_1-stay2016_8 stay2018_1-stay2018_19
                                                            stay2020_1-stay2020_13 stay2022_1-stay2022_14;
array stod        (j)                    stod1979_1-stod1979_5  stod1980_1-stod1980_5  stod1981_1-stod1981_5  stod1982_1-stod1982_5
                                                            stod1983_1-stod1983_5  stod1984_1-stod1984_5  stod1985_1-stod1985_5  stod1986_1-stod1986_5
                                                            stod1987_1-stod1987_5  stod1988_1-stod1988_5  stod1989_1-stod1989_5  stod1990_1-stod1990_5
                                                            stod1991_1-stod1991_5  stod1992_1-stod1992_5  stod1993_1-stod1993_5  stod1994_1-stod1994_5
                                                            stod1996_1-stod1996_5  stod1998_1-stod1998_12 stod2000_1-stod2000_10 stod2002_1-stod2002_9 
                                                            stod2004_1-stod2004_12 stod2006_1-stod2006_11 stod2008_1-stod2008_11 stod2010_1-stod2010_9
                                                            stod2012_1-stod2012_9  stod2014_1-stod2014_14 stod2016_1-stod2016_8 stod2018_1-stod2018_19
                                                            stod2020_1-stod2020_13 stod2022_1-stod2022_14;
array stom       (j)                    stom1979_1-stom1979_5  stom1980_1-stom1980_5  stom1981_1-stom1981_5  stom1982_1-stom1982_5
                                                            stom1983_1-stom1983_5  stom1984_1-stom1984_5  stom1985_1-stom1985_5  stom1986_1-stom1986_5
                                                            stom1987_1-stom1987_5  stom1988_1-stom1988_5  stom1989_1-stom1989_5  stom1990_1-stom1990_5
                                                            stom1991_1-stom1991_5  stom1992_1-stom1992_5  stom1993_1-stom1993_5  stom1994_1-stom1994_5
                                                            stom1996_1-stom1996_5  stom1998_1-stom1998_12 stom2000_1-stom2000_10 stom2002_1-stom2002_9 
                                                            stom2004_1-stom2004_12 stom2006_1-stom2006_11 stom2008_1-stom2008_11 stom2010_1-stom2010_9
                                                            stom2012_1-stom2012_9  stom2014_1-stom2014_14 stom2016_1-stom2016_8 stom2018_1-stom2018_19
                                                            stom2020_1-stom2020_13 stom2022_1-stom2022_14;
array stoy        (j)                    stoy1979_1-stoy1979_5  stoy1980_1-stoy1980_5  stoy1981_1-stoy1981_5  stoy1982_1-stoy1982_5
                                                            stoy1983_1-stoy1983_5  stoy1984_1-stoy1984_5  stoy1985_1-stoy1985_5  stoy1986_1-stoy1986_5
                                                            stoy1987_1-stoy1987_5  stoy1988_1-stoy1988_5  stoy1989_1-stoy1989_5  stoy1990_1-stoy1990_5
                                                            stoy1991_1-stoy1991_5  stoy1992_1-stoy1992_5  stoy1993_1-stoy1993_5  stoy1994_1-stoy1994_5
                                                            stoy1996_1-stoy1996_5  stoy1998_1-stoy1998_12 stoy2000_1-stoy2000_10 stoy2002_1-stoy2002_9 
                                                            stoy2004_1-stoy2004_12 stoy2006_1-stoy2006_11 stoy2008_1-stoy2008_11 stoy2010_1-stoy2010_9
                                                            stoy2012_1-stoy2012_9  stoy2014_1-stoy2014_14 stoy2016_1-stoy2016_8 stoy2018_1-stoy2018_19
                                                            stoy2020_1-stoy2020_13 stoy2022_1-stoy2022_14;
array stadp1 (j)           stadp1_1979_1-stadp1_1979_5  stadp1_1980_1-stadp1_1980_5  stadp1_1981_1-stadp1_1981_5  stadp1_1982_1-stadp1_1982_5
                                                            stadp1_1983_1-stadp1_1983_5  stadp1_1984_1-stadp1_1984_5  stadp1_1985_1-stadp1_1985_5  stadp1_1986_1-stadp1_1986_5
                                                            stadp1_1987_1-stadp1_1987_5  stadp1_1988_1-stadp1_1988_5  stadp1_1989_1-stadp1_1989_5  stadp1_1990_1-stadp1_1990_5
                                                            stadp1_1991_1-stadp1_1991_5  stadp1_1992_1-stadp1_1992_5  stadp1_1993_1-stadp1_1993_5  stadp1_1994_1-stadp1_1994_5
                                                            stadp1_1996_1-stadp1_1996_5  stadp1_1998_1-stadp1_1998_12 stadp1_2000_1-stadp1_2000_10 stadp1_2002_1-stadp1_2002_9 
                                                            stadp1_2004_1-stadp1_2004_12 stadp1_2006_1-stadp1_2006_11 stadp1_2008_1-stadp1_2008_11 stadp1_2010_1-stadp1_2010_9
                                                            stadp1_2012_1-stadp1_2012_9  stadp1_2014_1-stadp1_2014_14 stadp1_2016_1-stadp1_2016_8 stadp1_2018_1-stadp1_2018_19
                                                            stadp1_2020_1-stadp1_2020_13 stadp1_2022_1-stadp1_2022_14;
array stamp1 (j)          stamp1_1979_1-stamp1_1979_5  stamp1_1980_1-stamp1_1980_5  stamp1_1981_1-stamp1_1981_5  stamp1_1982_1-stamp1_1982_5
                                                            stamp1_1983_1-stamp1_1983_5  stamp1_1984_1-stamp1_1984_5  stamp1_1985_1-stamp1_1985_5  stamp1_1986_1-stamp1_1986_5
                                                            stamp1_1987_1-stamp1_1987_5  stamp1_1988_1-stamp1_1988_5  stamp1_1989_1-stamp1_1989_5  stamp1_1990_1-stamp1_1990_5
                                                            stamp1_1991_1-stamp1_1991_5  stamp1_1992_1-stamp1_1992_5  stamp1_1993_1-stamp1_1993_5  stamp1_1994_1-stamp1_1994_5
                                                            stamp1_1996_1-stamp1_1996_5  stamp1_1998_1-stamp1_1998_12 stamp1_2000_1-stamp1_2000_10 stamp1_2002_1-stamp1_2002_9 
                                                            stamp1_2004_1-stamp1_2004_12 stamp1_2006_1-stamp1_2006_11 stamp1_2008_1-stamp1_2008_11 stamp1_2010_1-stamp1_2010_9
                                                            stamp1_2012_1-stamp1_2012_9  stamp1_2014_1-stamp1_2014_14 stamp1_2016_1-stamp1_2016_8 stamp1_2018_1-stamp1_2018_19
                                                            stamp1_2020_1-stamp1_2020_13 stamp1_2022_1-stamp1_2022_14;
array stayp1 (j)           stayp1_1979_1-stayp1_1979_5  stayp1_1980_1-stayp1_1980_5  stayp1_1981_1-stayp1_1981_5  stayp1_1982_1-stayp1_1982_5
                                                            stayp1_1983_1-stayp1_1983_5  stayp1_1984_1-stayp1_1984_5  stayp1_1985_1-stayp1_1985_5  stayp1_1986_1-stayp1_1986_5
                                                            stayp1_1987_1-stayp1_1987_5  stayp1_1988_1-stayp1_1988_5  stayp1_1989_1-stayp1_1989_5  stayp1_1990_1-stayp1_1990_5
                                                            stayp1_1991_1-stayp1_1991_5  stayp1_1992_1-stayp1_1992_5  stayp1_1993_1-stayp1_1993_5  stayp1_1994_1-stayp1_1994_5
                                                            stayp1_1996_1-stayp1_1996_5  stayp1_1998_1-stayp1_1998_12 stayp1_2000_1-stayp1_2000_10 stayp1_2002_1-stayp1_2002_9 
                                                            stayp1_2004_1-stayp1_2004_12 stayp1_2006_1-stayp1_2006_11 stayp1_2008_1-stayp1_2008_11 stayp1_2010_1-stayp1_2010_9
                                                            stayp1_2012_1-stayp1_2012_9  stayp1_2014_1-stayp1_2014_14 stayp1_2016_1-stayp1_2016_8  stayp1_2018_1-stayp1_2018_19
                                                            stayp1_2020_1-stayp1_2020_13 stayp1_2022_1-stayp1_2022_14;
array code (j)  $  a1-a236 
                                                            ('197901' '197902' '197903' '197904' '197905'
                                                             '198001' '198002' '198003' '198004' '198005'
                                                             '198101' '198102' '198103' '198104' '198105'
                                                             '198201' '198202' '198203' '198204' '198205'
                                                             '198301' '198302' '198303' '198304' '198305'
                                                             '198401' '198402' '198403' '198404' '198405'
                                                             '198501' '198502' '198503' '198504' '198505'
                                                             '198601' '198602' '198603' '198604' '198605'
                                                             '198701' '198702' '198703' '198704' '198705'
                                                             '198801' '198802' '198803' '198804' '198805'
                                                             '198901' '198902' '198903' '198904' '198905'
                                                             '199001' '199002' '199003' '199004' '199005'
                                                             '199101' '199102' '199103' '199104' '199105'
                                                             '199201' '199202' '199203' '199204' '199205'
                                                             '199301' '199302' '199303' '199304' '199305'
                                                             '199401' '199402' '199403' '199404' '199405'
                                                             '199601' '199602' '199603' '199604' '199605'
                                                             '199801' '199802' '199803' '199804' '199805' '199806' '199807' '199808' '199809' '199810'
                                                             '199811' '199812'
                                                             '200001' '200002' '200003' '200004' '200005' '200006' '200007' '200008' '200009' '200010'
                                                             '200201' '200202' '200203' '200204' '200205' '200206' '200207' '200208' '200209'
                                                             '200401' '200402' '200403' '200404' '200405' '200406' '200407' '200408' '200409' '200410'
                                                             '200411' '200412'
                                                             '200601' '200602' '200603' '200604' '200605' '200606' '200607' '200608' '200609' '200610'
                                                             '200611'
                                                             '200801' '200802' '200803' '200804' '200805' '200806' '200807' '200808' '200809' '200810'
                                                             '200811'
                                                             '201001' '201002' '201003' '201004' '201005' '201006' '201007' '201008' '201009'
                                                             '201201' '201202' '201203' '201204' '201205' '201206' '201207' '201208' '201209'                                       
                                                             '201401' '201402' '201403' '201404' '201405' '201406' '201407' '201408' '201409' '201410'
                                                             '201411' '201412' '201413' '201414'
                                                             '201601' '201602' '201603' '201604' '201605' '201606' '201607' '201608'
                                                             '201801' '201802' '201803' '201804' '201805' '201806' '201807' '201808' '201809' '201810'
                                                             '201811' '201812' '201813' '201814' '201815' '201816' '201817' '201818' '201819'
                                                             '202001' '202002' '202003' '202004' '202005' '202006' '202007' '202008' '202009' '202010'
                                                             '202011' '202012' '202013'                                         
                                                             '202201' '202202' '202203' '202204' '202205' '202206' '202207' '202208' '202209' '202210'
                                                             '202211' '202212' '202213' '202214');                                               

do over stay;
            sta_d=stad;
            sta_m=stam;
            sta_y=stay;
            sto_d=stod;
            sto_m=stom;
            sto_y=stoy;
            gapsta_d=stadp1;
            gapsta_m=stamp1;
            gapsta_y=stayp1;

            jobcode=code;
            output;
end;

array dido (k)              did1979 did1980 did1981 did1982    did1983 did1984 did1985 did1986 did1987 did1988 
                                                            did1989 did1990         did1991 did1992 did1993 did1994 did1996 did1998 did2000 did2002
                                                            did2004 did2006 did2008 did2010 did2012 did2014 did2016 did2018 did2020 did2022;

array dimo (k)             dim1979 dim1980 dim1981 dim1982 dim1983 dim1984 dim1985 dim1986 dim1987 dim1988
                                                            dim1989 dim1990      dim1991 dim1992 dim1993 dim1994 dim1996 dim1998 dim2000 dim2002
                                                            dim2004 dim2006 dim2008 dim2010 dim2012 dim2014 dim2016 dim2018 dim2020 dim2022;

array diyo (k)              diy1979 diy1980 diy1981 diy1982    diy1983 diy1984 diy1985 diy1986 diy1987 diy1988
                                                            diy1989 diy1990         diy1991 diy1992 diy1993 diy1994 diy1996 diy1998 diy2000 diy2002
                                                            diy2004 diy2006 diy2008 diy2010 diy2012 diy2014 diy2016 diy2018 diy2020 diy2022;

array dlido (k)             dlid1979 dlid1980 dlid1981 dlid1982 dlid1983 dlid1984 dlid1985 dlid1986 dlid1987 dlid1988
                                                            dlid1989 dlid1990 dlid1991 dlid1992 dlid1993 dlid1994 dlid1996 dlid1998 dlid2000 dlid2002
                                                            dlid2004 dlid2006 dlid2008 dlid2010 dlid2012 dlid2014 dlid2016 dlid2018 dlid2020 dlid2022;

array dlimo (k)                        dlim1979 dlim1980 dlim1981 dlim1982       dlim1983 dlim1984 dlim1985 dlim1986 dlim1987 dlim1988
                                                            dlim1989 dlim1990 dlim1991 dlim1992 dlim1993 dlim1994 dlim1996 dlim1998 dlim2000 dlim2002
                                                            dlim2004 dlim2006 dlim2008 dlim2010 dlim2012 dlim2014 dlim2016 dlim2018 dlim2020 dlim2022;

array dliyo (k)             dliy1979 dliy1980 dliy1981 dliy1982 dliy1983 dliy1984 dliy1985 dliy1986 dliy1987 dliy1988
                                                            dliy1989 dliy1990 dliy1991 dliy1992 dliy1993 dliy1994 dliy1996 dliy1998 dliy2000 dliy2002
                                                            dliy2004 dliy2006 dliy2008 dliy2010 dliy2012 dliy2014 dliy2016 dliy2018 dliy2020 dliy2022;
array code (k)  $  a1-a30
                                                            ('1979' '1980' '1981' '1982' '1983' '1984' '1985' '1986' '1987' '1988' 
                                                             '1989' '1990' '1991' '1992' '1993' '1994' '1996' '1998' '2000' '2002'
                                                             '2004' '2006' '2008' '2010' '2012' '2014' '2016' '2018' '2020' '2022');                                       
do over dido;
            dim=dimo;
            did=dido;
            diy=diyo;
            dlim=dlimo;
            dlid=dlido;
            dliy=dliyo;

            year=code;
            output;
end;

if sta_y=0 or sta_y=1900 then do;
            sta_d=-3;
            sta_m=-3;
            sta_y=-3;
end;

lintdate=mdy(dlim, dlid, dliy);
startdate=mdy(sta_m, sta_d, sta_y);
gapdate=mdy(gapsta_m, gapsta_d, gapsta_y);
stopdate=mdy(sto_m, sto_d, sto_y);
intdate=mdy(dim, did, diy);

if (sta_d<0 and sta_m>0 and sta_y>0) then do;
            sta_d1=1;
            sta_m1=sta_m;
            sta_y1=sta_y;
end;

else if (sta_d<0 and sta_m<0 and sta_y>0) then do;
            sta_d1=1;
            sta_m1=1;
            sta_y1=sta_y;
end;

else if (sta_d>0 and sta_m<0 and sta_y>0) then do;
            if stopdate>0 and sta_y<sto_y and sta_y>dliy then do;
                        sta_m1=1;
                        sta_d1=sta_d;
                        sta_y1=sta_y;
            end;
            else if stopdate>0 and sta_y<sto_y and sta_y=dliy then do;
                        sta_m1=dlim+3;
                        sta_d1=sta_d;
                        sta_y1=sta_y;
            end;
            else if stopdate>0 and sta_y=sto_y and sta_y>=dliy then do;
                        sta_m1=sto_m-1;
                        sta_d1=sta_d;
                        sta_y1=sta_y;
            end;

            else if stopdate=. and sto_y>0 and dliy<sto_y then do;
                        sta_m1=1;
                        sta_d1=sta_d;
                        sta_y1=sta_y;
            end;
end;


else if (sta_y<0) then do;
            if gapsta_y>0 then do;
                        if gapsta_d<0 and gapsta_m<0 then do;
                                    sta_d1=1;
                                    sta_m1=8;
                                    sta_y1=2004;
                        end;
                        else if gapsta_d<0 and gapsta_m>0 then do;
                                    gapsta_d=1;
                                    a=((mdy(gapsta_m, gapsta_d, gapsta_y))-(lintdate))/2;
                                    b=lintdate+a;
                                    sta_d1=day(b);
                                    sta_m1=month(b);
                                    sta_y1=year(b);
                        end;
                        else if gapsta_d>0 and gapsta_m>0 then do;;
                                    if year=1979 then do;
                                                sta_d1=gapsta_d;
                                                sta_m1=gapsta_m;
                                                sta_y1=gapsta_y;
                                    end;
                                    else if year~=1979 then do;
                                    a=(gapdate-lintdate)/2;
                                    b=lintdate+a;
                                    sta_d1=day(b);
                                    sta_m1=month(b);
                                    sta_y1=year(b);
                                    end;
                        end;
            end;
            else if gapsta_y<0 then do;
                        if year=1979 then do;
                                    b=intdate-180;
                                    sta_d1=day(b);
                                    sta_m1=month(b);
                                    sta_y1=year(b);
                        end;
                        else if stopdate<lintdate and stopdate~=. then do;
                                    b=stopdate-90;
                                    sta_d1=day(b);
                                    sta_m1=month(b);
                                    sta_y1=year(b);
                        end;
                        else if stopdate<intdate and stopdate~=. then do;
                                    a=(stopdate-lintdate)/2;
                                    b=lintdate+a;
                                    sta_d1=day(b);
                                    sta_m1=month(b);
                                    sta_y1=year(b);
                        end;
                        else if stopdate=intdate or stopdate=. then do;
                                    a=(intdate-lintdate)/2;
                                    b=lintdate+a;
                                    sta_d1=day(b);
                                    sta_m1=month(b);
                                    sta_y1=year(b);
                        end;
            end;
end;
else do;
            sta_d1=sta_d;
            sta_m1=sta_m;
            sta_y1=sta_y;
end;

if sta_y1<0 then do;
            c=intdate-365;
            sta_d1=day(c);
            sta_m1=month(c);
            sta_y1=year(c);
end;

startdate1=mdy(sta_m1, sta_d1, sta_y1);

if diy>=2014 then do;
            if startdate1<lintdate then do;
                        sta_m1=dlim;
                        sta_d1=dlid+1;
                        sta_y1=dliy;
            end;
end;

proc sort; by norcid sta_y1 sta_m1 sta_d1;
run;dliy then do;
		sta_m1=1;
		sta_d1=sta_d;
		sta_y1=sta_y;
	end;
	else if stopdate>0 and sta_y0 and sta_y=sto_y and sta_y>=dliy then do;
		sta_m1=sto_m-1;
		sta_d1=sta_d;
		sta_y1=sta_y;
	end;
	else if stopdate=. and sto_y>0 and dliy0 then do;
		if gapsta_d<0 and gapsta_m<0 then do;
			sta_d1=1;
			sta_m1=8;
			sta_y1=2004;
		end;
		else if gapsta_d<0 and gapsta_m>0 then do;
			gapsta_d=1;
			a=((mdy(gapsta_m, gapsta_d, gapsta_y))-(lintdate))/2;
 			b=lintdate+a;
			sta_d1=day(b);
			sta_m1=month(b);
			sta_y1=year(b);
		end;
		else if gapsta_d>0 and gapsta_m>0 then do;;
			if year=1979 then do;
				sta_d1=gapsta_d;
				sta_m1=gapsta_m;
				sta_y1=gapsta_y;
			end;
			else if year~=1979 then do;
			a=(gapdate-lintdate)/2;
 			b=lintdate+a;
			sta_d1=day(b);
			sta_m1=month(b);
			sta_y1=year(b);
			end;
		end;
	end;
	else if gapsta_y<0 then do;
		if year=1979 then do;
 			b=intdate-180;
			sta_d1=day(b);
			sta_m1=month(b);
			sta_y1=year(b);
		end;
		else if stopdate=2014 then do;
	if startdate1
	

Employers_roster_22_uid_name_stadate

%macro id(a,yra);
	%do i=1 %to 9;
		if job&a=put((&yra.0&i),6.) then do;
			unique_id_&a=put((&yra.0&i),6.)||'00';
			if empname&yra._&i~=' ' then empname_&a=empname&yra._&i;
			else if empname&yra._&i=' ' then empname_&a='MISSING NAME';
			if (stad&yra._&i~=-4|stam&yra._&i~=-4|stay&yra._&i~=-4) then do;
				stad_ori_&a=stad&yra._&i;
				stam_ori_&a=stam&yra._&i;
				stay_ori_&a=stay&yra._&i;
			end;
			else if (stad&yra._&i=-4 and stam&yra._&i=-4 and stay&yra._&i=-4) then do;
				stad_ori_&a=-3;
				stam_ori_&a=-3;
				stay_ori_&a=-3;
			end;
		end;
	%end;
	%do i=10 %to 14;
		if job&a=put((&yra&i),6.) then do;
			unique_id_&a=put((&yra&i),6.)||'00';
			if empname&yra._&i~=' ' then empname_&a=empname&yra._&i;
			else if empname&yra._&i=' ' then empname_&a='MISSING NAME';
			if (stad&yra._&i~=-4|stam&yra._&i~=-4|stay&yra._&i~=-4) then do;
				stad_ori_&a=stad&yra._&i;
				stam_ori_&a=stam&yra._&i;
				stay_ori_&a=stay&yra._&i;
			end;
			else if (stad&yra._&i=-4 and stam&yra._&i=-4 and stay&yra._&i=-4) then do;
				stad_ori_&a=-3;
				stam_ori_&a=-3;
				stay_ori_&a=-3;
			end;
		end;
	%end;
%mend id;
%macro jb(yra);
	%do a=1 %to 67;
		%id(&a,&yra);
	%end;
%mend jb;
%macro rds;
    %do yra = 2022 %to 2022;
        %jb(&yra);
    %end; 
%mend rds;
%rds;

Employers_roster_22_id

%macro id(yra);
	%do a=1 %to 67;
		%do i=1 %to 9;
			if job&a=put((&yra.0&i),6.) and job2022_job&yra._&i>0 then id_2022_&a=job2022_job&yra._&i;
			else if job&a=put((&yra.0&i),6.) and job2022_job&yra._&i=-5 then id_2022_&a=-5;
		%end;
		%do i=10 %to 19;
			if job&a=put((&yra&i),6.) and job2022_job&yra._&i>0 then id_2022_&a=job2022_job&yra._&i;
			else if job&a=put((&yra&i),6.) and job2022_job&yra._&i=-5 then id_2022_&a=-5;
		%end;
	%end;
%mend id;
%macro rd;
    %do yra = 1979 %to 1994;
        %id(&yra);
    %end; 
    %do yra = 1996 %to 2022 %by 2;
        %id(&yra);
    %end; 
%mend rd;
%rd;

Employers_roster_22_others

%macro att(yrb,b);
	%do l=1 %to 14;
		if id_&yrb._&b=&l then do;
			*CPS job;
			if cpsemp&yrb._&l~=-4 and cpsemp&yrb._&l~=. then cpsjob_&yrb._&b=cpsemp&yrb._&l;
			else if cpsemp&yrb._&l=-4|cpsemp&yrb._&l=. then cpsjob_&yrb._&b=-4;
			*occupation code;
			if occ&yrb._&l~=-4 and occ&yrb._&l~=. then occ_&yrb._&b=occ&yrb._&l;
			else if occ&yrb._&l=-4|occ&yrb._&l=. then occ_&yrb._&b=-4;
			*industry code;
			if ind&yrb._&l~=-4 and ind&yrb._&l~=. then ind_&yrb._&b=ind&yrb._&l;
			else if ind&yrb._&l=-4|ind&yrb._&l=. then ind_&yrb._&b=-4;
			*class of worker;
			if cow&yrb._&l~=-4 and cow&yrb._&l~=. then cow_&yrb._&b=cow&yrb._&l;
			else if cow&yrb._&l=-4|cow&yrb._&l=. then cow_&yrb._&b=-4;
			*rate of pay;
			if rop&yrb._&l~=-4 and rop&yrb._&l~=. then rop_&yrb._&b=rop&yrb._&l;
			else if rop&yrb._&l=-4|rop&yrb._&l=. then rop_&yrb._&b=-4;
			*time unit to interpret payrate;
			if tu&yrb._&l~=-4 and tu&yrb._&l~=. then turop_&yrb._&b=tu&yrb._&l;
			else if tu&yrb._&l=-4|tu&yrb._&l=. then turop_&yrb._&b=-4;
			*hourly rate of pay;
			if hrp&yrb._&l~=-4 and hrp&yrb._&l~=. then hrp_&yrb._&b=hrp&yrb._&l;
			else if hrp&yrb._&l=-4|hrp&yrb._&l=. then hrp_&yrb._&b=-4;
			*union;
			if uni&yrb._&l~=-4 and uni&yrb._&l~=. then uni_&yrb._&b=uni&yrb._&l;
			else if uni&yrb._&l=-4|uni&yrb._&l=. then uni_&yrb._&b=-4;
			*hours worked per day;
			if hrsday&yrb._&l~=-4 and  hrsday&yrb._&l~=. then hrsday_&yrb._&b=hrsday&yrb._&l;
			else if hrsday&yrb._&l=-4|hrsday&yrb._&l=. then hrsday_&yrb._&b=-4;
			*hours worked per week;
			if hrswk&yrb._&l~=-4 and hrswk&yrb._&l~=. then hrswk_&yrb._&b=hrswk&yrb._&l;
			else if hrswk&yrb._&l=-4|hrswk&yrb._&l=. then hrswk_&yrb._&b=-4;
			*months worked for employer before last int;
			if mosli&yrb._&l~=-4 and mosli&yrb._&l~=. then mosli_&yrb._&b=mosli&yrb._&l;
			else if mosli&yrb._&l=-4|mosli&yrb._&l=. then mosli_&yrb._&b=-4;
			*tenure;
			if ten&yrb._&l~=-4 and ten&yrb._&l~=. then tenure_&yrb._&b=ten&yrb._&l;
			else if ten&yrb._&l=-4|ten&yrb._&l=. then tenure_&yrb._&b=-4;
			*working at job before di;
			if (wbefdi&yrb._&l~=-4 and wbefdi&yrb._&l~=.) then wbefdi_&yrb._&b=wbefdi&yrb._&l;
			if (wbefdi&yrb._&l=-4|wbefdi&yrb._&l=.) then wbefdi_&yrb._&b=-4;
			*previous employer ID;
			if (previd&yrb._&l~=-4 and previd&yrb._&l~=.) then previd_&yrb._&b=previd&yrb._&l;
			if (previd&yrb._&l=-4|previd&yrb._&l=.) then previd_&yrb._&b=-4;
			*job number loaded into A array;
			if job_num_a&yrb._&l~=-4 and job_num_a&yrb._&l~=. then jobnum_a_&yrb._&b=job_num_a&yrb._&l;
			else if job_num_a&yrb._&l=-4|job_num_a&yrb._&l=. then jobnum_a_&yrb._&b=-4;
			*currently woring at job;
			if curwk&yrb._&l~=-4 and curwk&yrb._&l~=. then curwk_&yrb._&b=curwk&yrb._&l;
			else if curwk&yrb._&l=-4|curwk&yrb._&l=. then curwk_&yrb._&b=-4;
			*reason left job;
			if (curwk&yrb._&l>=-3 and curwk&yrb._&l<=0) and (releft&yrb._&l~=-4 and releft&yrb._&l~=.) then releft_&yrb._&b=releft&yrb._&l;
			else if (curwk&yrb._&l>=-3 and curwk&yrb._&l<0) and (releft&yrb._&l=-4|releft&yrb._&l=.) then releft_&yrb._&b=-4;
			else if curwk&yrb._&l=0 and (releft&yrb._&l=-4|releft&yrb._&l=.) then releft_&yrb._&b=-3;
			else if curwk&yrb._&l=-4 and (releft&yrb._&l=-4|releft&yrb._&l=.) then releft_&yrb._&b=-4;
			else if curwk&yrb._&l=1 then releft_&yrb._&b=-4;
		end;
		else if id_&yrb._&b=-5 then do;
			cpsjob_&yrb._&b=-5;
			occ_&yrb._&b=-5;
			ind_&yrb._&b=-5;
			cow_&yrb._&b=-5;
			rop_&yrb._&b=-5;
			turop_&yrb._&b=-5;
			hrp_&yrb._&b=-5;
			uni_&yrb._&b=-5;
			hrsday_&yrb._&b=-5;
			hrswk_&yrb._&b=-5;
			mosli_&yrb._&b=-5;
			tenure_&yrb._&b=-5;
			wbefdi_&yrb._&b=-5;
			previd_&yrb._&b=-5;
			jobnum_a_&yrb._&b=-5;
			curwk_&yrb._&b=-5;
			releft_&yrb._&b=-5;
		end;
	%end;
%mend att;
%macro rd(b);
    %do yrb = 2022 %to 2022;
        %att(&yrb,&b);
    %end; 
%mend rd;
%macro job;
	%do b=1 %to 67;
		%rd(&b);
	%end;
%mend job;
%job;

Employers_roster_22_stodate_whyleft

%macro id(a,yra,yrb);
	%do i=1 %to 9;
		if endj_job&yra._&a=put((&yrb.0&i),6.) then do;
			if curwk&yrb._&i>=-3 & curwk&yrb._&i<=0 then do;
				reasonleft&yra._&a=whyleft_recode&yrb._&i;
				reasonleftC&yra._&a=whyleft_recodeC&yrb._&i;
			end;
			else if (curwk&yrb._&i>=-3 & curwk&yrb._&i<0) & (whyleft_recode&yrb._&i=.) then do;
				reasonleft&yra._&a=-4;
				reasonleftC&yra._&a=-4;
			end;
			else if curwk&yrb._&i=0 & (whyleft_recode&yrb._&i=.) then do;
				reasonleft&yra._&a=-3;
				reasonleftC&yra._&a=-3;
			end;
		end;
	%end;
	%do i=10 %to 14;
		if endj_job&yra._&a=put((&yrb&i),6.) then do;
			if curwk&yrb._&i>=-3 & curwk&yrb._&i<=0 then do;
				reasonleft&yra._&a=whyleft_recode&yrb._&i;
				reasonleftC&yra._&a=whyleft_recodeC&yrb._&i;
			end;
			else if (curwk&yrb._&i>=-3 & curwk&yrb._&i<0) & (whyleft_recode&yrb._&i=.) then do;
				reasonleft&yra._&a=-4;
				reasonleftC&yra._&a=-4;
			end;
			else if curwk&yrb._&i=0 & (whyleft_recode&yrb._&i=.) then do;
				reasonleft&yra._&a=-3;
				reasonleftC&yra._&a=-3;
			end;
		end;
	%end;
%mend id;
%macro jb(yra,yrb);
	%do a=1 %to 19;
		%id(&a,&yra,&yrb);
	%end;
%mend jb;
%macro rd(yrb);
    %do yra = 1979 %to 1994;
        %jb(&yra,&yrb);
    %end; 
    %do yra = 1996 %to 2022 %by 2;
        %jb(&yra,&yrb);
    %end; 
%mend rd;
%macro rds;
    %do yrb = 2022 %to 2022;
        %rd(&yrb);
    %end; 
%mend rds;
%rds;
%macro id(a,yra);
	%do i=1 %to 9;
		if job&a=put((&yra.0&i),6.) then do;
			if (stod_final&yra._&i~=-4|stom_final&yra._&i~=-4|stoy_final&yra._&i~=-4) then do;
				stod_fin_&a=stod_final&yra._&i;
				stom_fin_&a=stom_final&yra._&i;
				stoy_fin_&a=stoy_final&yra._&i;
			end;
			else if (stod_final&yra._&i=-4 and stom_final&yra._&i=-4 and stoy_final&yra._&i=-4) then do;
				stod_fin_&a=-3;
				stom_fin_&a=-3;
				stoy_fin_&a=-3;
			end;
			reasonleft_&a=reasonleft&yra._&i;
			reasonleftC_&a=reasonleftC&yra._&i;
		end;
	%end;
	%do i=10 %to 14;
		if job&a=put((&yra&i),6.) then do;
			if (stod_final&yra._&i~=-4|stom_final&yra._&i~=-4|stoy_final&yra._&i~=-4) then do;
				stod_fin_&a=stod_final&yra._&i;
				stom_fin_&a=stom_final&yra._&i;
				stoy_fin_&a=stoy_final&yra._&i;
			end;
			else if (stod_final&yra._&i=-4 and stom_final&yra._&i=-4 and stoy_final&yra._&i=-4) then do;
				stod_fin_&a=-3;
				stom_fin_&a=-3;
				stoy_fin_&a=-3;
			end;
			reasonleft_&a=reasonleft&yra._&i;
			reasonleftC_&a=reasonleftC&yra._&i;
		end;
	%end;
%mend id;
%macro jb(yra);
	%do a=1 %to 67;
		%id(&a,&yra);
	%end;
%mend jb;
%macro rds;
    %do yra = 1979 %to 1994;
        %jb(&yra);
    %end; 
    %do yra = 1996 %to 2022 %by 2;
        %jb(&yra);
    %end; 
%mend rds;
%rds;

Employers_roster_22_stdate_stweek

%macro att(yrb,b);
	%do l=1 %to 14;
		if id_&yrb._&b=&l then do;
			*Start day;
			if stad&yrb._&l~=-4 then stad_&yrb._&b=stad&yrb._&l;
			else if stad&yrb._&l=-4 then stad_&yrb._&b=-3;
			*Start month;
			if stam&yrb._&l~=-4 then stam_&yrb._&b=stam&yrb._&l;
			else if stam&yrb._&l=-4 then stam_&yrb._&b=-3;
			*Start year;
			if stay&yrb._&l~=-4 then stay_&yrb._&b=stay&yrb._&l;
			else if stay&yrb._&l=-4 then stay_&yrb._&b=-3;
			*Stop day;
			if stod&yrb._&l~=-4 then stod_&yrb._&b=stod&yrb._&l;
			else if stod&yrb._&l=-4 then stod_&yrb._&b=-3;
			*Stop month;
			if stom&yrb._&l~=-4 then stom_&yrb._&b=stom&yrb._&l;
			else if stom&yrb._&l=-4 then stom_&yrb._&b=-3;
			*Stop year;
			if stoy&yrb._&l~=-4 then stoy_&yrb._&b=stoy&yrb._&l;
			else if stoy&yrb._&l=-4 then stoy_&yrb._&b=-3;
			*Start week;
			if stawk&yrb._&l~=-4 then stawk_&yrb._&b=stawk&yrb._&l;
			else if stawk&yrb._&l=-4 then stawk_&yrb._&b=-3;
			*Stop week;
			if stowk&yrb._&l~=-4 then stowk_&yrb._&b=stowk&yrb._&l;
			else if stowk&yrb._&l=-4 then stowk_&yrb._&b=-3;
		end;
		else if id_&yrb._&b=-5 then do;
			stad_&yrb._&b=-5;
			stam_&yrb._&b=-5;
			stay_&yrb._&b=-5;
			stod_&yrb._&b=-5;
			stom_&yrb._&b=-5;
			stoy_&yrb._&b=-5;
			stawk_&yrb._&b=-5;
			stowk_&yrb._&b=-5;
		end;
	%end;
%mend att;
%macro rd(b);
    %do yrb = 2022 %to 2022;
        %att(&yrb,&b);
    %end; 
%mend rd;
%macro job;
	%do b=1 %to 67;
		%rd(&b);
	%end;
%mend job;
%job;

Employers_roster_22_wksnotworked

%macro att(b);
	%do l=1 %to 19;
		%do k=1 %to 4;
			if id_2022_&b=&l and unemsdli2022_&l=1 then do;
				unem_2022_&b=1;
				if stawkgap&k._2022_&l~=-4 and stawkgap&k._2022_&l~=. then stawk_gap&k._2022_&b=stawkgap&k._2022_&l;
				if stowkgap&k._2022_&l~=-4 and stowkgap&k._2022_&l~=. then stowk_gap&k._2022_&b=stowkgap&k._2022_&l;
				if reap&k._2022_&l~=-4 and reap&k._2022_&l~=. then rea_gap&k._2022_&b=reap&k._2022_&l;
				if lookp&k._2022_&l~=-4 and lookp&k._2022_&l~=. then look_gap&k._2022_&b=lookp&k._2022_&l;
				if nlookp&k._2022_&l~=-4 and nlookp&k._2022_&l~=. then nlook_gap&k._2022_&b=nlookp&k._2022_&l;
			end;
		%end;
	%end;
%mend att;
%macro job;
	%do b=1 %to 67;
		%att(&b);
	%end;
%mend job;
%job;

NLSY79 Appendix 27: IRT Item Parameter Estimates, Scores and Standard Errors

Item Response Theory (IRT) item parameter estimates, scores and standard errors have been calculated for several attitudinal scales administered in multiple NLSY79 survey years as well as in other NLS cohorts. 

Click below to view detailed descriptions of the creation procedures for these scales.

CES-D IRT item parameter estimates, scores and standard errors with custom weighted Z-scores and percentile ranks


CES-D ITEM PARAMETER ESTIMATES. These four variables, shown below, represent item response theory (IRT) item parameter estimates for each Center for Epidemiologic Studies-Depression Scale (CES-D) item, including measures of discrimination (â) and severity (b̂1, b̂2, b̂3), which were calibrated using a graded response model in Multilog.

CES-D IRT SCORE and STANDARD ERROR. These two variables represent the CES-D IRT scores ̂ ) and their standard errors of measurement (SE), which are presented in standardized metric and were calculated using the CES-D IRT parameter estimates.

CES-D CUSTOM WEIGHTED Z-SCORE and PERCENTILE RANK. These two variables were calculated using the cross-sectional custom weights for each survey wave within each cohort, which correct the raw data for the effects of over-sampling, differential base year participation and differential wave and item non-response.


Data collected

The CES-D IRT item parameter estimates, scores and standard errors were calculated using data from following cohorts and surveys:

  • Mature Women
    • 1995, 1997, 1999, 2001, 2003
  • Young Women
    • 1995, 1997, 1999, 2001, 2003
  • NLSY79
    • 1992, 1994, Age 40
  • NLSY79 Child and Young Adult
    • 1994, 1996, 1998, 2000, 2002, 2004, 2006, 2008

Mature Women and Young Women

Seven of the CES-D scale items, which appear in Table 1c, were presented to respondents in the 1995 (R33678.00 – R33684.00), 1997 (R41361.00 – R41367.00), 1999 (R50935.00 – R50941.00) and 2001 (R61869.00 – R61875.00) surveys. The 2003 surveys included the full CES-D scale (R72915.00 – R72934.00), as presented in Table 2c.

Table 1c. Subset of CES-D Scale items presented in the 1995, 1997, 1999, and 2001 Mature Women and Young Women surveys

  • I felt that I could not shake off the blues even with help from my family or friends.
  • I had trouble keeping my mind on what I was doing.
  • I felt that everything I did was an effort.
  • My sleep was restless.
  • I felt lonely.
  • I felt sad.
  • I could not get “going.”

Table 2c. Full CES-D Scale presented in the 2003 Mature Women and Young Women surveys

  1. I was bothered by things that usually don’t bother me.
  2. I did not feel like eating; my appetite was poor.
  3. I felt that I could not shake off the blues even with help from my family or friends.
  4. I felt I was just as good as other people.
  5. I had trouble keeping my mind on what I was doing.
  6. I felt depressed.
  7. I felt that everything I did was an effort.
  8. I felt hopeful about the future.
  9. I thought my life had been a failure.
  10. I felt fearful.
  11. My sleep was restless.
  12. I was happy.
  13. I talked less than usual.
  14. I felt lonely.
  15. People were unfriendly.
  16. I enjoyed life.
  17. I had crying spells.
  18. I felt sad.
  19. I felt that people dislike me.
  20. I could not get “going.”

NLSY79 and NLSY79 Child and Young Adult

For the NLSY79 1992 survey, respondents were presented with the full CES-D scale (R38949.00 – R38968.00), as it appears in Table 2c. Respondents from the NLSY79 1994 (R49783.00 – R49789) survey and all of the Young Adult (1994: Y03360.00 - Y3366.00; 1996: Y06364.00 – Y06370.00; 1998: Y09309.00 – Y09315.00; 2000: Y11615.00 – Y11621.00; 2002: Y13966.00 – Y13972.00; 2004: Y16481.00 – Y16487.00; 2006: Y19199.00 – Y19205.00; 2008: Y22334.00 – Y22340.00) surveys were presented with seven of the CES-D scale items, which appear in Table 3c. When NLSY79 respondents were surveyed at age 40, they were presented with nine of the CES-D items (H00003.00 – H00011.00), which are displayed in Table 4c.

Table 3c. Subset of CES-D Scale items presented in the NLSY79 1994 survey and All of the Young Adult surveys

  • I did not feel like eating; my appetite was poor.
  • I had trouble keeping my mind on what I was doing.
  • I felt depressed.
  • I felt that everything I did was an effort.
  • My sleep was restless.
  • I felt sad.
  • I could not get “going”.

Table 4c. Subset of CES-D Scale items presented to NLSY79 respondents at Age 40

  • I did not feel like eating; my appetite was poor.
  • I felt that I could not shake off the blues even with help from my family or friends.
  • I had trouble keeping my mind on what I was doing.
  • I felt depressed.
  • I felt that everything I did was an effort.
  • My sleep was restless.
  • I felt lonely.
  • I felt sad.
  • I could not get “going.”

Depressive symptoms

The Center for Epidemiological Studies – Depression Scale (CES-D) measures an individual’s current level of depressive symptoms and is intended for use in general population surveys (Radloff, 1977). The 20-item scale (see Table 2c) comprises 16 negative symptoms and four positive symptoms, representing a single continuum from depression to happiness (Wood, Taylor, & Joseph, 2010). Symptom severity is measured by asking the frequency of occurrence for each item during the preceding week. Response options range from 0 (rarely or none of the time/1 day) to 3 (most or all of the time/5-7 days).

Why these variables may be helpful

Depression is a mental health condition with both a substantial prevalence and impact. Some have conjectured that it is the single largest cause of lost time on the job worldwide. The original method of scoring these questions was to use a 0-3 scale for the responses (reverse coding where appropriate) and then sum. This is the approach of “Classical Test Theory” (CTT), which used to dominate the psychometrics of scaling. There are several problems with CTT that are relevant for users of the depression data. First, if the questions asked from year-to-year or from cohort to cohort differ, the scores are not comparable. Second, CTT imposes the very strong restriction that a “1” means the same thing for all questions, and third, that going from a “1” to a “2” likewise is equally informative about depression for all questions. Item Response Theory does not impose these restrictions.

Our scoring of the CES-D using IRT generates a θ value that is comparable across rounds, across cohorts and summarizes the information contained in all the responses to the CES-D questions for a particular round. We also provide an estimated standard error for θ to provide the user with guidance on the precision of the estimated value of θ.

Because θ measures depressivity with error (this being unavoidable given the data resources at hand), we suggest that when θ is being used as a right-hand side variable in a regression, users consider taking advantage of the repeated measures on θ available in the various rounds, by using these other measured values as “instruments” for the observation of θ being used as a regressor. The method of instrumental variables (IV) is due to Geary and Reiersol, dating back to 1945, and is discussed in many advanced texts on statistical methods for the social sciences. By using IV, the well-known problem of attenuation bias due to measurement error can be overcome. The substantial stability of CES-D scores over the life course makes the use of IV especially efficacious. Whether IV is appropriate depends on the model specification and the assumed error structure.

Moreover, because the subset of CES-D questions asked changes and IRT scoring accounts for such changes, using IRT simplifies comparisons over the life course and across cohorts, which are staples of longitudinal analysis.

Item Response Theory

Within the item response theory (IRT) framework, the latent construct (θ) being measured (i.e., depressive symptoms) is assumed to follow a standard normal distribution. Given the meaningfully ordered (with respect to θ), multiple response options appearing with the CES-D items, the IRT analyses were conducted using a graded response model (GRM; Samejima, 1969), in Multilog (Thissen, Chen, & Bock, 2003). For a GRM, the a parameter or slope estimate (â) represents item discrimination, which indicates how well an item differentiates between individuals with varying levels of θ. Items with low slopes (i.e., close to zero) are problematic because they do not distinguish between individuals with varying levels of depressive symptoms. Therefore, items with higher â values are generally more desirable than those with lower â values. Each b parameter or severity estimate (b̂1, b̂2, b̂3) identifies the point along θ where one response category becomes more likely to be endorsed than any other option, given the respondent’s level of depressive symptoms. Items with equally distributed b̂ values, across the range of θ, identify clear distinctions between individuals with varying levels of depressive symptoms, according to the response options that they choose. Items with b̂ values that are extreme (greater than 4.5 standard deviations in either direction) or too close together are less desirable because knowledge of the selected response option does not provide clear information regarding an individual’s level of θ. The unidimensionality (i.e., the items measure a single latent construct) of the CES-D scale (Wood et al., 2010), ensures that any subset of CES-D items will also provide a unidimensional measure of depressive symptoms. The presentation of the CES-D IRT scores in standardized metric, with mean of zero and standard deviation of one, allows for easy and meaningful comparison of scores and standard errors with standardized scores from other scales.

The IRT item calibration of the CES-D scale items was conducted on a combined data set of responses from the four cohorts, across multiple years (see above; n = 20,225; Table 5c). Because previous research has identified the presence of differential item functioning (DIF) for some CES-D items across the life course (Cooksey, Eberwein, Gardecki, Ing, & Olsen, 2010), additional analyses were conducted to ensure the appropriateness of using a single set of item parameter estimates for calculating the CES-D IRT scores for respondents of different ages. Separate item calibrations were conducted for eight age groups ranging from teens to those in their eighties and DIF analyses were conducted on the eight sets of parameter estimates. While differences between parameter estimates across age groups displayed statistical significance through chi-square difference tests in IRTLRDIF (Thissen, 2001), these differences are not substantively significant. The practical significance of the group differences was evaluated by comparing two sets of IRT scores for each age group; one based on their own item parameter estimates and one calculated from the combined data parameter estimates. The Spearman rank-order correlation coefficients for the two sets of IRT scores indicate a high degree of similarity in the percentile rankings of the scores (r ≥ .97); a person in the top 5% for depressive symptoms using an IRT score will most likely be in the top 5%, regardless of which set of parameter estimates are used to calculate the score. Given these results, the CES-D IRT item parameter estimates based on the combined data set were used to calculate all of the CES-D IRT scores and standard errors.

Custom weighted scores and percentile ranks

Every NLS data release contains a set of cross-sectional weights. Using these weights provides a simple method for users to correct the raw data for the effects of over-sampling, clustering and differential base year participation. The custom weighted z-scores and percentile ranks were calculated using the CES-D IRT scores and the cross-sectional weights for each survey wave, within each NLS cohort.

Table 5c. IRT item parameter estimates and standard errors for the CES-D Scale
Item Parameter Estimate S.E.
1. I was bothered by things that usually don’t bother me.

a

1.56

0.03

b1

0.47

0.02

b2

1.57

0.03

b3

2.49

0.05

2. I did not feel like eating; my appetite was poor.

a

1.37

0.03

b1

1.16

0.02

b2

2.04

0.04

b3

2.93

0.06

3. I felt that I could not shake off the blues even with help from my family or friends.

a

2.76

0.06

b1

0.78

0.01

b2

1.49

0.02

b3

2.04

0.03

4. I felt I was just as good as other people.

a

0.16

0.03

b1

-4.70

0.65

b2

-3.07

0.39

b3

-0.98

0.19

5. I had trouble keeping my mind on what I was doing.

a

1.52

0.03

b1

0.39

0.02

b2

1.45

0.02

b3

2.44

0.04

6. I felt depressed.

a

3.21

0.05

b1

0.66

0.01

b2

1.38

0.01

b3

1.90

0.02

7. I felt that everything I did was an effort.

a

0.95

0.02

b1

-0.02

0.02

b2

1.11

0.03

b3

1.84

0.05

8. I felt hopeful about the future.

a

0.10

0.03

b1

-8.51

1.89

b2

-3.40

0.90

b3

2.88

0.83

9. I thought my life had been a failure.

a

1.97

0.05

b1

1.48

0.03

b2

2.16

0.04

b3

2.69

0.06

10. I felt fearful.

a

1.88

0.05

b1

1.17

0.02

b2

2.08

0.04

b3

2.70

0.06

11. My sleep was restless.

a

1.22

0.02

b1

0.23

0.02

b2

1.33

0.03

b3

2.18

0.04

12. I was happy.

a

0.09

0.04

b1

-9.27

2.10

b2

-4.05

0.87

b3

3.03

0.74

13. I talked less than usual.

a

1.29

0.03

b1

0.91

0.03

b2

1.86

0.04

b3

2.74

0.07

14. I felt lonely.

a

2.06

0.04

b1

0.81

0.02

b2

1.59

0.03

b3

2.18

0.04

15. People were unfriendly.

a

0.99

0.03

b1

1.62

0.05

b2

2.88

0.09

b3

3.82

0.13

16. I enjoyed life.

a

0.10

0.02

b1

-7.44

1.52

b2

-4.14

1.08

b3

0.09

0.23

17. I had crying spells.

a

2.20

0.06

b1

1.35

0.02

b2

2.02

0.03

b3

2.66

0.05

18. I felt sad.

a

2.83

0.05

b1

0.59

0.01

b2

1.49

0.02

b3

2.15

0.03

19. I felt that people dislike me.

a

1.56

0.05

b1

1.64

0.03

b2

2.58

0.06

b3

3.26

0.09

20. I could not get “going.”

a

1.52

0.03

b1

0.57

0.02

b2

1.76

0.03

b3

2.64

0.05

References

Cooksey, E., Eberwein, C., Gardecki, R., Ing, P., & Olsen, R. J. (2010, September). Depressivity over the life course and across generations. Paper presented at the Society for Longitudinal and Life Course Studies Conference, Cambridge, UK.

Geary, R. (1949). Determination of Linear Relationships between Systematic Parts of Variables with Errors of Observation the Variances of which are Unknown. Econometrica, 17.

Radloff, L. S. (1977). The CES-D scale: A self-report depression scale for research in the general population. Applied Psychological Measurement, 1(3), 385-401.

Reiersol, O. (1945) Confluence Analysis by Means of Instrumental Sets of Variables. Arkiv for Mathematik, Astronomi och Fysik, 32.

Samejima, F. (1969). Estimation of latent ability using a response pattern of graded scores. Psychometrika Monograph, No. 17.

Schmitt, D.P., & Allik, J. (2005). Simultaneous administration of the Rosenberg Self-Esteem Scale in 53 nations: Exploring the universal and culture-specific features of global self-esteem. Journal of Personality and Social Psychology, 89, 623-642.

Thissen, D. (2001). IRTLRDIF (Version 2.0b) [Computer software]. Chapel Hill, North Carolina: L. L. Thurstone Psychometric Laboratory.

Thissen, D., Chen, W., & Bock, R. D. (2003). Multilog (Version 7.03) [Computer software]. Lincolnwood, Illinois: Scientific Software International.

Wood, A. M., Taylor, P. J., & Joseph, S. (2010). Does the CES-D measure a continuum from depression to happiness? Comparing substantive and artifactual models. Psychiatry Research, 177, 120-123.

Pearlin Mastery Scale IRT item parameter estimates, scores and standard errors with custom weighted Z-scores and percentile ranks


PM ITEM PARAMETER ESTIMATES. These four variables, shown below, represent item response theory (IRT) item parameter estimates for each Pearlin Mastery Scale (PM) item, including measures of discrimination (â) and severity (b̂1, b̂2, b̂3), which were calibrated using a graded response model in Multilog.

PM IRT SCORE and STANDARD ERROR. These two variables represent the PM IRT scores ̂ ) and their standard errors of measurement (SE), which are presented in standardized metric, and were calculated using the PM ITEM PARAMETER ESTIMATES.

PM CUSTOM WEIGHTED Z-SCORE and PERCENTILE RANK. These two variables were calculated using the cross-sectional custom weights for each survey wave within each cohort, which correct the raw data for the effects of over-sampling, differential base year participation and differential wave and item non-response.


Data collected

The PM IRT item parameter estimates, scores and standard errors were calculated using data from following cohorts and surveys:

  • NLSY79
    • 1992
  • NLSY79 Child and Young Adult
    • 1994, 1996, 1998, 2000, 2002, 2004, 2006, 2008

NLSY79 and NLSY79 Child and Young Adult

For the NLSY79 1992 survey (R38942.00 – R38948.00) and the NLSY79 Child and Young Adult surveys (1994: Y03343.00 - Y3349.00; 1996: Y06347.00 – Y06353.00; 1998: Y09292.00 – Y09298.00; 2000: Y11592.00 – Y11598.00; 2002: Y13943.00 – Y13949.00; 2004: Y16458.00 – Y16464.00; 2006: Y19176.00 – Y19182.00; 2008: Y22328.00 – Y22334.00), respondents were presented with the 7-item PM scale, as it appears in Table 1p.

Table 1p. Pearlin Mastery Scale Items

  1. There is really no way I can solve some of the problems I have. (RC)
  2. Sometimes I feel that I’m being pushed around in life. (RC)
  3. I have little control over the things that happen to me. (RC)
  4. *I can do just about anything I really set my mind to.
  5. I often feel helpless in dealing with the problems of life. (RC)
  6. What happens to me in the future mostly depends on me.
  7. There is little I can do to change many of the important things in my life. (RC)

Note: RC represents item values that require reverse coding prior to scoring.
*Item 4 was removed from the scale prior to conducting IRT analyses, due to redundancy with Item 6.

Mastery

The Pearlin Mastery Scale (PM) measures an individual’s level of mastery, which is a psychological resource that has been defined as “the extent to which one regards one’s life-chances as being under one’s own control in contrast to being fatalistically ruled” (Pearlin & Schooler, 1978, p.5). The 7-item scale (see Table 1p) comprises five negatively worded items and two positively worded items, presented with the following response options: (1) Strongly Disagree (2) Disagree (3) Agree (4) Strongly Agree. The negatively worded items require reverse coding prior to scoring, resulting in a score range of 7 to 28, with higher scores indicating greater levels of mastery.

Why these variables may be helpful

Mastery has been shown to provide a protective buffer for individuals’ mental and physical health and well-being when facing persistent life stresses, such as economic and occupational hardships (e.g., Pearlin & Schooler, 1978; Pudrovska, Schieman, Pearlin & Nguyen, 2005). The original method of scoring these questions was to use a 1-4 scale for the responses (reverse coding where appropriate) and then sum. This is the approach of “Classical Test Theory” (CTT), which used to dominate the psychometrics of scaling. CTT imposes the very strong restriction that a “1” means the same thing for all questions, and third, that going from a “1” to a “2” likewise is equally informative about mastery for all questions. Item Response Theory does not impose these restrictions.

Our scoring of the PM using IRT generates a θ value that is comparable across rounds, across cohorts and summarizes the information contained in all the responses to the PM questions for a particular round. We also provide an estimated standard error for θ to provide the user with guidance on the precision of the estimated value of θ.

Because θ measures mastery with error (this being unavoidable given the data resources at hand), we suggest that when θ is being used as a right-hand side variable in a regression, users consider taking advantage of the repeated measures on θ available in the various rounds, by using these other measured values as “instruments” for the observation of θ being used as a regressor. The method of instrumental variables (IV) is due to Geary and Reiersol, dating back to 1945, and is discussed in many advanced texts on statistical methods for the social sciences. By using IV, the well-known problem of attenuation bias due to measurement error can be overcome. The stability of PM scores over the life course makes the use of IV efficacious. Whether IV is appropriate depends on the model specification and the assumed error structure. Moreover, because IRT scoring can account for any changes made to the number of PM items being asked, using IRT simplifies comparisons over the life course and across cohorts, which are staples of longitudinal analysis.

Item Response Theory

Within the item response theory (IRT) framework, the latent construct (θ) being measured (i.e., mastery) is assumed to follow a standard normal distribution. Given the meaningfully ordered (with respect to θ), multiple response options appearing with the PM items, the IRT analyses were conducted using a graded response model (GRM; Samejima, 1969), in Multilog (Thissen, Chen, & Bock, 2003). For a GRM, the a parameter or slope estimate (â) represents item discrimination, which indicates how well an item differentiates between individuals with varying levels of θ. Items with low slopes (i.e., close to zero) are problematic because they do not distinguish between individuals with varying levels of mastery. Therefore, items with higher â values are generally more desirable than those with lower â values. Each b parameter or severity estimate (b̂1, b̂2, b̂3) identifies the point along θ where one response category becomes more likely to be endorsed than any other option, given the respondent’s level of mastery. Items with equally distributed b̂ values, across the range of θ, identify clear distinctions between individuals with varying levels of mastery, according to the response options that they choose. Items with b̂ values that are extreme (greater than 4.5 standard deviations in either direction) or too close together are less desirable because knowledge of the selected response option does not provide clear information regarding an individual’s level of θ. The unidimensionality (i.e., the items measure a single latent construct) of the PM scale ensures that any subset of PM items will also provide a unidimensional measure of mastery. The presentation of the PM IRT scores in standardized metric, with mean of zero and standard deviation of one, allows for easy and meaningful comparison of scores and standard errors with standardized scores from other scales.

Results from a series of factor analyses (both exploratory and confirmatory, using independent data samples) provided evidence to support the unidimensionality of the PM scale. Prior to conducting the IRT item analyses, Item 4 (see Table 1p) was removed from the PM scale, due to redundancy with Item 6 (i.e., correlated error variance), which violates the IRT assumption of independence of items, after accounting for θ (i.e., mastery). The IRT item calibration of the six PM scale items was conducted on the combined NLSY79 1992 and NLSY79 Child and Young Adult 2008 data (n = 15,287; Table 2p). Given the potential influence of age and gender on level of mastery, differential item functioning (DIF) analyses were conducted to ensure the appropriateness of using a single set of item parameter estimates for calculating PM scores for respondents of different ages and gender. First, separate item calibrations were conducted for four age groups ranging from 14-19 years to 30-38 years and followed up with DIF analyses of the four sets of parameter estimates. Next, item calibrations were conducted for gender groups (i.e., males and females) with DIF analyses conducted on the two sets of item parameter 4 estimates. While differences between parameter estimates across age groups and gender displayed statistical significance, through chi-square difference tests in IRTLRDIF (Thissen, 2001), these differences are not substantively significant. The practical significance of the group differences was evaluated by comparing two sets of IRT scores for each age and gender group; one based on their own item parameter estimates and one calculated from the combined data item parameter estimates. The Spearman rank-order correlation coefficients for the two sets of IRT scores indicate a high degree of similarity in the percentile rankings of the scores (r ≥ .99); a person in the top 5% for mastery using an IRT score will most likely be in the top 5%, regardless of which set of parameter estimates are used to calculate the score. Given these results, the PM IRT item parameter estimates based on the combined data set were used to calculate all of the PM IRT scores and standard errors.

Custom weighted scores and percentile ranks

Every NLS data release contains a set of cross-sectional weights. Using these weights provides a simple method for users to correct the raw data for the effects of over-sampling, clustering and differential base year participation. The custom weighted z-scores and percentile ranks were calculated using the PM IRT scores and the cross-sectional weights for each survey wave within each NLS cohort.

Table 2p. IRT item parameter estimates and standard errors for the Pearlin Mastery Scale
Item Parameter Estimate S.E.
1. There is really no way I can solve some of the problems I have.

a

1.93

0.03

b1

-2.36

0.04

b2

-1.14

0.02

b3

0.63

0.02

2. Sometimes I feel that I’m being pushed around in life.

a

1.68

0.03

b1

-2.66

0.05

b2

-0.98

0.02

b3

0.89

0.02

3. I have little control over the things that happen to me.

a

2.26

0.04

b1

-2.59

0.05

b2

-1.47

0.02

b3

0.51

0.02

5. I often feel helpless in dealing with the problems of life.

a

2.19

0.03

b1

-2.53

0.04

b2

-1.20

0.02

b3

0.73

0.02

6. What happens to me in the future mostly depends on me.

a

1.03

0.03

b1

-4.60

0.15

b2

-3.22

0.09

b3

0.34

0.03

7. There is little I can do to change many of the important things in my life.

a

1.76

0.03

b1

-2.82

0.06

b2

-1.49

0.03

b3

0.70

0.02

References

Geary, R. (1949). Determination of Linear Relationships between Systematic Parts of Variables with Errors of Observation the Variances of which are Unknown. Econometrica, 17.

Pearlin, L.I., & Schooler, C. (1978). The structure of coping. Journal of Health and Social Behavior, 19, 2-21.

Pudrovska, T., Schieman, S., Pearlin, L.I., & Nguyen, K. (2005). The sense of mastery as a mediator and moderator in the association between economic hardship and health in late life. Journal of Aging and Health, 17, 634-660.

Reiersol, O. (1945) Confluence Analysis by Means of Instrumental Sets of Variables. Arkiv for Mathematik, Astronomi och Fysik, 32.

Samejima, F. (1969). Estimation of latent ability using a response pattern of graded scores. Psychometrika Monograph, No. 17.

Thissen, D. (2001). IRTLRDIF (Version 2.0b) [Computer software]. Chapel Hill, North Carolina: L. L. Thurstone Psychometric Laboratory.

Thissen, D., Chen, W., & Bock, R. D. (2003). Multilog (Version 7.03) [Computer software]. Lincolnwood, Illinois: Scientific Software International.

Rosenberg Self-Esteem Scale IRT item parameter estimates, scores and standard errors with custom weighted Z-scores and percentile ranks


RSE ITEM PARAMETER ESTIMATES. These four variables, shown below, represent item response theory (IRT) item parameter estimates for each Rosenberg Self-Esteem Scale (RSE) item, including measures of discrimination (â) and severity (b̂1, b̂2, b̂3), which were calibrated using a graded response model in Multilog.

RSE IRT SCORE and STANDARD ERROR. These two variables represent the RSE IRT scores ̂ ) and their standard errors of measurement (SE), which are presented in standardized metric, and were calculated using the RSE ITEM PARAMETER ESTIMATES.

RSE CUSTOM WEIGHTED Z-SCORE and PERCENTILE RANK. These two variables were calculated using the cross-sectional custom weights, for each survey wave within each cohort, which correct the raw data for the effects of over-sampling, differential base year participation and differential wave and item non-response.


Data collected

The RSE IRT item parameter estimates, scores and standard errors were calculated using data from following cohorts and surveys:

  • NLSY79
    • 1980, 1987, 2006
  • NLSY79 Child and Young Adult
    • 1994, 1996, 1998, 2000, 2002, 2004, 2006, 2008

NLSY79 and NLSY79 Child and Young Adult

For the NLSY79 surveys (1980: R03035.00 – R03044.00; 1987: R23491.00 – R23500.00; 2006: T08998.00 – T08998.09) and the NLSY79 Child and Young Adult surveys (1994: Y03350.00 - Y3359.00; 1996: Y06354.00 – Y06363.00; 1998: Y09299.00 – Y09308.00; 2000: Y11599.00 – Y11608.00; 2002: Y13950.00 – Y13959.00; 2004: Y16465.00 – Y16474.00; 2006: Y19183.00 – Y19192.00; 2008: Y22335.00 – Y22344.00), respondents were presented with the 10-item RSE scale, as it appears in Table 1r.

Table 1r. Rosenberg Self-Esteem Scale Items

  1. *I feel that I’m a person of worth, at least on equal basis with others. (RC)
  2. I feel that I have a number of good qualities. (RC)
  3. All in all, I am inclined to feel that I am a failure.
  4. I am able to do things as well as most other people. (RC)
  5. I feel I do not have much to be proud of.
  6. I take a positive attitude toward myself. (RC)
  7. On the whole, I am satisfied with myself. (RC)
  8. I wish I could have more respect for myself.
  9. I certainly feel useless at times.
  10. At times I think I am no good at all.

Note: RC represents item values that require reverse coding prior to scoring.
*Item 1 was removed from the scale prior to conducting IRT analyses, due to redundancy with Item 2.

Self-Esteem

The Rosenberg Self-Esteem Scale (RSE; Rosenberg, 1965) provides a measure of global self-esteem, which has been defined as an individual’s general sense of personal worth (Rosenberg, 1979). The 10-item scale (see Table 1r) comprises four positively worded items and six negatively worded items, presented with the following response options: (1) Strongly Agree (2) Agree (3) Disagree (4) Strongly Disagree. The positively worded items require reverse coding prior to scoring, resulting in a score range of 10 to 40, with higher scores indicating greater levels of self-esteem.

Why these variables may be helpful

Self-esteem has been described as a core component of positive self-concept, which displays positive relationships with both job satisfaction and job performance (Judge & Bono, 2001). The original method of scoring these questions was to use a 1-4 scale for the responses (reverse coding where appropriate) and then sum. This is the approach of “Classical Test Theory” (CTT), which used to dominate the psychometrics of scaling. CTT imposes the very strong restriction that a “1” means the same thing for all questions, and third, that going from a “1” to a “2” likewise is equally informative about mastery for all questions. Item Response Theory does not impose these restrictions.

Our scoring of the RSE using IRT generates a θ value that is comparable across rounds, across cohorts and summarizes the information contained in all the responses to the RSE questions for a particular round. We also provide an estimated standard error for θ to provide the user with guidance on the precision of the estimated value of θ.

Because θ measures self-esteem with error (this being unavoidable given the data resources at hand), we suggest that when θ is being used as a right-hand side variable in a regression, users consider taking advantage of the repeated measures on θ available in the various rounds, by using these other measured values as “instruments” for the observation of θ being used as a regressor. The method of instrumental variables (IV) is due to Geary and Reiersol, dating back to 1945, and is discussed in many advanced texts on statistical methods for the social sciences. By using IV, the well-known problem of attenuation bias due to measurement error can be overcome. The stability of RSE scores over the life course makes the use of IV efficacious. Whether IV is appropriate depends on the model specification and the assumed error structure. Moreover, because IRT scoring can account for any changes made to the number of RSE items being asked, using IRT simplifies comparisons over the life course and across cohorts, which are staples of longitudinal analysis.

Item Response Theory

Within the item response theory (IRT) framework, the latent construct (θ) being measured (i.e., self-esteem) is assumed to follow a standard normal distribution. Given the meaningfully ordered (with respect to θ), multiple response options appearing with the RSE items, the IRT analyses were conducted using a graded response model (GRM; Samejima, 1969), in Multilog (Thissen, Chen, & Bock, 2003). For a GRM, the a parameter or slope estimate (â) represents item discrimination, which indicates how well an item differentiates between individuals with varying levels of θ. Items with low slopes (i.e., close to zero) are problematic because they do not distinguish between individuals with varying levels of self-esteem. Therefore, items with higher â values are generally more desirable than those with lower â values. Each b parameter or severity estimate (b̂1, b̂2, b̂3) identifies the point along θ where one response category becomes more likely to be endorsed than any other option, given the respondent’s level of self-esteem. Items with equally distributed b̂ values, across the range of θ, identify clear distinctions between individuals with varying levels of self-esteem, according to the response options that they choose. Items with b̂ values that are extreme (greater than 4.5 standard deviations in either direction) or too close together, are less desirable because knowledge of the selected response option does not provide clear information regarding an individual’s level of θ. The unidimensionality (i.e., the items measure a single latent construct) of the RSE scale ensures that any subset of RSE items will also provide a unidimensional measure of self-esteem. The presentation of the RSE IRT scores in standardized metric, with mean of zero and standard deviation of one, allows for easy and meaningful comparison of scores and standard errors with standardized scores from other scales.

Results from a series of factor analyses (both exploratory and confirmatory, using independent data samples) provided evidence to support the unidimensionality of the RSE scale. Prior to conducting the IRT item analyses, Item 1 (see Table 1r) was removed from the PM scale, due to redundancy with Item 2 (i.e., correlated error variance), which violates the IRT assumption of independence of items, after accounting for θ (i.e., mastery). The IRT item calibration of the nine RSE scale items was conducted on the combined NLSY79 2006 and NLSY79 Child and Young Adult 2008 data (n = 13,947; Table 2r). Given the potential influence of age and gender on level of self-esteem, differential item functioning (DIF) analyses were conducted to ensure the appropriateness of using a single set of item parameter estimates for calculating RSE scores for respondents of different ages and gender. First, separate item calibrations were conducted for five age groups ranging from 14-19 years to 41-50 years and followed up with DIF analyses of the five sets of parameter estimates. Next, item calibrations were conducted for gender groups (i.e., males and females) with DIF analyses conducted on the two sets of item parameter estimates. While differences between parameter estimates across age groups and gender displayed statistical significance, through chi-square difference tests in IRTLRDIF (Thissen, 2001), these differences are not substantively significant. The practical significance of the group differences was evaluated by comparing two sets of IRT scores for each age and gender group; one based on their own item parameter estimates and one calculated from the combined data item parameter estimates. The Spearman rank-order correlation coefficients for the two sets of IRT scores indicate a high degree of similarity in the percentile rankings of the scores (r ≥ .99); a person in the top 5% for self-esteem using an IRT score will most likely be in the top 5%, regardless of which set of parameter estimates are used to calculate the score. Given these results, the RSE IRT item parameter estimates based on the combined data set were used to calculate all of the RSE IRT scores and standard errors.

Custom weighted scores and percentile ranks

Every NLS data release contains a set of cross-sectional weights. Using these weights provides a simple method for users to correct the raw data for the effects of over-sampling, clustering and differential base year participation. The custom weighted z-scores and percentile ranks were calculated using the RSE IRT scores and the cross-sectional weights for each survey wave, within each NLS cohort.

Table 2r. IRT item parameter estimates and standard errors for the Rosenberg Self-Esteem Scale
Item Parameter Estimate S.E.
2. I feel that I have a number of good qualities.

a

2.21

0.04

b1

-3.58

0.13

b2

-2.86

0.07

b3

-0.05

0.01

3. All in all, I am inclined to feel that I am a failure.

a

2.81

0.05

b1

-2.90

0.07

b2

-2.05

0.03

b3

-0.05

0.01

4. I am able to do things as well as most other people.

a

2.08

0.04

b1

-3.22

0.09

b2

-2.19

0.04

b3

0.26

0.02

5. I feel I do not have much to be proud of.

a

2.55

0.05

b1

-2.62

0.06

b2

-1.84

0.03

b3

0.05

0.01

6. I take a positive attitude toward myself.

a

2.71

0.05

b1

-2.92

0.08

b2

-1.94

0.03

b3

0.27

0.01

7. On the whole, I am satisfied with myself.

a

2.04

0.04

b1

-3.06

0.08

b2

-1.75

0.03

b3

0.62

0.02

8. I wish I could have more respect for myself.

a

1.73

0.03

b1

-2.74

0.07

b2

-1.22

0.03

b3

0.72

0.02

9. I certainly feel useless at times.

a

2.17

0.04

b1

-2.72

0.06

b2

-1.19

0.02

b3

0.60

0.02

10. At times I think I am no good at all.

a

2.88

0.05

b1

-2.71

0.06

b2

-1.59

0.02

b3

0.20

0.01

References

Geary, R. (1949). Determination of Linear Relationships between Systematic Parts of Variables with Errors of Observation the Variances of which are Unknown. Econometrica, 17.

Gray-Little, B., Williams, V.S.L., & Hancock, T.D. (1997). An item response theory analysis of the Rosenberg Self-Esteem Scale. Personality and Social Psychology Bulletin, 23, 443-451.

Judge, T.A., & Bono, J.E. (2001). Relationship of core self-evaluations traits – self-esteem, generalized self-efficacy, locus of control, and emotional stability – with job satisfaction and job performance: A meta-analysis. Journal of Applied Psychology, 86, 80-92.

Reiersol, O. (1945) Confluence Analysis by Means of Instrumental Sets of Variables. Arkiv for Mathematik, Astronomi och Fysik, 32.

Rosenberg, M. (1965). Society and the adolescent self-image. Princeton, NJ: Princeton University Press.

Rosenberg, M. (1979). Conceiving the self. New York: Basic Books.

Samejima, F. (1969). Estimation of latent ability using a response pattern of graded scores. Psychometrika Monograph, No. 17.

Schmitt, D.P., & Allik, J. (2005). Simultaneous administration of the Rosenberg Self-Esteem Scale in 53 nations: Exploring the universal and culture-specific features of global self-esteem. Journal of Personality and Social Psychology, 89, 623-642.

Thissen, D. (2001). IRTLRDIF (Version 2.0b) [Computer software]. Chapel Hill, North Carolina: L. L. Thurstone Psychometric Laboratory.

Thissen, D., Chen, W., & Bock, R. D. (2003). Multilog (Version 7.03) [Computer software]. Lincolnwood, Illinois: Scientific Software International.

NLSY79 Appendix 26: Non-Response to Financial Questions and Entry Points

Financial questions often elicit from respondents either a "refusal" or a "don't know" response. From 1979 to 2000 the NLSY79 interviewers faced with a "refusal" or a "don't know" simply went on to the next question. Starting in 2002, respondents have been asked to estimate financial values if they could not provide an exact value.

To determine which of several methods of estimation was best for financial questions, an "income experiment" was run during the 2002 survey. Respondents were randomly assigned to one of three methods (unfolding bracket, nearest $10k, range) when they stated "don't know" or "refused" to an income question. Additionally, among respondents who were given unfolding brackets, some respondents were given relatively high starting points (referred to as the 60 percent group) or relatively low starting points (referred to as the 40 percent group).

Important information: SYMBOL_ENTRY_[NAME]

Researchers interested in knowing which starting point a respondent was selected to receive should look at questions named SYMBOL_ENTRY_[NAME], which are titled "Entry Point For Income Unfolding Brackets for [Type of Income/Asset]". These variables contain the actual entry points assigned to each case for which a 40% or 60% entry point (see Table 2 and Table 3 below) was assigned.

First, some respondents were asked for a range of values. A second group of respondents was asked if they could provide an answer within $10,000. Third, some respondents were asked to place the value within "unfolding brackets," bracketing the range in which the true value fell.

The first method, the range of values questions, asks respondents to define a lower and upper bound value. Examining the data suggest that some respondents give quite precise bounds. When a respondent gives a range, researchers should note that the upper and lower bound variables are not always in the correct order. The survey always asks for the upper bound first and the lower bound second. However, if a respondent gives the smaller number first, that number will be typed into the upper bound variable and the range values will be reversed.

The second method, reporting a value to within the nearest $10,000, is designed to tell the respondent that a rough figure is an acceptable answer. Extreme precision is not demanded for these estimates.

The third method, unfolding brackets, lets respondents report if the amount is above or below a particular value. The initial value the respondent is given to compare is called the "entry point." The list of all entry points used by the NLSY79 survey since 2002 is found in Table 2 and Table 3 in this appendix.

For example, the entry point for the value of a vehicle is $20,000. If the answer to the entry point question is neither a "refusal" nor a "don't know" then the respondent is asked one more "is the value above or below" question. This results in a series of four brackets that provide researchers with a rough idea of the range into which the item's value falls. Researchers should be cautioned that while three of the brackets have a defined range, the top range is open-ended.

Important information: Household interview income recall experiment

Researchers interested in knowing the type of question a respondent was selected to receive in the 2002 experiment should look at question HH_INC_3_EXP, which has the title "Type of question R assigned for household interview income recall experiment."

Example:

An example of how item non-response to financial questions is handled is seen in the questions that ask about income from the military in the 2002 survey.

Question Q13-16_TRUNC asked respondents "About how much total income your spouse or partner received during 2001 from the military before taxes and other deductions?" If the respondent was unable to provide a specific amount, the respondent was assigned in Q13-16_EXP to one of three alternative methods to try to solicit an estimate.

In question Q13-16_E~000001 some respondents were asked if they could provide "an approximate range for that amount." If the respondent could provide a range, both the upper and lower bound values were captured.

Some respondents were asked in question Q13-16_D, "To the nearest $10,000, can you tell me about how much your spouse or partner received during 2001, from the military before taxes and other deductions?"

In question Q13-16_A some respondents were asked "Would it amount to [entry point military income] or more?" Looking at Table 2 shows that "entry point military income" has the value of either $15,000 or $30,000. This results in the interviewer asking if the income was more or less than these amounts. If the respondent stated less than $15,000 or $30,000 s/he was asked one last question "would it amount to $5,000 or more." If the respondent stated more than $15,000 or $30,000 s/he was asked "would it amount to $40,000 or more."

These questions resulted in the researcher being able to classify respondents who do not know the military pay received by their spouse into four groups; $0 to $5,000, $5,000 to $15,000/$30,000, $15,000/$30,000 to $40,000 and over $40,000. Table 2 and Table 3 provide the specific entry points and symbol names for all income and asset questions, along with related questions in the retirement section used in the bracketing questions. Note: Table 1. Number of Respondents Assigned to Income Experiment Groups has been removed because the SYMBOL_ENTRY_[NAME] variables are available in the public data release.

Table 2. Entry points for NLSY79 income and assets section in 2002 and 2004
Type Variable Name 40% Amount 60% Amount
Wages and Salary entry pt wage inc $25,000 $35,000
Military Income entry pt military inc $15,000 $30,000
Business Income entry pt business inc $10,000 $20,000
Public Assistance and Welfare entry pt pub assistance inc $5,000 $7,500
Child Support entry pt ch supt inc $2,500 $4,000
Educational Benefits and Scholarships entry pt educ benefits inc $1,500 $3,000
Inheritances and Gifts entry pt inheritance inc $3,000 $10,000
Other Income entry pt other inc $500 $1,000
Earned Income Tax Credit entry pt eitc inc $1,000 $2,000
Other Household Members Income entry pt other hh mems inc $10,000 $20,000
Table 3. Entry points for NLSY79 income section in 2006-2016, assets section in 2006-2020, retirement assets questions in 2022
Type Variable Name 40% Amount 60% Amount
Wages and Salary entry pt wage inc $28,000 $40,000
Military Income entry pt military inc $14,000 $24,000
Business Income entry pt business inc $21,000 $35,000
Public Assistance and Welfare entry pt pub assistance inc $5,000 $7,000
Child Support entry pt ch supt inc $3,000 $4,800
Educational Benefits and Scholarships entry pt educ benefits inc $1,800 $3,000
Inheritances and Gifts entry pt inheritance inc $5,500 $12,500
Other Income entry pt other inc $7,200 $13,000
Earned Income Tax Credit entry pt eitc inc $1,200 $2,000
Other Household Members Income entry pt other hh mems inc $7,200 $13,000

In 2018, while continuing to employ automated text substitutions for entry points in the assets section and several new assets-related questions in the Retirement module, specific entry points were included in the question texts for the income section and one savings-related question in the Retirement module. Entry points for the income questions and the retirement question are the mean of the original 40% and 60% entry points listed in Table 3 above. 

The list below identifies the questions in the 2020 and 2022 questionnaires that contain entry points to estimate income, asset, and retirement asset amounts.

  • Q13-5_UAB_A
  • Q13-9_UAB_A
  • RETINCR-PENSIONS-2_UAB_A
  • RETINCR-ANNUITIES-2_UAB_A
  • RETINCR-IRA-2_UAB_A
  • RETINCR-IRA-4_UAB_A
  • Q13-70_SS_UAB_A
  • Q13-70_DIS_UAB_A
  • Q13-31B_UAB_A
  • Q13-70_VET_UAB_A
  • Q13-18_UAB_A
  • Q13_24_UAB_A
  • RETINCSP-PENSIONS-2_UAB_A
  • RETINCSP-ANNUITIES-2_UAB_A
  • RETINCSP-IRA-2_UAB_A
  • RETINCSP-IRA-4_UAB­_A
  • Q13-70_SS-SP_UAB_A
  • Q13-70_DIS-SP_UAB_A
  • Q13-31B-SP_UAB_A
  • Q13-70_VET-SP_UAB_A
  • Q13-73_UAB_A
  • Q13-73A_UAB_A
  • Q13-75_UAB_A
  • Q13-81-NEW_UAB_A
  • SC_12A_UAB_A
  • SC_12B_UAB_A
  • FA_1A_UAB_A
  • FA_2A_UAB_A
  • FA_3A_UAB_A
  • FA_4A_UAB_A
  • FA_5A_UAB_A
  • FA_6D_UAB_A
  • FA_6E_UAB_A
  • FA_7B_UAB_A
  • FA_7C_UAB_A
  • FA_8C_UAB_A
  • FA_8D_UAB_A
  • FA_8D_UAB_A
  • FA_9A_UAB_A
  • FA_10A_UAB_A
  • FA_11A_UAB_A
  • NFA_1A_UAB_A
  • NFA_1B_UAB_A
  • NFA_1C_UAB_A
  • NFA_2A_UAB_A
  • NFA_2B_UAB_A
  • NFA_2C_UAB_A
  • Q13-131_UAB_A
  • Q13-132_UAB_A
  • Q13-132D_UAB_A
  • NFA_4C_UAB_A
  • NFA_4F_UAB_A
  • NFA_5B_UAB_A
  • NFA_5C_UAB_A
  • NFA_6E_UAB_A
  • NFA_7C_UAB_A
  • DEBT_1A_UAB_A
  • DEBT_2A_UAB_A
  • DEBT_2D_UAB_A
  • DEBT_3A_UAB_A
  • DEBT_4A_UAB_A
  • Q13-142_UAB_A
  • RETIRE_HOUSEVALUE_1A_UAB_A
  • RETIRE_HOUSEVALUE_1B_UAB_A
  • RETIRE_HOUSEVALUE_1C_UAB_A
  • RETIRE_SAV5_UAB_A

Important information: Asset section

Almost all questions in the Asset section use the same entry point. For example, in the 2004 survey the entry point was "entry pt other hh mems inc," which has the value of $10,000 or $20,000. This entry point value is quite low for certain categories. For instance, homeowners who do not know the value of their primary residence were asked if it was above or below $20,000. This low entry point value resulted in large number of cases all falling into the same unfolding bracket.

NLSY79 Appendix 25: Attitudinal Scale Scoring

This appendix contains descriptions of scale score computations and programs that create some of the scale scores for the most recent survey year for the following attitudinal scales:

Center for Epidemiologic Studies Depression (CES-D) Scale

Created variables: CES-D Scale scores

Question Name

Title

Survey Years

CESD_SCORE_20_ITEM 20-ITEM CES-D SCORE (CESD) 1992
CESD_FLAG FLAG – NUMBER OF MISSING ITEMS FOR 20 ITEM CES-D SCORE (CESD) 1992
CESD_SCORE_7_ITEM 7-ITEM CES-D SCORE (CESD) 1992, 1994, 2020, 2022
H40-CESD_SCORE_7_ITEM H40 7-ITEM CES-D SCORE (CESD) XRND
H50-CESD_SCORE_7_ITEM H50 7-ITEM CES-D SCORE (CESD) XRND
H60-CESD_SCORE_7_ITEM H60 7-ITEM CES-D SCORE (CESD)
Note: The H60 Module was administered to a subset of respondents in its first survey year of fielding; thereafter, it was administered to all respondents.
XRND

Scoring computations are described below.

Please note: Item response theory (IRT) parameter estimates, IRT scores, and their standard errors of measurement for the CES-D variables are also available, along with a custom-weighted z-score and percentile rank. See Appendix 27: IRT Item Parameter Estimates, Scores and Standard Errors for a detailed description and discussion of the IRT scoring for these scales.

The CES-D is a self-report scale that measures the current prevalence of depression symptoms. Respondents rate a series of statements regarding how they felt during the week prior to the interview. While the full 20-item battery was included in the 1992 (round 14) survey, a collapsed 7-item battery was administered to respondents in the 1994 (round 16) survey. A slightly expanded 9-item battery was included in the 40+ Health Module, in all years of the 50+ Health Module, in 2018 of the 60+ Health Module, and was asked of all respondents in the 2020 and 2022 interviews. The CES-D scale included in the 40+, 50+ and 60+ (initiated in 2018) Health Modules and administered to all respondents in 2020 and 2022 contained the consistent 7-item scale. Table 1 details the questions asked and the survey years and modules in which they were included.

Table 1: CES-D Scale questions including survey years and modules asked
Item Question Name Question Name Survey Years
1 I was bothered by things that usually don't bother me. CESD~000000 1992
2 I did not feel like eating; my appetite was poor.

CESD~000001

h30-CESD~000001

H50CESD~000001

H60CESD~000001

1992, 1994, 2020, 2022

XRND

XRND

XRND

3 I felt that I couldn't shake off the blues even with help from my family and friends.

CESD~000002

h30-CESD~000002

H50CESD~000002

H60CESD~000002

1992, 2020, 2022

XRND

XRND

XRND

4 I felt that I was just as good as other people. CESD~000002A 1992
5 I had trouble keeping my mind on what I was doing.

CESD~000003

h30-CESD~000003

H50CESD~000003

H60CESD~000003

1992, 1994, 2020, 2022

XRND

XRND

XRND

6 I felt depressed.

CESD~000004

h30-CESD~000004

H50CESD~000004

H60CESD~000004

1992, 1994, 2020, 2022

XRND

XRND

XRND

7 I felt that everything I did was an effort.

CESD~000005

h30-CESD~000005

H50CESD~000005

H60CESD~000005

1992, 1994, 2020, 2022

XRND

XRND

XRND

8 I felt hopeful about the future. CESD~000005A 1992
9 I thought my life had been a failure. CESD~00005B 1992
10 I felt fearful. CESD~00005C 1992
11 My sleep was restless.

CESD~000006

h30-CESD~000006

H50CESD~000006

H60CESD~000006

1992, 1994, 2020, 2022

XRND

XRND

XRND

12 I was happy. CESD~000006A 1992
13 I talked less than usual. CESD~000006B 1992
14 I felt lonely.

CESD~000007

h30-CESD~000007

H50CESD~000007

H60CESD~000007

1992, 2020, 2022

XRND

XRND

XRND

15 People were unfriendly. CESD~000007A 1992
16 I enjoyed life. CESD~000007B 1992
17 I had crying spells. CESD~000007C 1992
18 I felt sad.

CESD~000008

h30-CESD~000008

H50CESD~000008

H60CESD~000008

1992, 1994, 2020, 2022

XRND

XRND

XRND

19 I felt that people dislike me. CESD~000008A (1992) 1992
20 I could not get "going."

CESD~000009

h30-CESD~000009

H50CESD~000009

H60CESD~000009

1992, 1994, 2020, 2022

XRND

XRND

XRND

Possible responses for all 16 negative-symptom questions are as follows:

  • 0 point : Rarely or none of the time (< 1 day)
  • 1 point : Some or a little of the time (1-2 days)
  • 2 points: Occasionally or a moderate amount of the time (3-4 days)
  • 3 points: Most or all of the time (5-7 days).

Response categories for 4 positive-symptom questions asked only in 1992 (CESD~000002A, CESD~000005A, CESD~000006A, CESD~000007B) are reversed.

Scale scores for 1992 (20-item and 7-item), 1994, 2020, 2022, and the 40+, 50+, and 60+ Health Modules (7-item) CES-D are all computed by summing the points for each answer across either the 20 items or 7 items in the specific survey year or module. The 20-item scale contains both negative- and positive-symptom questions. No positive-symptom questions are included in the 7-item scales. CES-D 20-item scale score: Points for all 20 items were summed. Possible scores range from 0 to 60, with the higher scores indicating the presence of more depressive symptoms. If more than four items are missing, the scale score is coded as missing. A flag that indicates the number of missing items for CES-D 20-item scale is also present.

CESD 7-item scale score: Points are summed across 7 items (CESD~000001, CESD~000003, CESD~000004, CESD~000005, CESD~000006, CESD~000008, CESD~000009). The possible range of scores is 0 to 21. If one item is missing, the scale score is coded as missing.

Click below to view programming code.

Q11-CESD~000001
Q11-CESD~000002
Q11-CESD~000003
Q11-CESD~000004
Q11-CESD~000005
Q11-CESD~000006
Q11-CESD~000007
Q11-CESD~000008
Q11-CESD~000009
* calculate ces_d_score_7_item;
'CESD_SCORE_7_ITEM'n = -4;
array cesd7 (*) 'Q11-CESD~000001'n 'Q11-CESD~000003'n 'Q11-CESD~000004'n 'Q11-CESD~000005'n
'Q11-CESD~000006'n 'Q11-CESD~000008'n 'Q11-CESD~000009'n;
vskipnum=0;
validnum=0;
missnum=0;
do j=1 to 7;
if cesd7(j)=-4 then vskipnum=vskipnum+1;/*valid skip*/
else if cesd7(j) in (-3,-2,-1) then missnum=missnum+1; /* missing/dk/ref */
else if cesd7(j) in (0,1,2,3) then validnum=validnum+1;/*valid answer*/
end;
if vskipnum=7 then 'CESD_SCORE_7_ITEM'n=-4; /*all 7 items are "valid skip"*/
else if missnum ge 1 then 'CESD_SCORE_7_ITEM'n=-3;
else if validnum=7 then 'CESD_SCORE_7_ITEM'n=sum(of cesd7(1), cesd7(2), 
cesd7(3), cesd7(4), cesd7(5), cesd7(6), cesd7(7));
else 'CESD_SCORE_7_ITEM'n=-3;

References

Radloff, Lenore. S. 1977. "The CES-D Scale: A self-report depression scale for research in the general population." Applied Psychological Measurement, V.1, No. 3 (Summer): 385-401.

Ross, Catherine E., and John Mirowsky. 1989. "Explaining the Social Patterns of Depression: Control and Problem Solving--or Support and Talking?" Journal of Health and Social Behavior, V.30, No. 2 (June): 206-219.

Rosenberg Self-Esteem Scale

Created variables: Rosenberg Self-Esteem Scale
Question Name Title Survey Years
ROSENBERG_ESTEEM_SCORE SELF-ESTEEM SCORE 1980
ROSENBERG_ESTEEM_SCORE ROSENBERG SELF-ESTEEM SCORE 1987
ROSENBERG_ESTEEM_SCORE SELF-ESTEEM SCORE 2006

Scoring computations are described below.

Please note: Item response theory (IRT) parameter estimates, IRT scores, and their standard errors of measurement for the Rosenberg Self-Esteem variables are also available, along with a custom-weighted z-score and percentile rank. See Appendix 27 for a detailed description and discussion of the IRT scoring for these scales.

The Rosenberg Self-Esteem Scale is designed to measure the self-evaluation that an individual makes and customarily maintains. It has been administered to NLSY79 respondents in survey years 1980, 1987 and 2006. Table 2 lists the questions by survey year.

Table 2: Rosenberg Self-Esteem Scale items (1980, 1987, 2006)
Item Question Question Names
1 I am a person of worth. ROSENBERG_ESTEEM_000001
2 I have a number of good qualities. ROSENBERG_ESTEEM_000002
3 I am inclined to feel that I am a failure. ROSENBERG_ESTEEM_000003
4 I am able to do things as well as most other people. ROSENBERG_ESTEEM_000004
5 I felt I do not have much to be proud of. ROSENBERG_ESTEEM_000005
6 I take a positive attitude toward myself. ROSENBERG_ESTEEM_000006
7 I am satisfied with myself. ROSENBERG_ESTEEM_000007
8 I wish I could have more respect for myself. ROSENBERG_ESTEEM_000008
9 I certainly feel useless at times. ROSENBERG_ESTEEM_000009
10 At times I think I am no good at all. ROSENBERG_ESTEEM_000010

Possible response categories for items 3, 5, 8, 9, 10 are:

  • 0 points: strongly agree
  • 1 point: agree
  • 2 points: disagree
  • 3 points: strongly disagree

Response categories for items 1, 2, 4, 6, 7 are reversed so that a higher score indicates higher self-esteem.

Points for each of the 10 items were summed to create the scale scores. Scores range from 0 to 30 points. If one item is missing, the scale score is coded as missing.

Click below to view programming code.

ROSENBERG_ESTEEM~000001
ROSENBERG_ESTEEM~000002
ROSENBERG_ESTEEM~000003
ROSENBERG_ESTEEM~000004
ROSENBERG_ESTEEM~000005
ROSENBERG_ESTEEM~000006
ROSENBERG_ESTEEM~000007
ROSENBERG_ESTEEM~000008
ROSENBERG_ESTEEM~000009
ROSENBERG_ESTEEM~000010
* calculate rosenberg_esteem_score;
'rosenberg_esteem_score'n = -4;
array rosenberg_rev (*) 'rosenberg_esteem~000001rev'n 'rosenberg_esteem~000002rev'n
‘rosenberg_esteem~000004rev'n 'rosenberg_esteem~00000rev6'n 'rosenberg_esteem~000007rev'n;
do I = 1 to 5;
if (rosenberg_rev >= 0) then rosenberg_rev = (3 – rosenberg_rev);
end;
array rosenberg (*) 'rosenberg_esteem~000001rev'n 'rosenberg_esteem~000002rev'n
‘rosenberg_esteem~000003'n 'rosenberg_esteem~000004rev'n ‘rosenberg_esteem~000005'n
'rosenberg_esteem~000006rev'n 'rosenberg_esteem~000007rev'n 'rosenberg_esteem~000008'n
'rosenberg_esteem~000009'n 'rosenberg_esteem~000010'n;
vskipnum=0;
validnum=0;
missnum=0;
do j=1 to 10;
if rosenberg(j)=-4 then vskipnum=vskipnum+1;/*valid skip*/
else if rosenberg(j) in (-3,-2,-1) then missnum=missnum+1; /* missing/dk/ref */
else if rosenberg(j) in (0,1,2,3) then validnum=validnum+1;/*valid answer*/
end;
if vskipnum=10 then 'ROSENBERG_ESTEEM_SCORE'n=-4; /*all 10 items are "valid skip"*/
else if missnum ge 1 then 'ROSENBERG_ESTEEM_SCORE'n=-3;
else if validnum=10 then 'ROSENBERG_ESTEEM_SCORE'n=sum(of rosenberg(1), rosenberg(2), rosenberg(3), rosenberg(4), rosenberg(5), rosenberg(6), rosenberg(7), rosenberg(8), rosenberg(9), rosenberg(10);
else 'ROSENBERG_ESTEEM_SCORE'n=-3;

References

Rosenberg, Morris. 1965. Society and the Adolescent Self-Image. Princeton: Princeton University Press.

Pearlin Mastery Scale

Created variables: Pearlin Mastery Scale
Question Name Title Survey Years
PEARLIN_SCORE PEARLIN MASTERY SCORE 1992

Scoring computations are described below.

Please note: Item response theory (IRT) parameter estimates, IRT scores, and their standard errors of measurement for the Pearlin Mastery variables are also available, along with a custom-weighted z-score and percentile rank. See Appendix 27 for a detailed description and discussion of the IRT scoring for this scale.

The Pearlin Mastery scale is designed to measure self-concept and references the extent to which individuals perceive themselves in control of forces that significantly impact their lives. It was administered in NLSY79 survey year 1992 (round 14). Table 3 lists the Pearlin Mastery questions.

Table 3: Pearlin Mastery questions
Item Question Question Name
1 No way I can solve some of the problems I have. PEARLIN_1
2 Sometimes I feel that I am being pushed around in life. PEARLIN_2
3 I have little control over the things that happen to me. PEARLIN_3
4 I can do just about anything I really set my mind to. PEARLIN_4
5 I often feel helpless in dealing with the problems of life. PEARLIN_5
6 What happens to me in the future mostly depends on me. PEARLIN_6
7 There is little I can do to change many of the important things in my life. PEARLIN_7

Possible response categories for items 4, 6 are:

  • 4 points: strongly agree
  • 3 points: agree
  • 2 points: disagree
  • 1 point: strongly disagree

Response categories for items 1, 2, 3, 5, 7 are reversed so that higher scores represent greater sense of mastery.

Points for each of the 10 items were summed to create the scale scores. Scores can range from 7 to 28 points. If one item is missing, the scale score is coded as missing.

Click below to view programming code.

PEARLIN_1
PEARLIN_2
PEARLIN_3
PEARLIN_4
PEARLIN_5
PEARLIN_6
PEARLIN_7
* calculate pearlin_score;
pearlin_score = -4;
array pearlin_rev (*) pearlin_1rev pearlin_2rev pearlin_3rev pearlin_5rev pearlin_7rev;
do I = 1 to 5;
if (pearlin_rev >= 0) then pearlin_rev = (5 – pearlin_rev);
end;
array pearlin (*) pearlin_1rev pearlin_2rev pearlin_3rev pearlin_4 pearlin_5rev pearlin_6 pearlin_7rev;
vskipnum=0;
validnum=0;
missnum=0;
do j=1 to 7;
if pearlin(j)=-4 then vskipnum=vskipnum+1;/*valid skip*/
else if pearlin(j) in (-3,-2,-1) then missnum=missnum+1; /* missing/dk/ref */
else if pearlin(j) in (1,2,3,4) then validnum=validnum+1;/*valid answer*/
end;
if vskipnum=7 then PEARLIN_SCORE=-4; /*all 7 items are "valid skip"*/
else if missnum ge 1 then PEARLIN_SCORE=-3;
else if validnum=7 then PEARLIN_SCORE=sum(of pearlin(1), pearlin(2), pearlin(3), pearlin(4), pearlin(5), pearlin(6), pearlin(7);
else 'PEARLIN_SCORE'n=-3;

References

Pearlin, Leonard I.; Lieberman, Morton A.; Menaghan, Elizabeth G.; and Joseph T. Mullan. 1981. “The Stress Process.” Journal of Health and Social Behavior, V.22, No. 4 (December):337-356.

Rotter Locus of Control Scale

Created variables: Rotter Locus of Control Scale
Question Name Title Survey Years
ROTTER_SCORE ROTTER SCALE SCORE 1979, 2014, 2016, 2018

Scoring computations are described below.

The Rotter Locus of Control scale is designed to measure the extent to which individuals believe they have control over their lives through self-motivation or self-determination (internal control) as opposed to the extent that the environment (that is, chance, fate, luck) controls their lives (external control). It was included in the 1979, 2014, 2016 and 2018 (for those not interviewed in 2014 and 2016 respectively) NLSY79 surveys. Table 4 lists the question names and reference numbers in each year.

Table 4: The 1979 NLSY79 Rotter – Locus of Control questions
Item Question Question Name
1 Pair 1, statement A: Degree of control r has over direction of own life ROTTER-1A
2 Pair 1, statement B: Degree of control r has over direction of own life ROTTER-1B
3 Pair 2, statement A: Importance of planning ROTTER-2A
4 Pair 2, statement B: Importance of planning ROTTER-2B
5 Pair 3, statement A: Importance of luck ROTTER-3A
6 Pair 3, statement B: Importance of luck ROTTER-3B
7 Pair 4, statement A: Degree of influence over own life ROTTER-4A
8 Pair 4, statement B: Degree of influence over own life ROTTER-4B

Points for each pair of items are as follows:

Internal control statement:

  • 1 point: Much closer
  • 2 points: Slightly closer

External control statement:

  • 3 points: Much closer
  • 4 points: Slightly closer

Points for each of the 4 pairs were summed to create scale scores. Scores range from 4 to 16 points. If one item is missing, the scale score is coded as missing.

Click below to view programming code.

ROTTER_LINT
ROTTER_1A
ROTTER_1B
ROTTER_2A
ROTTER_2B
ROTTER_3A
ROTTER_3B
ROTTER_4A
ROTTER_4B 
 
/* recode items, compute total score */
data two;
set one;
/* recode two-part Rotter items into a single item */
score1=-4;
if rotter_1a=1 and rotter_1b=1 then score1=1;
else if rotter_1a=1 and rotter_1b=2 then score1=2;
else if rotter_1a=2 and rotter_1b=2 then score1=3;
else if rotter_1a=2 and rotter_1b=1 then score1=4;
else if rotter_1a=-3 or rotter_1b=-3 then score1=-3;
else if rotter_1a=-2 or rotter_1b=-2 then score1=-2;
else if rotter_1a=-1 or rotter_1b=-1 then score1=-1;
score2=-4;
if rotter_2a=1 and rotter_2b=1 then score2=1;
else if rotter_2a=1 and rotter_2b=2 then score2=2;
else if rotter_2a=2 and rotter_2b=2 then score2=3;
else if rotter_2a=2 and rotter_2b=1 then score2=4;
else if rotter_2a=-3 or rotter_2b=-3 then score2=-3;
else if rotter_2a=-2 or rotter_2b=-2 then score2=-2;
else if rotter_2a=-1 or rotter_2b=-1 then score2=-1;
score3=-4;
if rotter_3a=1 and rotter_3b=1 then score3=1;
else if rotter_3a=1 and rotter_3b=2 then score3=2;
else if rotter_3a=2 and rotter_3b=2 then score3=3;
else if rotter_3a=2 and rotter_3b=1 then score3=4;
else if rotter_3a=-3 or rotter_3b=-3 then score3=-3;
else if rotter_3a=-2 or rotter_3b=-2 then score3=-2;
else if rotter_3a=-1 or rotter_3b=-1 then score3=-1;
score4=-4;
if rotter_4a=1 and rotter_4b=1 then score4=4;
else if rotter_4a=1 and rotter_4b=2 then score4=3;
else if rotter_4a=2 and rotter_4b=2 then score4=2;
else if rotter_4a=2 and rotter_4b=1 then score4=1;
else if rotter_4a=-3 or rotter_4b=-3 then score4=-3;
else if rotter_4a=-2 or rotter_4b=-2 then score4=-2;
else if rotter_4a=-1 or rotter_4b=-1 then score4=-1;
array score (*) score1 score2 score3 score4;
vskipnum=0;
ivskipnum=0;
dknum=0;
refnum=0;
validnum=0;
do k=1 to 4;
if score(k)=-4 then vskipnum=vskipnum+1; /*valid-skip*/
else if score(k)=-3 then ivskipnum=ivskipnum+1; /*invalid-skip*/
else if score(k)=-2 then dknum=dknum+1; /*don't know*/
else if score(k)=-1 then refnum=refnum+1; /*refused*/
else if score(k)>=1 then validnum=validnum+1; /*valid answer*/
end;
/* Per Rosella Gardecki, we should no longer code CV missing values as anything but -3 */
/* for the created variable, ROTTER_SCORE */
/* Regardless of the type of missingness, ROTTER_SCORE should be set to -3 */
if vskipnum=4 then rotter_score=-4; /*all 4 pairs are "valid skip"*/
else if ivskipnum=4 then rotter_score=-3; /*all 4 pairs are "invalid skip"*/
else if dknum=4 then rotter_score=-3; /*all 4 pairs are "don't know"*/
else if refnum=4 then rotter_score=-3; /*all 4 pairs are "refused"*/
else if validnum>0 and validnum<4 then rotter_score=-3;/*if number of valid responses < 4 then code it as -3*/
else if validnum=4 then rotter_score=sum(of score1-score4);
else rotter_score=-3;

References

Rotter, Julian B. 1966. “Generalized Expectancies for Internal Versus External Control of Reinforcement.” Psychological Monographs: General and Applied, 80 (1): 1-28.

Satisfaction with Life Scale (SWLS)

Created Variables
Question Name Title Survey Years
H60-DIENER_SWLS_SCORE H60 DIENER SWLS SCORE XRND

Scoring computations are described below.

The Satisfaction with Life Scale (Deiner, Emmons, Larson and Griffin) seeks to measure individual general satisfaction with one's life. It is included in the NLSY79 60+ Health Module which was initiated in the 2018 survey (round 28) and is asked of respondents as they approach or reach the age of 60. Table 5 lists the Satisfaction with Life questions.

Table 5: Satisfaction with Life Scale questions
Item Question Question Name
1 If I could live my life over, I would change almost nothing. H60DIENER~000001
2 So far I have gotten the important things I want in life. H60DIENER~000002
3 I am satisfied with my life. H60DIENER~000003
4 The conditions of my life are excellent. H60DIENER~000004
5 In most ways my life is close to my ideal. H60DIENER~000005

Possible response categories for all items are:

  • 7 points: strongly agree
  • 6 points: agree
  • 5 points: slightly agree
  • 4 points: neither agree nor disagree
  • 3 points: slightly disagree
  • 2 points: disagree
  • 1 point: strongly disagree

Points for each of the 5 items were summed to create the scale scores. Scores can range from 5 to 35 points, with higher scores indicating greater life satisfaction. If one item is missing, the scale score is coded as missing.

Click below to view programming code.

Q11-H60DIENER~000005
Q11-H60DIENER~000004
Q11-H60DIENER~000003
Q11-H60DIENER~000002
Q11-H60DIENER~000001
array swls 'Q11-H60DIENER~000001'n 'Q11-H60DIENER~000002'n 'Q11-H60DIENER~000003'n
'Q11-H60DIENER~000004'n 'Q11-H60DIENER~000005'n;
misscount=0; * initialize count of missing values;
do i=1 to 5;
if swls[i] in (-4,-3,-2,-1) then do;
swls[i]=.; * recode missing items to system missing;
misscount=misscount+1; * count number of missing items;
end;
end;
/* only compute summary scale for those with no missing data on any items */
if misscount=0 then do;
'H60-DIENER_SWLS_SCORE'n=sum('Q11-H60DIENER~000001'n,'Q11-H60DIENER~000002'n,
'Q11-H60DIENER~000003'n, ‘'Q11-H60DIENER~000004'n,'Q11-H60DIENER~000005'n);
end;
else 'H60-DIENER_SWLS_SCORE'n=-3;

References

Diener, E., Emmons, R. A., Larsen, R. J., & Griffin, S. (1985). The Satisfaction with Life Scale. Journal of Personality Assessment, 49, 71-75.

General Anxiety Disorder Scale (GAD-7)

Created variables: GAD-7
Question Name Title Survey Years
H60-GAD-7_SCORE H60 GAD-7 SCORE XRND

Scoring computations are described below.

The General Anxiety Disorder Scale (developed by Spitzer, Kroenke, Williams and Lowe) asks respondents how often they have experienced certain feelings associated with anxiety in the past two weeks. It is included in the NLSY79 60+ Health Module, which was initiated in the 2018 survey (round 28) and is asked of respondents as they approach or reach the age of 60. Table 6 lists the Satisfaction with Life questions.

Table 6: General Anxiety Disorder questions
Item Question Question Name
1 Feeling nervous, anxious or on edge H60GAD-7~000001
2 Not being able to stop or control worrying. H60GAD-7~000002
3 Worrying too much about different things H60GAD-7~000003
4 Trouble relaxing H60GAD-7~000004
5 Being so restless that it is hard to sit still H60GAD-7~000005
6 Becoming easily annoyed or irritable H60GAD-7~000006
7 Feeling afraid as if something awful might happen H60GAD-7~000007

Possible response categories for all items are:

  • 0 points: not at all
  • 1 point: several days
  • 2 points: more than half the days
  • 3 points: nearly every day

Points for each of the 7 items were summed to create the scale scores. Scores can range from 0 to 21 points, with higher scores indicating greater levels of anxiety. If one item is missing, the scale score is coded as missing.

Click below to view programming code.

Q11-H60GAD-7~000001
Q11-H60GAD-7~000002
Q11-H60GAD-7~000003
Q11-H60GAD-7~000004
Q11-H60GAD-7~000005
Q11-H60GAD-7~000006
Q11-H60GAD-7~000007
array gad 'Q11-H60GAD-7~000001'n 'Q11-H60GAD-7~000002'n 'Q11-H60GAD-7~000003'n
'Q11-H60GAD-7~000004'n 'Q11-H60GAD-7~000005'n 'Q11-H60GAD-7~000006'n 'Q11-H60GAD-7~000007'n;
vskipnum=0;
missnum=0;
validnum=0;
do j=1 to 7;
if gad(j)=-4 then vskipnum=vskipnum+1; /*valid skip*/
else if gad(j) in (-3,-2,-1) then missnum=missnum+1;/*invalid-skip*/
else if gad(j) in (0,1,2,3) then validnum=validnum+1;/*valid answer*/
end;
/* calculate sum of 7 items just for those with no missing items */
if validnum=7 then 'H60-GAD-7_SCORE'N=sum('Q11-H60GAD-7~000001'n, 'Q11-H60GAD-7~000002'n,
'Q11-H60GAD-7~000003'n, 'Q11-H60GAD-7~000004'n, 'Q11-H60GAD-7~000005'n,
'Q11-H60GAD-7~000006'n, 'Q11-H60GAD-7~000007'n);
else if missnum ge 1 then 'H60-GAD-7_SCORE'N=-3;
else 'H60-GAD-7_SCORE'N=-3;

References

Spitzer RL, Kroenke K, Williams JBW, Löwe B. A Brief Measure for Assessing Generalized Anxiety Disorder: The GAD-7. Arch Intern Med. 2006;166(10): 1092-1097. doi:10.1001/archinte.166.10.1092.

NLSY79 Appendix 24: Reanalysis of the 1980 AFQT Data from the NLSY79

The NLSY79 and NLSY97 are unique in that virtually all respondents took the Armed Forces Vocational Aptitude Battery (ASVAB), with the results for the NLSY79 being used to norm the test. This appendix discusses the psychometrics of the Armed Forces Qualifying Test (AFQT) administered in 1980, with attention to the implications the analysis has for the efficient administration of those tests.

Download: Reanalysis of the 1980 AFQT Data from the NLSY79 (PDF).

NLSY79 Appendix 23: Revised Asset and Debt Variables and Computed TOTAL Net Wealth Variables

The NLSY79 public release data contains a variety of asset and debt data, as well as some computed variables depicting total net family wealth at each survey point. Below are descriptions of revised asset and debt variables for survey years 1985-2000 (found in ASSETS area of interest with question names ending in “_REVISED”) and the constructed Total Net Family Wealth (TNFW_TRUNC) variables.

Revised asset and debt variables

The public release contains a revised set of asset and debt variables for survey years 1985-2000. These revised asset and debt variables were created in 2008 and fixed a number of problems with the NLSY79 data by eliminating some implausible outliers and generating uniform topcodes for all rounds. These variables are then used in the computation of Total Net Family Wealth variables. Two versions of each asset and debt variable appear in the data. Using the market value of residential property owned by the respondent in 1987 as an example, the following variables appear in the data:

  • R23627.00 [Q13-118] MARKET VALUE OF RESIDENTIAL PROPERTY R/SPOUSE OWN (TRUNC)
  • R23627.01 [Q13-118_REVISED] MARKET VALUE OF RESIDENTIAL PROPERTY R/SPOUSE OWN (TRUNC) (REVISED)

In the example, Q13-118 is the original variable which remains in the dataset to allow researchers to reproduce previous results. Q13-118_REVISED, as indicated, is a revised version of Q13-118, which uses a modified topcoding algorithm. This algorithm provides researchers with some additional information with respect to the topcoded range of responses.

Table 1 gives an example using the 1987 property value question of how seven different types of cases were handled by the revision process.

Table 1. Hypothetical examples of how NLSY79 asset/debt data were modified
Case Example data of original 
R Number (R23627.00) & Question Name (Q13-118)
Example data of revised 
R Number (R23627.01) & Question Name (Q13_118-REVISED)
Explanation
#1 $150,001 $276,984 Originally above the topcode and the value is still above the topcode but the topcode is now higher, revealing more information.
#2 $150,001 $151,500 Originally above topcode and now below topcode. Value is no longer topcoded.
#3 -1 -1 Originally “refused”.
#4 -2 -2 Originally “don't know”.
#5 -3 -3 Originally an “invalid skip”.
#6 -4 -4 Originally a valid skip. Since valid skip means does not have the asset the item is changed to zero.
#7 -2 -2 Originally “don't know”.

Not every asset or debt variable has a new revised version. 15 asset/debt categories were created in each year, matching the categories found in the 1990s NLSY79 wealth module. The categories are: Home Value, Mortgage Value, Property Debt Value, Cash Saving, Stocks/Bonds, Trusts, Business Assets, Business Debts, Vehicle Value, Vehicle Debt, Possession Value, Other Debt Value, IRA, 401K, Certificate of Deposit Value. In 2000 and subsequent survey years, some complexities were added to the asset and wealth module as the cohort aged. For these more recent survey rounds, each asset/debt category corresponds to multiple individual asset/debt variables.

For example, in 2004 respondents were asked to report the values of two homes. Their values are combined to form the "home value" category. Similarly, in 2004 the "stocks/bonds" category represents the individually-reported values of government bonds, mutual funds, life insurance surrender values, stocks, corporate bonds, and money owed to the respondent.

Details of the revisions to asset values 1985-2000

The process for creating the revised variables described above can be broken down into the three steps described below.

Step 1 -- Cleaning raw data

The original raw data for many asset/wealth variables contains a number of “out-of-range” codes. Some of these out-of-range codes denoted values that exceeded the maximum value accommodated in the questionnaire and allowed for by the data entry software. These out-of-range codes were originally given the top code value when released to the public. Examination of cases with out-of-range suggests some were mistakes and not actually out of range. This issue arises in the pre-1993 Paper and Pencil interviewing (PAPI) years, but is most prevalent in survey years 1988 and 1989. For the REVISED/Q13-118_REVISED set of variables, these out-of-range codes were assigned an "invalid missing" (-3) code. These cases can be found by identifying values that were top coded in the original version of a variable (Q13-118) but were assigned an “invalid missing” code (-3) in the REVISED version (Q13-118_REVISED).

Step 2 -- Unfolding brackets

Unfolding brackets are a means for respondents to estimate certain asset values of which they were unsure. Respondents who are unable to report a specific value for an asset or liability are asked a series of questions to establish a loose range for a value (see Appendix 20: Round 20 (2002) Early Bird and Income Recall Experiments for further information on the use of unfolding brackets in the NLSY79). A respondent who does not know or refuses to report the value of his certificate of deposit (CD) would first be asked if the CD is worth more than a randomly assigned entry amount ($10,000 for some respondents and $20,000 for others). If the value is not above the entry amount, the respondent is asked if the value of his CD is worth $5,000 or more. If the value is above the entry amount, he is asked if the value would amount to $30,000 or more. These three questions result in four potential reported ranges: 1) below $5,000; 2) between $5,000 and the entry amount; 3) between the entry amount and $30,000; and 4) above $30,000.

Beginning in survey year 2000, as part of an experiment for estimation of values, unfolding brackets were used for four asset/debt categories and the net wealth question. In 2004, unfolding brackets were expanded to all asset/debt categories for which respondents were not sure of a value.

Estimates given for asset values were incorporated into the calculation of TNFW_TRUNC variables by:

  • Using the midpoint of the range for quartiles 1, 2 and 3 and;
  • Using the median of values between the floor and highest value reported for quartile 4.

Step 3 -- Revision of top codes

In the final step, new and consistent top codes were calculated for the wealth data.

The NLSY79 has used three basic types of top coding algorithms for financial data. In the early years of the survey (up to 1988), every response above a specified ceiling value, such as $100,000 for some variables, is recoded to the ceiling value plus one dollar, such as $100,001. Unfortunately this algorithm results in a sharp downward bias in the sample mean because the right tail of the distribution is sharply truncated. From 1989 to 1994, a new algorithm was implemented, replacing all values above the hard ceiling with the average of all outlying values. Beginning in 1996, the hard ceiling value was eliminated and the average of the top 2% of values above the traditional hard ceiling was used as a topcode value.

In addition to the multiple topcoding methods used over time, some researchers commented on the lack of information above a hard ceiling. The data cleaning steps described above also dramatically changed a number of the highest asset values. For these reasons, home and vehicle values were re-topcoded. Homes and vehicles are clearly identifiable objects which pose the possibility of reidentifying respondents. Business-related values over $1,000,000 are also topcoded due to reidentification concerns. Other asset or debt categories are no longer topcoded because it is difficult to use them to identify a particular respondent. If the variable was previously topcoded it was re-topcoded using the top 2% of values as described above.

Computed net wealth variables

The current data release includes an updated set of net wealth variables. Unlike previous version of these items, these updated variables (named “TNFW_TRUNC”) do not incorporate imputations.

Below is a brief history and description of the variables that were used as components, sometimes combined by category, to create the TNFW_TRUNC figures. Information is still available on individual assets and debts for researchers who want to probe a particular aspect of a respondent’s financial life, such as their debts or ownership of vehicles. 

Click below to view programming code.

This part of Appendix 23 includes the programs that created the TNFW_TRUNC (Total Net Family Wealth) Variables for survey years 1985-2020.

1985 to 1987 TNFW_TRUNC variable creation


/*******************************/
/* Adjust for missing codes */
/*******************************/

array setmsngr (n) q13_118_revised q13_119_revised q13_120_revised q13_122_revised q13_131_revised
                  q13_132_revised q13_135_revised q13_136_revised q13_138_revised q13_140_revised;

do n = 1 to 10;
 if (sampweight = .) then setmsngr = -5;
  else if (setmsngr = .) then setmsngr = -4;
end;  

/***************************************************/
/* BEGIN COMPUTATIONS FOR NET WEALTH COMPONENTS    */
/***************************************************/

array assetsc (i)      homec mortc pdebtc cashc bizc bdebtc cdebtc carc posesc odebtc tnfw_trunc; /* 11 */

do i = 1 to 11;
 if (sampweight = 0) then assetsc = -5;
  else if (sampweight > 0) then assetsc = 0;
end;

/************************/
/* Compute POSES        */
/************************/

if (q13_137 = 1 & q13_138_revised >= 0) then posesc = (posesc + q13_138_revised);
 else if (q13_137 = 1 & q13_138_revised in(-1, -2, -3)) then posesc = -3;

/************************/
/* Compute ODEBT        */
/************************/

if (q13_139 = 1 & q13_140_revised >= 0) then odebtc = (odebtc + q13_140_revised);
 else if (q13_139 = 1 & q13_140_revised in(-1, -2, -3)) then odebtc = -3;

/************************/
/* Compute BIZ          */
/************************/

if (q13_128 = 1 & q13_131_revised >= 0) then bizc = (bizc + q13_131_revised);
 else if (q13_128 = 1 & q13_131_revised in(-1, -2, -3)) then bizc = -3;

/************************/
/* Compute BDEBT        */
/************************/

if (q13_132_revised >= 0) then bdebtc = (bdebtc + q13_132_revised);
 else if (q13_132_revised in(-1, -2, -3)) then bdebtc = -3;

/************************/
/* Compute CASH         */
/************************/

if (q13_121 = 1 & q13_122_revised >= 0) then cashc = (cashc + q13_122_revised);
 else if (q13_121 = 1 & q13_122_revised in(-1, -2, -3)) then cashc = -3;

/************************/
/* Compute HOME         */
/************************/

if (q13_117 = 1 & q13_118_revised >= 0) then homec = (homec + q13_118_revised);
 else if (q13_117 = 1 & q13_118_revised in(-1, -2, -3)) then homec = -3;

/************************/
/* Compute MORT         */
/************************/

if (q13_119_revised >= 0) then mortc = (mortc + q13_119_revised);
 else if (q13_119_revised in(-1, -2, -3)) then mortc = -3;

/************************/
/* Compute PDEBT        */
/************************/

if (q13_120_revised >= 0) then pdebtc = (pdebtc + q13_120_revised);
  else if (q13_120_revised in(-1, -2, -3)) then pdebtc = -3;

/************************/
/* Compute CDEBT        */
/************************/

if (q13_134 = 1 & q13_135_revised >= 0) then cdebtc = (cdebtc + q13_135_revised);
 else if (q13_134 = 1 & q13_135_revised in(-1, -2, -3)) then cdebtc = -3;

/************************/
/* Compute CAR          */
/************************/

if (q13_133 = 1 & q13_136_revised >= 0) then carc = (carc + q13_136_revised);
 else if (q13_133 = 1 & q13_136_revised in(-1, -2, -3)) then carc = -3;

/***********************/
/* Compute TNFW_TRUNC  */
/***********************/
/*********************************************************/
/* TNFW_TRUNC - add components created in above code     */
/*********************************************************/

if (sampweight = 0) then tnfw_trunc = -5;

if (homec  >= 0) then tnfw_trunc = (tnfw_trunc + homec );
if (mortc  >= 0) then tnfw_trunc = (tnfw_trunc - mortc );
if (pdebtc >= 0) then tnfw_trunc = (tnfw_trunc - pdebtc);
if (cashc  >= 0) then tnfw_trunc = (tnfw_trunc + cashc );
if (bizc   >= 0) then tnfw_trunc = (tnfw_trunc + bizc  );
if (bdebtc >= 0) then tnfw_trunc = (tnfw_trunc - bdebtc);
if (cdebtc >= 0) then tnfw_trunc = (tnfw_trunc - cdebtc);
if (carc   >= 0) then tnfw_trunc = (tnfw_trunc + carc  );
if (posesc >= 0) then tnfw_trunc = (tnfw_trunc + posesc);
if (odebtc >= 0) then tnfw_trunc = (tnfw_trunc - odebtc);

if (homec  in(-1, -2, -3)) then tnfw_trunc = -3;
if (mortc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (pdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cashc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (bizc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (bdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (carc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (posesc in(-1, -2, -3)) then tnfw_trunc = -3;
if (odebtc in(-1, -2, -3)) then tnfw_trunc = -3;

/*********************************************/
/* APPLY TOPCODES TO TNFW_TRUNC BY SURVEY YR */
/*********************************************/

if (tnfw_trunc_1985 > 488773) then tnfw_trunc_1985 = 1054132;
if (tnfw_trunc_1986 > 471571) then tnfw_trunc_1986 = 679856;
if (tnfw_trunc_1987 > 488649) then tnfw_trunc_1987 = 1005767;

tnfw_trunc_1985 = round(tnfw_trunc_1985);
tnfw_trunc_1986 = round(tnfw_trunc_1986);
tnfw_trunc_1987 = round(tnfw_trunc_1987);

1988 to 1993 TNFW_TRUNC variable creation


/*******************************/
/* Adjust for missing codes    */
/*******************************/

array setmsngr (n) q13_118_revised q13_119_revised q13_120_revised q13_122_revised q13_125_revised
                   q13_127_revised q13_131_revised q13_132_revised q13_135_revised q13_136_revised 
                   q13_138_revised q13_140_revised;

do n = 1 to 12;
 if (sampweight = .) then setmsngr = -5;
  else if (setmsngr = .) then setmsngr = -4;
end;  


/***************************************************/
/* BEGIN COMPUTATIONS FOR NET WEALTH COMPONENTS    */
/***************************************************/

array assetsc (i)      homec mortc pdebtc cashc stockc trustc bizc bdebtc cdebtc carc posesc odebtc tnfw_trunc; /* 13 */

do i = 1 to 13;
 if (sampweight = 0) then assetsc = -5;
  else if (sampweight > 0) then assetsc = 0;
end;

/************************/
/* Compute POSES        */
/************************/

if (q13_137 = 1 & q13_138_revised >= 0) then posesc = (posesc + q13_138_revised);
 else if (q13_137 = 1 & q13_138_revised in(-1, -2, -3)) then posesc = -3;

/************************/
/* Compute ODEBT        */
/************************/

if (q13_139 = 1 & q13_140_revised >= 0) then odebtc = (odebtc + q13_140_revised);
 else if (q13_139 = 1 & q13_140_revised in(-1, -2, -3)) then odebtc = -3;

/************************/
/* Compute STOCK        */
/************************/

if (q13_124 = 1 & q13_125_revised >= 0) then stockc = (stockc + q13_125_revised);
 else if (q13_124 = 1 & q13_125_revised in(-1, -2, -3)) then stockc = -3;

/************************/
/* Compute TRUST        */
/************************/

if (q13_126 = 1 & q13_127_revised >= 0) then trustc = (trustc + q13_127_revised);
 else if (q13_126 = 1 & q13_127_revised in(-1, -2, -3)) then trustc = -3;

/************************/
/* Compute BIZ          */
/************************/

if (q13_128 = 1 & q13_131_revised >= 0) then bizc = (bizc + q13_131_revised);
 else if (q13_128 = 1 & q13_131_revised in(-1, -2, -3)) then bizc = -3;

/************************/
/* Compute BDEBT        */
/************************/

if (q13_132_revised >= 0) then bdebtc = (bdebtc + q13_132_revised);
 else if (q13_132_revised in(-1, -2, -3)) then bdebtc = -3;

/************************/
/* Compute CASH         */
/************************/

if (q13_121 = 1 & q13_122_revised >= 0) then cashc = (cashc + q13_122_revised);
 else if (q13_121 = 1 & q13_122_revised in(-1, -2, -3)) then cashc = -3;

/************************/
/* Compute HOME         */
/************************/

if (q13_117 = 1 & q13_118_revised >= 0) then homec = (homec + q13_118_revised);
 else if (q13_117 = 1 & q13_118_revised in(-1, -2, -3)) then homec = -3;

/************************/
/* Compute MORT         */
/************************/

if (q13_119_revised >= 0) then mortc = (mortc + q13_119_revised);
 else if (q13_119_revised in(-1, -2, -3)) then mortc = -3;

/************************/
/* Compute PDEBT        */
/************************/

if (q13_120_revised >= 0) then pdebtc = (pdebtc + q13_120_revised);
  else if (q13_120_revised in(-1, -2, -3)) then pdebtc = -3;

/************************/
/* Compute CDEBT        */
/************************/

if (q13_134 = 1 & q13_135_revised >= 0) then cdebtc = (cdebtc + q13_135_revised);
 else if (q13_134 = 1 & q13_135_revised in(-1, -2, -3)) then cdebtc = -3;

/************************/
/* Compute CAR          */
/************************/

if (q13_133 = 1 & q13_136_revised >= 0) then carc = (carc + q13_136_revised);
 else if (q13_133 = 1 & q13_136_revised in(-1, -2, -3)) then carc = -3;

/************************/
/* Compute TNFW_TRUNC   */
/************************/
/*******************************************************/
/* TNFW_TRUNC - add components created in above code   */
/*******************************************************/

if (sampweight = 0) then tnfw_trunc = -5;

if (homec  >= 0) then tnfw_trunc = (tnfw_trunc + homec );
if (mortc  >= 0) then tnfw_trunc = (tnfw_trunc - mortc );
if (pdebtc >= 0) then tnfw_trunc = (tnfw_trunc - pdebtc);
if (cashc  >= 0) then tnfw_trunc = (tnfw_trunc + cashc );
if (stockc >= 0) then tnfw_trunc = (tnfw_trunc + stockc);
if (trustc >= 0) then tnfw_trunc = (tnfw_trunc + trustc);
if (bizc   >= 0) then tnfw_trunc = (tnfw_trunc + bizc  );
if (bdebtc >= 0) then tnfw_trunc = (tnfw_trunc - bdebtc);
if (cdebtc >= 0) then tnfw_trunc = (tnfw_trunc - cdebtc);
if (carc   >= 0) then tnfw_trunc = (tnfw_trunc + carc  );
if (posesc >= 0) then tnfw_trunc = (tnfw_trunc + posesc);
if (odebtc >= 0) then tnfw_trunc = (tnfw_trunc - odebtc);

if (homec  in(-1, -2, -3)) then tnfw_trunc = -3;
if (mortc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (pdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cashc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (stockc in(-1, -2, -3)) then tnfw_trunc = -3;
if (trustc in(-1, -2, -3)) then tnfw_trunc = -3;
if (bizc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (bdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (carc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (posesc in(-1, -2, -3)) then tnfw_trunc = -3;
if (odebtc in(-1, -2, -3)) then tnfw_trunc = -3;

/*********************************************/
/* APPLY TOPCODES TO TNFW_TRUNC BY SURVEY YR */
/*********************************************/

if (tnfw_trunc_1988 > 493828) then tnfw_trunc_1988 = 778437;
if (tnfw_trunc_1989 > 496507) then tnfw_trunc_1989 = 1103405;
if (tnfw_trunc_1990 > 499800) then tnfw_trunc_1990 = 1321099;
if (tnfw_trunc_1992 > 495536) then tnfw_trunc_1992 = 1148782;
if (tnfw_trunc_1993 >= 497550) then tnfw_trunc_1993 = 1116977;

tnfw_trunc_1988 = round(tnfw_trunc_1988);
tnfw_trunc_1989 = round(tnfw_trunc_1989);
tnfw_trunc_1990 = round(tnfw_trunc_1990);
tnfw_trunc_1992 = round(tnfw_trunc_1992);
tnfw_trunc_1993 = round(tnfw_trunc_1993);
 

1994 to 1998 TNFW_TRUNC variable creation


/*******************************/
/* Adjust for missing codes    */
/*******************************/

array setmsngr (n) q13_118_revised q13_119_revised q13_120_revised q13_122_revised q13_123a_revised
                   q13_123c_revised q13_123e_revised q13_125_revised
                   q13_127_revised q13_131_revised q13_132_revised q13_135_revised q13_136_revised 
                   q13_138_revised q13_140_revised;

do n = 1 to 15;
 if (sampweight = .) then setmsngr = -5;
  else if (setmsngr = .) then setmsngr = -4;
end;  


/***************************************************/
/* BEGIN COMPUTATIONS FOR NET WEALTH COMPONENTS    */
/***************************************************/


array assetsc (i)      homec mortc pdebtc cashc irac a401kc cdsc stockc trustc bizc bdebtc 
                       cdebtc carc posesc odebtc tnfw_trunc; /* 16 */


do i = 1 to 16;
 if (sampweight = 0) then assetsc = -5;
  else if (sampweight > 0) then assetsc = 0;
end;


/*************************/
/* Compute POSES         */
/*************************/

if (q13_137 = 1 & q13_138_revised >= 0) then posesc = (posesc + q13_138_revised);
 else if (q13_137 = 1 & q13_138_revised in(-1, -2, -3)) then posesc = -3;
 

/*************************/
/* Compute ODEBT         */
/*************************/

if (q13_139 = 1 & q13_140_revised >= 0) then odebtc = (odebtc + q13_140_revised);
 else if (q13_139 = 1 & q13_140_revised in(-1, -2, -3)) then odebtc = -3;
 

/*************************/
/* Compute STOCK         */
/*************************/

if (q13_124 = 1 & q13_125_revised >= 0) then stockc = (stockc + q13_125_revised);
 else if (q13_124 = 1 & q13_125_revised in(-1, -2, -3)) then stockc = -3;
 

/*************************/
/* Compute TRUST         */
/*************************/

if (q13_126 = 1 & q13_127_revised >= 0) then trustc = (trustc + q13_127_revised);
 else if (q13_126 = 1 & q13_127_revised in(-1, -2, -3)) then trustc = -3;
 

/*************************/
/* Compute BIZ           */
/*************************/

if (q13_128 = 1 & q13_131_revised >= 0) then bizc = (bizc + q13_131_revised);
 else if (q13_128 = 1 & q13_131_revised in(-1, -2, -3)) then bizc = -3;
 

/*************************/
/* Compute BDEBT         */
/*************************/

if (q13_132_revised >= 0) then bdebtc = (bdebtc + q13_132_revised);
 else if (q13_132_revised in(-1, -2, -3)) then bdebtc = -3;
 

/*************************/
/* Compute CASH          */
/*************************/

if (q13_121 = 1 & q13_122_revised >= 0) then cashc = (cashc + q13_122_revised);
 else if (q13_121 = 1 & q13_122_revised in(-1, -2, -3)) then cashc = -3;


/*************************/
/* Compute IRA           */
/*************************/

if (q13_123 = 1 & q13_123a_revised >= 0) then irac = (irac + q13_123a_revised);
 else if (q13_123 = 1 & q13_123a_revised in(-1, -2, -3)) then irac = -3;


/*************************/
/* Compute A401K         */
/*************************/

if (q13_123b = 1 & q13_123c_revised >= 0) then a401kc = (a401kc + q13_123c_revised);
 else if (q13_123b = 1 & q13_123c_revised in(-1, -2, -3)) then a401kc = -3;


/*************************/
/* Compute CDS           */
/*************************/

if (q13_123d = 1 & q13_123e_revised >= 0) then a401kc = (a401kc + q13_123e_revised);
 else if (q13_123d = 1 & q13_123e_revised in(-1, -2, -3)) then a401kc = -3;


/*************************/
/* Compute HOME          */
/*************************/

if (q13_117 = 1 & q13_118_revised >= 0) then homec = (homec + q13_118_revised);
 else if (q13_117 = 1 & q13_118_revised in(-1, -2, -3)) then homec = -3;
 

/*************************/
/* Compute MORT          */
/*************************/

if (q13_119_revised >= 0) then mortc = (mortc + q13_119_revised);
 else if (q13_119_revised in(-1, -2, -3)) then mortc = -3;
 

/*************************/
/* Compute PDEBT         */
/*************************/

if (q13_120_revised >= 0) then pdebtc = (pdebtc + q13_120_revised);
  else if (q13_120_revised in(-1, -2, -3)) then pdebtc = -3;
 

/*************************/
/* Compute CDEBT         */
/*************************/

if (q13_134 = 1 & q13_135_revised >= 0) then cdebtc = (cdebtc + q13_135_revised);
 else if (q13_134 = 1 & q13_135_revised in(-1, -2, -3)) then cdebtc = -3;
 

/*************************/
/* Compute CAR           */
/*************************/

if (q13_133 = 1 & q13_136_revised >= 0) then carc = (carc + q13_136_revised);
 else if (q13_133 = 1 & q13_136_revised in(-1, -2, -3)) then carc = -3;
 

/************************/
/* Compute TNFW_TRUNC   */
/************************/
/*******************************************************/
/* TNFW_TRUNC - add components created in above code   */
/*******************************************************/

if (sampweight = 0) then tnfw_trunc = -5;

if (homec  >= 0) then tnfw_trunc = (tnfw_trunc + homec );
if (mortc  >= 0) then tnfw_trunc = (tnfw_trunc - mortc );
if (pdebtc >= 0) then tnfw_trunc = (tnfw_trunc - pdebtc);
if (cashc  >= 0) then tnfw_trunc = (tnfw_trunc + cashc );
if (irac   >= 0) then tnfw_trunc = (tnfw_trunc + irac  );
if (a401kc >= 0) then tnfw_trunc = (tnfw_trunc + a401kc);
if (cdsc   >= 0) then tnfw_trunc = (tnfw_trunc + cdsc  );
if (stockc >= 0) then tnfw_trunc = (tnfw_trunc + stockc);
if (trustc >= 0) then tnfw_trunc = (tnfw_trunc + trustc);
if (bizc   >= 0) then tnfw_trunc = (tnfw_trunc + bizc  );
if (bdebtc >= 0) then tnfw_trunc = (tnfw_trunc - bdebtc);
if (cdebtc >= 0) then tnfw_trunc = (tnfw_trunc - cdebtc);
if (carc   >= 0) then tnfw_trunc = (tnfw_trunc + carc  );
if (posesc >= 0) then tnfw_trunc = (tnfw_trunc + posesc);
if (odebtc >= 0) then tnfw_trunc = (tnfw_trunc - odebtc);

if (homec  in(-1, -2, -3)) then tnfw_trunc = -3;
if (mortc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (pdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cashc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (irac   in(-1, -2, -3)) then tnfw_trunc = -3;
if (a401kc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdsc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (stockc in(-1, -2, -3)) then tnfw_trunc = -3;
if (trustc in(-1, -2, -3)) then tnfw_trunc = -3;
if (bizc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (bdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (carc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (posesc in(-1, -2, -3)) then tnfw_trunc = -3;
if (odebtc in(-1, -2, -3)) then tnfw_trunc = -3;

/*********************************************/
/* APPLY TOPCODES TO TNFW_TRUNC BY SURVEY YR */
/*********************************************/

if (tnfw_trunc_1994 > 500000) then tnfw_trunc_1994 = 1224375;
if (tnfw_trunc_1996 > 548000) then tnfw_trunc_1996 = 1232183;
if (tnfw_trunc_1998 > 640682) then tnfw_trunc_1998 = 1674836;

tnfw_trunc_1994 = round(tnfw_trunc_1994);
tnfw_trunc_1996 = round(tnfw_trunc_1996);
tnfw_trunc_1998 = round(tnfw_trunc_1998);
 

2000 TNFW_TRUNC variable creation


/************************************/
/* Compute dynamic QUARTILE VALUES  */
/************************************/

array quartileqs (i) q13_122_quartile1 q13_122_quartile2 q13_122_quartile3 q13_122_quartile4
q13_123c_quartile1 q13_123c_quartile2 q13_123c_quartile3 q13_123c_quartile4
q13_125_quartile1 q13_125_quartile2 q13_125_quartile3 q13_125_quartile4
q13_136_quartile1 q13_136_quartile2 q13_136_quartile3 q13_136_quartile4;

do i = 1 to 16;
quartileqs = 0;
end;

q13_122_quartile1 = (500/2);
q13_122_quartile2 = (500 + ((1500-500)/2));
q13_122_quartile3 = (1500 + ((3500-1500)/2));
q13_122_quartile4 = 60000;

q13_123c_quartile1 = (1000/2);
q13_123c_quartile2 = (1000 + ((4000-1000)/2));
q13_123c_quartile3 = (4000 + ((10000-4000)/2));
q13_123c_quartile4 = 75000;

q13_125_quartile1 = (1000/2);
q13_125_quartile2 = (1000 + ((4000-1000)/2));
q13_125_quartile3 = (4000 + ((15000-4000)/2));
q13_125_quartile4 = 85000;

q13_136_quartile1 = (1000/2);
q13_136_quartile2 = (1000 + ((5000-1000)/2));
q13_136_quartile3 = (5000 + ((10000-5000)/2));
q13_136_quartile4 = 40000;

/***************************************************/
/* BEGIN COMPUTATIONS FOR NET WEALTH COMPONENTS    */
/***************************************************/

array assetsc (i)   homec mortc pdebtc cashc irac a401kc cdsc stockc trustc trustc bizc 
                    bdebtc cdebtc carc posesc odebtc tnfw_trunc
                    solebiz farm_1_value1 farm_2_value1 business_1_value1 business_2_value1
                    business_3_value1 realestate_1_value1 realestate_2_value1 realestate_3_value1 realestate_4_value1
                    realestate_5_value1 realestate_6_value1
                    farm_1_value farm_2_value business_1_value business_2_value business_3_value realestate_1_value 
                    realestate_2_value realestate_3_value realestate_4_value realestate_5_value realestate_6_value
                    debtbiz farm_1_debt1 farm_2_debt1 business_1_debt1 business_2_debt1 business_3_debt1 
                    farm_1_debt farm_2_debt business_1_debt business_2_debt business_3_debt;


do i = 1 to 51;
if (sampweight = 0) then assetsc = -5;
else if (sampweight > 0) then assetsc = 0;
end;

/***********************/
/* Compute POSES       */
/***********************/

if (q13_137 = 1 & q13_138_revised >= 0) then posesc = (posesc + q13_138_revised);
else if (q13_137 = 1 & q13_138_revised in(-1, -2)) then posesc = -3;

/***********************/
/* Compute ODEBT       */
/***********************/

if (q13_139 = 1 & q13_140_revised >= 0) then odebtc = (odebtc + q13_140_revised);
else if (q13_139 = 1 & q13_140_revised in(-1, -2)) then odebtc = -3;

/***********************/
/* Compute TRUST       */
/***********************/

if (q13_126 = 1 & q13_127_revised >= 0) then trustc = (trustc + q13_127_revised);
else if (q13_126 = 1 & q13_127_revised in(-1, -2)) then trustc = -3;

/***********************/
/* Compute BIZ         */
/***********************/

/*****************************/
/* BIZ Component - solebiz   */
/*****************************/

if (q13_131_revised >= 0) then solebiz = (solebiz + q13_131_revised);
else if (q13_131_revised in(-1, -2)) then solebiz = -3;

/********************************************************************************************************/
/* BIZ Components - farm_#_value, business_#_value, realestate_#_value & percentage ownership           */
/********************************************************************************************************/

if (q13_fjt_11_01_trunc > -4) then farm_1_value1 = q13_fjt_11_01_trunc;
if (q13_fjt_11_02_trunc > -4) then farm_2_value1 = q13_fjt_11_02_trunc;
if (q13_bppjt_11_01_trunc > -4) then business_1_value1 = q13_bppjt_11_01_trunc;
if (q13_bppjt_11_02_trunc > -4) then business_2_value1 = q13_bppjt_11_02_trunc;
if (q13_bppjt_11_03_trunc > -4) then business_3_value1 = q13_bppjt_11_03_trunc;
if (q13_rejt_11_01 > -4) then realestate_1_value1 = q13_rejt_11_01;
if (q13_rejt_11_02 > -4) then realestate_2_value1 = q13_rejt_11_02;
if (q13_rejt_11_03 > -4) then realestate_3_value1 = q13_rejt_11_03;
if (q13_rejt_11_04 > -4) then realestate_4_value1 = q13_rejt_11_04;
if (q13_rejt_11_05 > -4) then realestate_5_value1 = q13_rejt_11_05;
if (q13_rejt_11_06 > -4) then realestate_6_value1 = q13_rejt_11_06;

if (q13_fjt_12b_01 > -4) then farm_1_pcntshare = q13_fjt_12b_01;
if (q13_fjt_12b_02 > -4) then farm_2_pcntshare = q13_fjt_12b_02;
if (q13_bppjt_12b_01 > -4) then business_1_pcntshare = q13_bppjt_12b_01;
if (q13_bppjt_12b_02 > -4) then business_2_pcntshare = q13_bppjt_12b_02;
if (q13_bppjt_12b_03 > -4) then business_3_pcntshare = q13_bppjt_12b_03;
if (q13_rejt_12b_01 > -4) then realestate_1_pcntshare = q13_rejt_12b_01;
if (q13_rejt_12b_02 > -4) then realestate_2_pcntshare = q13_rejt_12b_02;
if (q13_rejt_12b_03 > -4) then realestate_3_pcntshare = q13_rejt_12b_03;
if (q13_rejt_12b_04 > -4) then realestate_4_pcntshare = q13_rejt_12b_04;
if (q13_rejt_12b_05 > -4) then realestate_5_pcntshare = q13_rejt_12b_05;
if (q13_rejt_12b_06 > -4) then realestate_6_pcntshare = q13_rejt_12b_06;

if (farm_1_pcntshare > 0) then farm_1_pcntshare = (farm_1_pcntshare / 100);
if (farm_2_pcntshare > 0) then farm_2_pcntshare = (farm_2_pcntshare / 100);
if (business_1_pcntshare > 0) then business_1_pcntshare = (business_1_pcntshare / 100);
if (business_2_pcntshare > 0) then business_2_pcntshare = (business_2_pcntshare / 100);
if (business_3_pcntshare > 0) then business_3_pcntshare = (business_3_pcntshare / 100);
if (realestate_1_pcntshare > 0) then realestate_1_pcntshare = (realestate_1_pcntshare / 100);
if (realestate_2_pcntshare > 0) then realestate_2_pcntshare = (realestate_2_pcntshare / 100);
if (realestate_3_pcntshare > 0) then realestate_3_pcntshare = (realestate_3_pcntshare / 100);
if (realestate_4_pcntshare > 0) then realestate_4_pcntshare = (realestate_4_pcntshare / 100);
if (realestate_5_pcntshare > 0) then realestate_5_pcntshare = (realestate_5_pcntshare / 100);
if (realestate_6_pcntshare > 0) then realestate_6_pcntshare = (realestate_6_pcntshare / 100);

if (farm_1_value1 >= 0 & farm_1_pcntshare >= 0) then farm_1_value = (farm_1_value1 * farm_1_pcntshare);
if (farm_2_value1 >= 0 & farm_2_pcntshare >= 0) then farm_2_value = (farm_2_value1 * farm_2_pcntshare);
if (business_1_value1 >= 0 & business_1_pcntshare >= 0) then business_1_value = (business_1_value1 * business_1_pcntshare);
if (business_2_value1 >= 0 & business_2_pcntshare >= 0) then business_2_value = (business_2_value1 * business_2_pcntshare);
if (business_3_value1 >= 0 & business_3_pcntshare >= 0) then business_3_value = (business_3_value1 * business_3_pcntshare);
if (realestate_1_value1 >= 0 & realestate_1_pcntshare >= 0) then realestate_1_value = (realestate_1_value1 * realestate_1_pcntshare);
if (realestate_2_value1 >= 0 & realestate_2_pcntshare >= 0) then realestate_2_value = (realestate_2_value1 * realestate_2_pcntshare);
if (realestate_3_value1 >= 0 & realestate_3_pcntshare >= 0) then realestate_3_value = (realestate_3_value1 * realestate_3_pcntshare);
if (realestate_4_value1 >= 0 & realestate_4_pcntshare >= 0) then realestate_4_value = (realestate_4_value1 * realestate_4_pcntshare);
if (realestate_5_value1 >= 0 & realestate_5_pcntshare >= 0) then realestate_5_value = (realestate_5_value1 * realestate_5_pcntshare);
if (realestate_6_value1 >= 0 & realestate_6_pcntshare >= 0) then realestate_6_value = (realestate_6_value1 * realestate_6_pcntshare);

/*****************************/
/* Add components BIZ        */
/*****************************/

if (solebiz >= 0) then bizc = (bizc + solebiz); 
if (farm_1_value >= 0) then bizc = (bizc + farm_1_value);
if (farm_2_value >= 0) then bizc = (bizc + farm_2_value);
if (business_1_value >= 0) then bizc = (bizc + business_1_value);
if (business_2_value >= 0) then bizc = (bizc + business_2_value);
if (business_3_value >= 0) then bizc = (bizc + business_3_value);
if (realestate_1_value >= 0) then bizc = (bizc + realestate_1_value);
if (realestate_2_value >= 0) then bizc = (bizc + realestate_2_value);
if (realestate_3_value >= 0) then bizc = (bizc + realestate_3_value);
if (realestate_4_value >= 0) then bizc = (bizc + realestate_4_value);
if (realestate_5_value >= 0) then bizc = (bizc + realestate_5_value);
if (realestate_6_value >= 0) then bizc = (bizc + realestate_6_value);

if (solebiz in(-1, -2)) then bizc = -3;
if (farm_1_value in(-1, -2) | farm_1_pcntshare in(-1, -2)) then bizc = -3;
if (farm_2_value in(-1, -2) | farm_2_pcntshare in(-1, -2)) then bizc = -3;
if (business_1_value in(-1, -2) | business_1_pcntshare in(-1, -2)) then bizc = -3;
if (business_2_value in(-1, -2) | business_2_pcntshare in(-1, -2)) then bizc = -3;
if (business_3_value in(-1, -2) | business_3_pcntshare in(-1, -2)) then bizc = -3;
if (realestate_1_value in(-1, -2) | realestate_1_pcntshare in(-1, -2)) then bizc = -3;
if (realestate_2_value in(-1, -2) | realestate_2_pcntshare in(-1, -2)) then bizc = -3;
if (realestate_3_value in(-1, -2) | realestate_3_pcntshare in(-1, -2)) then bizc = -3;
if (realestate_4_value in(-1, -2) | realestate_4_pcntshare in(-1, -2)) then bizc = -3;
if (realestate_5_value in(-1, -2) | realestate_5_pcntshare in(-1, -2)) then bizc = -3;
if (realestate_6_value in(-1, -2) | realestate_6_pcntshare in(-1, -2)) then bizc = -3;

/****************************/
/* Compute BDEBT            */
/****************************/

/*****************************/
/* BDEBT Component - debtbiz */
/*****************************/

if (q13_132_revised >= 0) then debtbiz = (debtbiz + q13_132_revised);
else if (q13_132_revised in(-1, -2)) then debtbiz = -3;

/*****************************************************************************************/
/* BDEBT Components - farm_#_debt, business_#_debt, realestate_#_debt                    */
/*       (use ownership percentage computed above for bizc)                              */
/*****************************************************************************************/

if (q13_fjt_12_01 > -4) then farm_1_debt1 = q13_fjt_12_01;
if (q13_fjt_12_02 > -4) then farm_2_debt1 = q13_fjt_12_02;
if (q13_bppjt_12_01_trunc > -4) then business_1_debt1 = q13_bppjt_12_01_trunc;
if (q13_bppjt_12_02_trunc > -4) then business_2_debt1 = q13_bppjt_12_02_trunc;
if (q13_bppjt_12_03_trunc > -4) then business_3_debt1 = q13_bppjt_12_03_trunc;

if (farm_1_debt1 >= 0 & farm_1_pcntshare >= 0) then farm_1_debt = (farm_1_debt1 * farm_1_pcntshare);
if (farm_2_debt1 >= 0 & farm_2_pcntshare >= 0) then farm_2_debt = (farm_2_debt1 * farm_2_pcntshare);
if (business_1_debt1 >= 0 & business_1_pcntshare >= 0) then business_1_debt = (business_1_debt1 * business_1_pcntshare);
if (business_2_debt1 >= 0 & business_2_pcntshare >= 0) then business_2_debt = (business_2_debt1 * business_2_pcntshare);
if (business_3_debt1 >= 0 & business_3_pcntshare >= 0) then business_3_debt = (business_3_debt1 * business_3_pcntshare);

/*****************************/
/* Add components BDEBT      */
/*****************************/

if (debtbiz >= 0) then bdebtc = (bdebtc + debtbiz); 
if (farm_1_debt >= 0) then bdebtc = (bdebtc + farm_1_debt);
if (farm_2_debt >= 0) then bdebtc = (bdebtc + farm_2_debt);
if (business_1_debt >= 0) then bdebtc = (bdebtc + business_1_debt);
if (business_2_debt >= 0) then bdebtc = (bdebtc + business_2_debt);
if (business_3_debt >= 0) then bdebtc = (bdebtc + business_3_debt);

if (debtbiz in(-1, -2)) then bdebtc = -3;
if (farm_1_debt in(-1, -2) | farm_1_pcntshare in(-1, -2)) then bdebtc = -3;
if (farm_2_debt in(-1, -2) | farm_2_pcntshare in(-1, -2)) then bdebtc = -3;
if (business_1_debt in(-1, -2) | business_1_pcntshare in(-1, -2)) then bdebtc = -3;
if (business_2_debt in(-1, -2) | business_2_pcntshare in(-1, -2)) then bdebtc = -3;
if (business_3_debt in(-1, -2) | business_3_pcntshare in(-1, -2)) then bdebtc = -3;

/*****************************/
/* Compute CASH              */
/*****************************/

if (q13_121 = 1 & q13_122_revised >= 0) then cashc = (cashc + q13_122_revised);
else if (q13_121 = 1 & q13_122_revised in(-1, -2) & q13_122a < 0 & q13_122b < 0 
& q13_122c < 0) then cashc = -3;
else if (q13_122_revised in(-1, -2) & q13_122b = 0) then cashc = (cashc + q13_122_quartile1);
else if (q13_122_revised in(-1, -2) & q13_122b = 1) then cashc = (cashc + q13_122_quartile2);
else if (q13_122_revised in(-1, -2) & q13_122c = 0) then cashc = (cashc + q13_122_quartile3);
else if (q13_122_revised in(-1, -2) & q13_122c = 1) then cashc = (cashc + 60000);

/*****************************/
/* Compute CDS               */
/*****************************/

if (q13_123d = 1 & q13_123e_revised >= 0) then cdsc = (cdsc + q13_123e_revised);
else if (q13_123d = 1 & q13_123e_revised in(-1, -2)) then cdsc = -3;

/*****************************/
/* Compute STOCK             */
/*****************************/

if (q13_124 = 1 & q13_125_revised >= 0) then stockc = (stockc + q13_125_revised);
 else if (q13_124 = 1 & q13_125_revised in(-1, -2) & q13_125a < 0 & q13_125b < 0 
 & q13_125c < 0) then stockc = -3;
  else if (q13_125_revised in(-1, -2) & q13_125b = 0) then stockc = (stockc + q13_125_quartile1);
   else if (q13_125_revised in(-1, -2) & q13_125b = 1) then stockc = (stockc + q13_125_quartile2);
    else if (q13_125_revised in(-1, -2) & q13_125c = 0) then stockc = (stockc + q13_125_quartile3);
     else if (q13_125_revised in(-1, -2) & q13_125c = 1) then stockc = (stockc + 85000);

/*****************************/
/* Compute HOME              */
/*****************************/

if (q13_117 = 1 & q13_118_revised >= 0) then homec = (homec + q13_118_revised);
else if (q13_117 = 1 & q13_118_revised in(-1, -2)) then homec = -3;

/*****************************/
/* Compute MORT              */
/*****************************/

if (q13_119_revised >= 0) then mortc = (mortc + q13_119_revised);
else if (q13_119_revised in(-1, -2)) then mortc = -3;

/*****************************/
/* Compute PDEBT             */
/*****************************/

if (q13_120_revised >= 0) then pdebtc = (pdebtc + q13_120_revised);
else if (q13_120_revised in(-1, -2)) then pdebtc = -3;

/*****************************/
/* Compute IRA               */
/*****************************/

if (q13_123 = 1 & q13_123a_revised >= 0) then irac = (irac + q13_123a_revised);
else if (q13_123 = 1 & q13_123a_revised in(-1, -2)) then irac = -3;

/*****************************/
/* Compute A401K             */
/*****************************/

if (q13_123b = 1 & q13_123c_revised >= 0) then a401kc = (a401kc + q13_123c_revised);
else if (q13_123b = 1 & q13_123c_revised in(-1, -2) & q13_123c_1 < 0 & q13_123c_2 < 0 
& q13_123c_3 < 0) then a401kc = -3;
else if (q13_123c_revised in(-1, -2) & q13_123c_2 = 0) then a401kc = (a401kc + q13_123c_quartile1); 
else if (q13_123c_revised in(-1, -2) & q13_123c_2 = 1) then a401kc = (a401kc + q13_123c_quartile2);
else if (q13_123c_revised in(-1, -2) & q13_123c_3 = 0) then a401kc = (a401kc + q13_123c_quartile3);
else if (q13_123c_revised in(-1, -2) & q13_123c_3 = 1) then a401kc = (a401kc + 75000);

/*****************************/
/* Compute CDEBT             */
/*****************************/

if (q13_134 = 1 & q13_135_revised >= 0) then cdebtc = (cdebtc + q13_135_revised);
else if (q13_134 = 1 & q13_135_revised in(-1, -2)) then cdebtc = -3;


/*****************************/
/* Compute CAR               */
/*****************************/

if (q13_133 = 1 & q13_136_revised >= 0) then carc = (carc + q13_136_revised);
else if (q13_133 = 1 & q13_136_revised in(-1, -2) & q13_136a < 0 & q13_136b < 0 & q13_136c < 0) then carc = -3;
else if (q13_136_revised in(-1, -2) & q13_136b = 0) then carc = (carc + q13_136_quartile1);
else if (q13_136_revised in(-1, -2) & q13_136b = 1) then carc = (carc + q13_136_quartile2);
else if (q13_136_revised in(-1, -2) & q13_136c = 0) then carc = (carc + q13_136_quartile3);
else if (q13_136_revised in(-1, -2) & q13_136c = 1) then carc = (carc + 40000);

/************************/
/* Compute TNFW_TRUNC   */
/************************/
/*******************************************************/
/* TNFW_TRUNC - add components created in above code   */
/*******************************************************/

if (homec  >= 0) then tnfw_trunc = (tnfw_trunc + homec );
if (mortc  >= 0) then tnfw_trunc = (tnfw_trunc - mortc );
if (pdebtc >= 0) then tnfw_trunc = (tnfw_trunc - pdebtc);
if (cashc  >= 0) then tnfw_trunc = (tnfw_trunc + cashc );
if (irac   >= 0) then tnfw_trunc = (tnfw_trunc + irac  );
if (a401kc >= 0) then tnfw_trunc = (tnfw_trunc + a401kc);
if (cdsc   >= 0) then tnfw_trunc = (tnfw_trunc + cdsc  );
if (stockc >= 0) then tnfw_trunc = (tnfw_trunc + stockc);
if (trustc >= 0) then tnfw_trunc = (tnfw_trunc + trustc);
if (bizc   >= 0) then tnfw_trunc = (tnfw_trunc + bizc  );
if (bdebtc >= 0) then tnfw_trunc = (tnfw_trunc - bdebtc);
if (cdebtc >= 0) then tnfw_trunc = (tnfw_trunc - cdebtc);
if (carc   >= 0) then tnfw_trunc = (tnfw_trunc + carc  );
if (posesc >= 0) then tnfw_trunc = (tnfw_trunc + posesc);
if (odebtc >= 0) then tnfw_trunc = (tnfw_trunc - odebtc);

if (homec  in(-1, -2, -3)) then tnfw_trunc = -3;
if (mortc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (pdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cashc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (irac   in(-1, -2, -3)) then tnfw_trunc = -3;
if (a401kc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdsc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (stockc in(-1, -2, -3)) then tnfw_trunc = -3;
if (trustc in(-1, -2, -3)) then tnfw_trunc = -3;
if (bizc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (bdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (carc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (posesc in(-1, -2, -3)) then tnfw_trunc = -3;
if (odebtc in(-1, -2, -3)) then tnfw_trunc = -3;

/****************************************/
/* APPLY TOPCODE TO TNFW_TRUNC FOR 2000 */
/****************************************/

if (tnfw_trunc_2000 > 928938) then tnfw_trunc_2000 = 2056326;

tnfw_trunc_2000 = round(tnfw_trunc_2000);
 

2004 TNFW_TRUNC variable creation


/***************************************************/
/* Compute dollar amt for dollars & cents vars     */
/***************************************************/

nfa_7d_truncc = nfa_7d_trunc;
if (nfa_7d_trunc > 0) then nfa_7d_truncc = (nfa_7d_trunc/100);

debt_1ac = debt_1a_trunc;
if (debt_1a_trunc > 0) then debt_1ac = (debt_1a_trunc/100);

debt_2ac = debt_2a_trunc;
if (debt_2a_trunc > 0) then debt_2ac = (debt_2a_trunc/100);

debt_2dc = debt_2d_trunc;
if (debt_2d_trunc > 0) then debt_2dc = (debt_2d_trunc/100);

debt_3ac = debt_3a_trunc;
if (debt_3a_trunc > 0) then debt_3ac = (debt_3a_trunc/100);

debt_4ac = debt_4a_trunc;
if (debt_4a_trunc > 0) then debt_4ac = (debt_4a_trunc/100);

/***************************************************/
/* Compute dynamic QUARTILE VALUES for estimates   */
/***************************************************/

array quartileqs (i) quartile1 quartile2 quartile3 quartile4;

do i = 1 to 4;
 quartileqs = 0;
end;

if (symbol_entry_othhh = 10000) then do;
  quartile1 = (5000/2);
  quartile2 = (5000 + ((10000-5000)/2));
  quartile3 = (10000 + ((30000-10000)/2));
  quartile4 = 30000; /* Note: Use median of actual values > 30000 where possible.  Otherwise set to 30000 */
end;
else if (symbol_entry_othhh = 20000) then do;
  quartile1 = (5000/2);
  quartile2 = (5000 + ((20000-5000)/2));
  quartile3 = (20000 + ((30000-20000)/2));
  quartile4 = 30000; /* Note: Use median of actual values > 30000 where possible.  Otherwise set to 30000 */
end;

/***************************************************/
/* BEGIN COMPUTATIONS FOR NET WEALTH COMPONENTS    */
/***************************************************/

array assetsc (i)      homec mortc pdebtc cashc irac a401kc cdsc stockc trustc bizc
                       bdebtc cdebtc carc posesc odebtc tnfw_trunc
                       collections items ccdebt studentloan childstudentloan owebusiness otherdebt
                       solebiz farm_1_value1 farm_2_value1 business_1_value1 business_2_value1
                       business_3_value1 realestate_1_value1 realestate_2_value1 realestate_3_value1 realestate_4_value1
                       farm_1_value farm_2_value business_1_value business_2_value business_3_value realestate_1_value
                       realestate_2_value realestate_3_value realestate_4_value
                       debtbiz farm_1_debt1 farm_2_debt1 business_1_debt1 business_2_debt1 business_3_debt1
                       farm_1_debt farm_2_debt business_1_debt business_2_debt business_3_debt
                       govbonds mutual lifeinsure shares corpbond moneyowedtor
                       home1 secondhome mort1 secondmort pdebt1 secondpdebt
                       ira1 ira2 ira3 ira4 ira5 ira6 ira7 r_401k sp_401k
                       amtowe_assetpoorcars1 amtowe_assetpoorcars2 amtowe_assetpoorcars3
                       amountowe_vehicles1 amountowe_vehicles2 amountowe_vehicles3 amountowe_vehicles4
                       amountowe_vehicles5 amountowe_vehicles6 amtowe_othervehicles
                       mktval_assetpoorcars1 mktval_assetpoorcars2 mktval_assetpoorcars3
                       marketvalue_vehicles1 marketvalue_vehicles2 marketvalue_vehicles3 marketvalue_vehicles4
                       marketvalue_vehicles5 marketvalue_vehicles6 marketvalue_vehicles7 marketvalue_vehicles8
                       marketvalue_vehicles7 marketvalue_vehicles8 marketvalue_vehicles9 marketvalue_vehicles10
                       marketvalue_vehicles11 marketvalue_vehicles12
                       marketvalue_vehicles13 marketvalue_vehicles14 marketvalue_vehicles15 mktval_othervehicles;

do i = 1 to 105;
 if (sampweight = 0) then assetsc = -5;
  else if (sampweight > 0) then assetsc = 0;
end;

/****************************/
/* Compute POSES            */
/****************************/
/********************************************/
/* POSES Component - collections            */
/********************************************/

if (nfa_6a = 1 & nfa_6e_trunc >= 0) then collections = (collections + nfa_6e_trunc);
 else if (nfa_6a = 1 & nfa_6e_ref_1 = 1 & nfa_6e_sr000001 < 0 & nfa_6e_sr000002 < 0
 & nfa_6e_uab_a < 0 & nfa_6e_uab_b < 0 & nfa_6e_uab_c < 0) then collections = -1;
  else if (nfa_6a = 1 & nfa_6e_trunc in(-1, -2) & nfa_6e_sr000001 < 0 & nfa_6e_sr000002 < 0
  & nfa_6e_uab_a < 0 & nfa_6e_uab_b < 0 & nfa_6e_uab_c < 0) then collections = nfa_6e_trunc;
    else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 >= 0 & nfa_6e_sr000002 = nfa_6e_sr000001) then
    collections = (collections + nfa_6e_sr000001);
     else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 >= 0 & nfa_6e_sr000002 > nfa_6e_sr000001) then
     collections = (collections + (((nfa_6e_sr000002 - nfa_6e_sr000001)/2) + nfa_6e_sr000001));
      else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 >= 0 & nfa_6e_sr000002 < nfa_6e_sr000001) then
      collections = (collections + (((nfa_6e_sr000001 - nfa_6e_sr000002)/2) + nfa_6e_sr000002));
       else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_b = 0) then collections = (collections + quartile1);
        else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_b = 1) then collections = (collections + quartile2);
         else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_c = 0) then collections = (collections + quartile3);
          else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_c = 1) then collections = (collections + 55000);
           else if (nfa_6e_uab_a in(-1, -2) | nfa_6e_uab_b in(-1, -2) | nfa_6e_uab_c in(-1, -2)) then collections = -3;

/********************************************/
/* POSES Component - items                  */
/********************************************/

if (nfa_7 = 1 & nfa_7d_truncc >= 0) then items = (items + nfa_7d_truncc);
 else if (nfa_7 = 1 & nfa_7d_ref_1 = 1 & nfa_7d_uab_a < 0 & nfa_7d_uab_b < 0 & nfa_7d_uab_c < 0) then items = -1;
  else if (nfa_7 = 1 & nfa_7d_truncc in(-1, -2) & nfa_7d_uab_a < 0 & nfa_7d_uab_b < 0 & nfa_7d_uab_c < 0) then items = nfa_7d_truncc;
   else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_b = 0) then items = (items + quartile1);
    else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_b = 1) then items = (items + quartile2);
     else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_c = 0) then items = (items + quartile3);
      else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_c = 1) then items = (items + 60000);
       else if (nfa_7d_uab_a in(-1, -2) | nfa_7d_uab_b in(-1, -2) | nfa_7d_uab_c in(-1, -2)) then items = -3;

/*******************************/
/* Add components POSES        */
/*******************************/

if (collections >= 0) then posesc = (posesc + collections);
if (items >= 0) then posesc = (posesc + items);
if (collections in(-1, -2, -3)) then posesc = -3;
else if (items in(-1, -2, -3)) then posesc = -3;

/****************************/
/* Compute ODEBT            */
/****************************/

/********************************************/
/* ODEBT Component - ccdebt                 */
/********************************************/

if (debt_1 = 1 & debt_1ac >= 0) then ccdebt = (ccdebt + debt_1ac);
 else if (debt_1 = 1 & debt_1a_ref_1 = 1 & debt_1a_sr000001 < 0 & debt_1a_sr000002 < 0
 & debt_1a_uab_a < 0 & debt_1a_uab_b < 0 & debt_1a_uab_c < 0) then ccdebt = -1;
  else if (debt_1 = 1 & debt_1ac in(-1, -2) & debt_1a_sr000001 < 0 & debt_1a_sr000002 < 0
  & debt_1a_uab_a < 0 & debt_1a_uab_b < 0 & debt_1a_uab_c < 0) then ccdebt = debt_1ac;
    else if (debt_1a_sr000001 >= 0 & debt_1a_sr000002 >= 0 & debt_1a_sr000002 = debt_1a_sr000001) then
    ccdebt = (ccdebt + debt_1a_sr000001);
     else if (debt_1a_sr000001 >= 0 & debt_1a_sr000002 >= 0 & debt_1a_sr000002 > debt_1a_sr000001) then
     ccdebt = (ccdebt + (((debt_1a_sr000002 - debt_1a_sr000001)/2) + debt_1a_sr000001));
      else if (debt_1a_sr000001 >= 0 & debt_1a_sr000002 >= 0 & debt_1a_sr000002 < debt_1a_sr000001) then
      ccdebt = (ccdebt + (((debt_1a_sr000001 - debt_1a_sr000002)/2) + debt_1a_sr000002));
       else if (debt_1ac in(-1, -2, -4) & debt_1a_uab_b = 0) then ccdebt = (ccdebt + quartile1);
        else if (debt_1ac in(-1, -2, -4) & debt_1a_uab_b = 1) then ccdebt = (ccdebt + quartile2);
         else if (debt_1ac in(-1, -2, -4) & debt_1a_uab_c = 0) then ccdebt = (ccdebt + quartile3);
          else if (debt_1ac in(-1, -2, -4) & debt_1a_uab_c = 1) then ccdebt = (ccdebt + 47500);
           else if (debt_1a_uab_a in(-1, -2) | debt_1a_uab_b in(-1, -2) | debt_1a_uab_c in(-1, -2)) then ccdebt = -3;

/********************************************/
/* ODEBT Component - studentloan            */
/********************************************/

if (debt_2 = 1 & debt_2ac >= 0) then studentloan = (studentloan + debt_2ac);
 else if (debt_2 = 1 & debt_2a_ref_1 = 1 & debt_2a_uab_a < 0 & debt_2a_uab_b < 0 & debt_2a_uab_c < 0) then studentloan = -1;
  else if (debt_2 = 1 & debt_2ac in(-1, -2) & debt_2a_uab_a < 0 & debt_2a_uab_b < 0 & debt_2a_uab_c < 0) then studentloan = debt_2ac;
   else if (debt_2ac in(-1, -2, -4) & debt_2a_uab_b = 0) then studentloan = (studentloan + quartile1);
    else if (debt_2ac in(-1, -2, -4) & debt_2a_uab_b = 1) then studentloan = (studentloan + quartile2);
     else if (debt_2ac in(-1, -2, -4) & debt_2a_uab_c = 0) then studentloan = (studentloan + quartile3);
      else if (debt_2ac in(-1, -2, -4) & debt_2a_uab_c = 1) then studentloan = (studentloan + 50000);
       else if (debt_2a_uab_a in(-1, -2) | debt_2a_uab_b in(-1, -2) | debt_2a_uab_c in(-1, -2)) then studentloan = -3;

/********************************************/
/* ODEBT Component - childstudentloan       */
/********************************************/

if (debt_2c = 1 & debt_2dc >= 0) then childstudentloan = (childstudentloan + debt_2dc);
 else if (debt_2c = 1 & debt_2d_ref_1 = 1 & debt_2d_uab_a < 0 & debt_2d_uab_b < 0 & debt_2d_uab_c < 0) then childstudentloan = -1;
  else if (debt_2c = 1 & debt_2dc in(-1, -2) & debt_2d_uab_a < 0 & debt_2d_uab_b < 0 & debt_2d_uab_c < 0) then childstudentloan = debt_2dc;
   else if (debt_2dc in(-1, -2, -4) & debt_2d_uab_b = 0) then childstudentloan = (childstudentloan + quartile1);
    else if (debt_2dc in(-1, -2, -4) & debt_2d_uab_b = 1) then childstudentloan = (childstudentloan + quartile2);
     else if (debt_2dc in(-1, -2, -4) & debt_2d_uab_c = 0) then childstudentloan = (childstudentloan + quartile3);
      else if (debt_2dc in(-1, -2, -4) & debt_2d_uab_c = 1) then childstudentloan = (childstudentloan + 39000);
       else if (debt_2d_uab_a in(-1, -2) | debt_2d_uab_b in(-1, -2) | debt_2d_uab_c in(-1, -2)) then childstudentloan = -3;

/********************************************/
/* ODEBT Component - owebusiness            */
/********************************************/

if (debt_3 = 1 & debt_3ac >= 0) then owebusiness = (owebusiness + debt_3ac);
 else if (debt_3 = 1 & debt_3a_ref_1 = 1 & debt_3a_uab_a < 0 & debt_3a_uab_b < 0 & debt_3a_uab_c < 0) then owebusiness = -1;
  else if (debt_3 = 1 & debt_3ac in(-1, -2) & debt_3a_uab_a < 0 & debt_3a_uab_b < 0 & debt_3a_uab_c < 0) then owebusiness = debt_3ac;
   else if (debt_3ac in(-1, -2, -4) & debt_3a_uab_b = 0) then owebusiness = (owebusiness + quartile1);
    else if (debt_3ac in(-1, -2, -4) & debt_3a_uab_b = 1) then owebusiness = (owebusiness + quartile2);
     else if (debt_3ac in(-1, -2, -4) & debt_3a_uab_c = 0) then owebusiness = (owebusiness + quartile3);
      else if (debt_3ac in(-1, -2, -4) & debt_3a_uab_c = 1) then owebusiness = (owebusiness + 56000);
       else if (debt_3a_uab_a in(-1, -2) | debt_3a_uab_b in(-1, -2) | debt_3a_uab_c in(-1, -2)) then owebusiness = -3;

/********************************************/
/* ODEBT Component - otherdebt              */
/********************************************/

if (debt_4 = 1 & debt_4ac >= 0) then otherdebt = (otherdebt + debt_4ac);
 else if (debt_4 = 1 & debt_4a_ref_1 = 1 & debt_4a_uab_a < 0 & debt_4a_uab_b < 0 & debt_4a_uab_c < 0) then otherdebt = -1;
  else if (debt_4 = 1 & debt_4ac in(-1, -2) & debt_4a_uab_a < 0 & debt_4a_uab_b < 0 & debt_4a_uab_c < 0) then otherdebt = debt_4ac;
   else if (debt_4ac in(-1, -2, -4) & debt_4a_uab_b = 0) then otherdebt = (otherdebt + quartile1);
    else if (debt_4ac in(-1, -2, -4) & debt_4a_uab_b = 1) then otherdebt = (otherdebt + quartile2);
     else if (debt_4ac in(-1, -2, -4) & debt_4a_uab_c = 0) then otherdebt = (otherdebt + quartile3);
      else if (debt_4ac in(-1, -2, -4) & debt_4a_uab_c = 1) then otherdebt = (otherdebt + 58500);
       else if (debt_4a_uab_a in(-1, -2) | debt_4a_uab_b in(-1, -2) | debt_4a_uab_c in(-1, -2)) then otherdebt = -3;

/*******************************/
/* Add components ODEBT        */
/*******************************/

if (ccdebt >= 0) then odebtc = (odebtc + ccdebt);
if (studentloan >= 0) then odebtc = (odebtc + studentloan);
if (childstudentloan >= 0) then odebtc = (odebtc + childstudentloan);
if (owebusiness >= 0) then odebtc = (odebtc + owebusiness);
if (otherdebt >= 0) then odebtc = (odebtc + otherdebt);
if (ccdebt in(-1, -2, -3)) then odebtc = -3;
else if (studentloan in(-1, -2, -3)) then odebtc = -3;
else if (childstudentloan in(-1, -2, -3)) then odebtc = -3;
else if (owebusiness in(-1, -2, -3)) then odebtc = -3;
else if (otherdebt in(-1, -2, -3)) then odebtc = -3;

/****************************/
/* Compute BIZ              */
/****************************/

/********************************************/
/* BIZ Component - solebiz                  */
/********************************************/

if (q13_131_trunc >= 0) then solebiz = (solebiz + q13_131_trunc);
 else if (q13_131_trunc = 1 & q13_131_ref_1 = 1 & q13_131_sr000001 < 0 & q13_131_sr000002 < 0
 & q13_131_uab_a < 0 & q13_131_uab_b < 0 & q13_131_uab_c < 0) then solebiz = -1;
  else if (q13_131_trunc in(-1, -2) & q13_131_sr000001 < 0 & q13_131_sr000002 < 0
  & q13_131_uab_a < 0 & q13_131_uab_b < 0 & q13_131_uab_c < 0) then solebiz = q13_131_trunc;
   else if (q13_131_sr000001 >= 0 & q13_131_sr000002 >= 0 & q13_131_sr000002 = q13_131_sr000001) then
   solebiz = (solebiz + q13_131_sr000001);
    else if (q13_131_sr000001 >= 0 & q13_131_sr000002 >= 0 & q13_131_sr000002 > q13_131_sr000001) then
    solebiz = (solebiz + (((q13_131_sr000002 - q13_131_sr000001)/2) + q13_131_sr000001));
     else if (q13_131_sr000001 >= 0 & q13_131_sr000002 >= 0 & q13_131_sr000002 < q13_131_sr000001) then
     solebiz = (solebiz + (((q13_131_sr000001 - q13_131_sr000002)/2) + q13_131_sr000002));
      else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_b = 0) then solebiz = (solebiz + quartile1);
       else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_b = 1) then solebiz = (solebiz + quartile2);
        else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_c = 0) then solebiz = (solebiz + quartile3);
         else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_c = 1) then solebiz = (solebiz + 202500);
          else if (q13_131_uab_a in(-1, -2) | q13_131_uab_b in(-1, -2) | q13_131_uab_c in(-1, -2)) then solebiz = -3;

/********************************************************************************************************/
/* BIZ Components - farm_#_value, business_#_value, realestate_#_value & percentage ownership           */
/********************************************************************************************************/

if (q13_fjt_11_01 > -4) then farm_1_value1 = q13_fjt_11_01;
if (q13_fjt_11_trunc_02 > -4) then farm_2_value1 = q13_fjt_11_trunc_02;
if (q13_bppjt_11_trunc_01 > -4) then business_1_value1 = q13_bppjt_11_trunc_01;
if (q13_bppjt_11_trunc_02 > -4) then business_2_value1 = q13_bppjt_11_trunc_02;
if (q13_bppjt_11_03 > -4) then business_3_value1 = q13_bppjt_11_03;
if (q13_rejt_11_trunc_01 > -4) then realestate_1_value1 = q13_rejt_11_trunc_01;
if (q13_rejt_11_02 > -4) then realestate_2_value1 = q13_rejt_11_02;
if (q13_rejt_11_03 > -4) then realestate_3_value1 = q13_rejt_11_03;
if (q13_rejt_11_04 > -4) then realestate_4_value1 = q13_rejt_11_04;

if (q13_fjt_12b_01 > -4) then farm_1_pcntshare = q13_fjt_12b_01;
if (q13_fjt_12b_02 > -4) then farm_2_pcntshare = q13_fjt_12b_02;
if (q13_bppjt_12b_01 > -4) then business_1_pcntshare = q13_bppjt_12b_01;
if (q13_bppjt_12b_02 > -4) then business_2_pcntshare = q13_bppjt_12b_02;
if (q13_bppjt_12b_03 > -4) then business_3_pcntshare = q13_bppjt_12b_03;
if (q13_rejt_12b_01 > -4) then realestate_1_pcntshare = q13_rejt_12b_01;
if (q13_rejt_12b_02 > -4) then realestate_2_pcntshare = q13_rejt_12b_02;
if (q13_rejt_12b_03 > -4) then realestate_3_pcntshare = q13_rejt_12b_03;
if (q13_rejt_12b_04 > -4) then realestate_4_pcntshare = q13_rejt_12b_04;

if (farm_1_pcntshare > 0) then farm_1_pcntshare = (farm_1_pcntshare / 100);
if (farm_2_pcntshare > 0) then farm_2_pcntshare = (farm_2_pcntshare / 100);
if (business_1_pcntshare > 0) then business_1_pcntshare = (business_1_pcntshare / 100);
if (business_2_pcntshare > 0) then business_2_pcntshare = (business_2_pcntshare / 100);
if (business_3_pcntshare > 0) then business_3_pcntshare = (business_3_pcntshare / 100);
if (realestate_1_pcntshare > 0) then realestate_1_pcntshare = (realestate_1_pcntshare / 100);
if (realestate_2_pcntshare > 0) then realestate_2_pcntshare = (realestate_2_pcntshare / 100);
if (realestate_3_pcntshare > 0) then realestate_3_pcntshare = (realestate_3_pcntshare / 100);
if (realestate_4_pcntshare > 0) then realestate_4_pcntshare = (realestate_4_pcntshare / 100);

if (farm_1_value1 >= 0 & farm_1_pcntshare >= 0) then farm_1_value = (farm_1_value1 * farm_1_pcntshare);
if (farm_2_value1 >= 0 & farm_2_pcntshare >= 0) then farm_2_value = (farm_2_value1 * farm_2_pcntshare);
if (business_1_value1 >= 0 & business_1_pcntshare >= 0) then business_1_value = (business_1_value1 * business_1_pcntshare);
if (business_2_value1 >= 0 & business_2_pcntshare >= 0) then business_2_value = (business_2_value1 * business_2_pcntshare);
if (business_3_value1 >= 0 & business_3_pcntshare >= 0) then business_3_value = (business_3_value1 * business_3_pcntshare);
if (realestate_1_value1 >= 0 & realestate_1_pcntshare >= 0) then realestate_1_value = (realestate_1_value1 * realestate_1_pcntshare);
if (realestate_2_value1 >= 0 & realestate_2_pcntshare >= 0) then realestate_2_value = (realestate_2_value1 * realestate_2_pcntshare);
if (realestate_3_value1 >= 0 & realestate_3_pcntshare >= 0) then realestate_3_value = (realestate_3_value1 * realestate_3_pcntshare);
if (realestate_4_value1 >= 0 & realestate_4_pcntshare >= 0) then realestate_4_value = (realestate_4_value1 * realestate_4_pcntshare);

/*******************************/
/* Add components BIZ          */
/*******************************/

if (solebiz >= 0) then bizc = (bizc + solebiz);
if (farm_1_value >= 0) then bizc = (bizc + farm_1_value);
if (farm_2_value >= 0) then bizc = (bizc + farm_2_value);
if (business_1_value >= 0) then bizc = (bizc + business_1_value);
if (business_2_value >= 0) then bizc = (bizc + business_2_value);
if (business_3_value >= 0) then bizc = (bizc + business_3_value);
if (realestate_1_value >= 0) then bizc = (bizc + realestate_1_value);
if (realestate_2_value >= 0) then bizc = (bizc + realestate_2_value);
if (realestate_3_value >= 0) then bizc = (bizc + realestate_3_value);
if (realestate_4_value >= 0) then bizc = (bizc + realestate_4_value);

if (solebiz in(-1, -2, -3)) then bizc = -3;
if (farm_1_value in(-1, -2, -3) | farm_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (farm_2_value in(-1, -2, -3) | farm_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_1_value in(-1, -2, -3) | business_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_2_value in(-1, -2, -3) | business_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_3_value in(-1, -2, -3) | business_3_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_1_value in(-1, -2, -3) | realestate_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_2_value in(-1, -2, -3) | realestate_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_3_value in(-1, -2, -3) | realestate_3_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_4_value in(-1, -2, -3) | realestate_4_pcntshare in(-1, -2, -3)) then bizc = -3;

/****************************/
/* Compute BDEBT            */
/****************************/

/********************************************/
/* BDEBT Component - debtbiz                */
/********************************************/

if (q13_132_trunc >= 0) then debtbiz = (debtbiz + q13_132_trunc);
 else if (q13_132_trunc = 1 & q13_132_ref_1 = 1 & q13_132_sr000001 < 0 & q13_132_sr000002 < 0
 & q13_132_uab_a < 0 & q13_132_uab_b < 0) then debtbiz = -1;
  else if (q13_132_trunc in(-1, -2) & q13_132_sr000001 < 0 & q13_132_sr000002 < 0
  & q13_132_uab_a < 0 & q13_132_uab_b < 0) then debtbiz = q13_132_trunc;
   else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 = q13_132_sr000001) then
   debtbiz = (debtbiz + q13_132_sr000001);
    else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 > q13_132_sr000001) then
    debtbiz = (debtbiz + (((q13_132_sr000002 - q13_132_sr000001)/2) + q13_132_sr000001));
     else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 < q13_132_sr000001) then
     debtbiz = (debtbiz + (((q13_132_sr000001 - q13_132_sr000002)/2) + q13_132_sr000002));
      else if (q13_132_trunc in(-1, -2, -4) & q13_132_uab_b = 0) then debtbiz = (debtbiz + quartile1);
       else if (q13_132_trunc in(-1, -2, -4) & q13_132_uab_b = 1) then debtbiz = (debtbiz + quartile2);
        else if (q13_132_uab_a in(-1, -2) | q13_132_uab_b in(-1, -2)) then debtbiz = -3;

/********************************************************************************************************/
/* BDEBT Components - farm_#_debt, business_#_debt, realestate_#_debt                                   */
/*       (use ownership percentage computed above for bizc)                                             */
/********************************************************************************************************/

if (q13_fjt_12_01 > -4) then farm_1_debt1 = q13_fjt_12_01;
if (q13_fjt_12_02 > -4) then farm_2_debt1 = q13_fjt_12_02;
if (q13_bppjt_12_trunc_01 > -4) then business_1_debt1 = q13_bppjt_12_trunc_01;
if (q13_bppjt_12_trunc_02 > -4) then business_2_debt1 = q13_bppjt_12_trunc_02;
if (q13_bppjt_12_03 > -4) then business_3_debt1 = q13_bppjt_12_03;

if (farm_1_debt1 >= 0 & farm_1_pcntshare >= 0) then farm_1_debt = (farm_1_debt1 * farm_1_pcntshare);
if (farm_2_debt1 >= 0 & farm_2_pcntshare >= 0) then farm_2_debt = (farm_2_debt1 * farm_2_pcntshare);
if (business_1_debt1 >= 0 & business_1_pcntshare >= 0) then business_1_debt = (business_1_debt1 * business_1_pcntshare);
if (business_2_debt1 >= 0 & business_2_pcntshare >= 0) then business_2_debt = (business_2_debt1 * business_2_pcntshare);
if (business_3_debt1 >= 0 & business_3_pcntshare >= 0) then business_3_debt = (business_3_debt1 * business_3_pcntshare);

/*******************************/
/* Add components BDEBT        */
/*******************************/

if (debtbiz >= 0) then bdebtc = (bdebtc + debtbiz);
if (farm_1_debt >= 0) then bdebtc = (bdebtc + farm_1_debt);
if (farm_2_debt >= 0) then bdebtc = (bdebtc + farm_2_debt);
if (business_1_debt >= 0) then bdebtc = (bdebtc + business_1_debt);
if (business_2_debt >= 0) then bdebtc = (bdebtc + business_2_debt);
if (business_3_debt >= 0) then bdebtc = (bdebtc + business_3_debt);

if (debtbiz in(-1, -2, -3)) then bdebtc = -3;
if (farm_1_debt in(-1, -2, -3) | farm_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (farm_2_debt in(-1, -2, -3) | farm_2_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_1_debt in(-1, -2, -3) | business_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_2_debt in(-1, -2, -3) | business_2_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_3_debt in(-1, -2, -3) | business_3_pcntshare in(-1, -2, -3)) then bdebtc = -3;

/****************************/
/* Compute CASH             */
/****************************/

/********************************************/
/* CASH Component - cash                    */
/********************************************/

if (fa_1 = 1 & fa_1a_trunc >= 0) then cashc = (cashc + fa_1a_trunc);
 else if (fa_1 = 1 & fa_1_ref_1 = 1 & fa_1a_sr000001_tc < 0 & fa_1a_sr000002_tc < 0
 & fa_1a_uab_a < 0 & fa_1a_uab_b < 0 & fa_1a_uab_c < 0) then cashc = -1;
  else if (fa_1 = 1 & fa_1a_trunc in(-1, -2) & fa_1a_sr000001_tc < 0 & fa_1a_sr000002_tc < 0
  & fa_1a_uab_a < 0 & fa_1a_uab_b < 0 & fa_1a_uab_c < 0) then cashc = fa_1a_trunc;
   else if (fa_1a_sr000001_tc >= 0 & fa_1a_sr000002_tc >= 0 & fa_1a_sr000002_tc = fa_1a_sr000001_tc) then
   cashc = (cashc + fa_1a_sr000001_tc);
    else if (fa_1a_sr000001_tc >= 0 & fa_1a_sr000002_tc >= 0 & fa_1a_sr000002_tc > fa_1a_sr000001_tc) then
    cashc = (cashc + (((fa_1a_sr000002_tc - fa_1a_sr000001_tc)/2) + fa_1a_sr000001_tc));
     else if (fa_1a_sr000001_tc >= 0 & fa_1a_sr000002_tc >= 0 & fa_1a_sr000002_tc < fa_1a_sr000001_tc) then
     cashc = (cashc + (((fa_1a_sr000001_tc - fa_1a_sr000002_tc)/2) + fa_1a_sr000002_tc));
      else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_b = 0) then cashc = (cashc + quartile1);
       else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_b = 1) then cashc = (cashc + quartile2);
        else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_c = 0) then cashc = (cashc + quartile3);
         else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_c = 1) then cashc = (cashc + 65000);
          else if (fa_1a_uab_a in(-1, -2) | fa_1a_uab_b in(-1, -2) | fa_1a_uab_c in(-1, -2)) then cashc = -3;

/*****************************/
/* Set CASHC -3 missing      */
/*****************************/

if (cashc in(-1, -2, -3)) then cashc = -3;

/****************************/
/* Compute CDS              */
/****************************/

/********************************************/
/* CDS Component - cds                      */
/********************************************/

if (fa_2 = 1 & fa_2a_trunc >= 0) then cdsc = (cdsc + fa_2a_trunc);
 else if (fa_2 = 1 & fa_2_ref_1 = 1 & fa_2a_sr000001 < 0 & fa_2a_sr000002 < 0
 & fa_2a_uab_a < 0 & fa_2a_uab_b < 0 & fa_2a_uab_c < 0) then cdsc = -1;
  else if (fa_2 = 1 & fa_2a_trunc in(-1, -2) & fa_2a_sr000001 < 0 & fa_2a_sr000002 < 0
  & fa_2a_uab_a < 0 & fa_2a_uab_b < 0 & fa_2a_uab_c < 0) then cdsc = fa_2a_trunc;
   else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002 >= 0 & fa_2a_sr000002 = fa_2a_sr000001) then
   cdsc = (cdsc + fa_2a_sr000001);
    else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002 >= 0 & fa_2a_sr000002 > fa_2a_sr000001) then
    cdsc = (cdsc + (((fa_2a_sr000002 - fa_2a_sr000001)/2) + fa_2a_sr000001));
     else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002 >= 0 & fa_2a_sr000002 < fa_2a_sr000001) then
     cdsc = (cdsc + (((fa_2a_sr000001 - fa_2a_sr000002)/2) + fa_2a_sr000002));
      else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_b = 0) then cdsc = (cdsc + quartile1);
       else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_b = 1) then cdsc = (cdsc + quartile2);
        else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_c = 0) then cdsc = (cdsc + quartile3);
         else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_c = 1) then cdsc = (cdsc + 60000);
          else if (fa_2a_uab_a in(-1, -2) | fa_2a_uab_b in(-1, -2) | fa_2a_uab_c in(-1, -2)) then cdsc = -3;

/*****************************/
/* Set CDSC -3 missing       */
/*****************************/

if (cdsc in(-1, -2, -3)) then cdsc = -3;


/****************************/
/* Compute STOCK            */
/****************************/

/********************************************/
/* STOCK Component - govbonds               */
/********************************************/

if (fa_3 = 1 & fa_3a_trunc >= 0) then govbonds = (govbonds + fa_3a_trunc);
 else if (fa_3 = 1 & fa_3_ref_1 = 1 & fa_3a_sr000001 < 0 & fa_3a_sr000002 < 0
 & fa_3a_uab_a < 0 & fa_3a_uab_b < 0 & fa_3a_uab_c < 0) then govbonds = -1;
  else if (fa_3 = 1 & fa_3a_trunc in(-1, -2) & fa_3a_sr000001 < 0 & fa_3a_sr000002 < 0
  & fa_3a_uab_a < 0 & fa_3a_uab_b < 0 & fa_3a_uab_c < 0) then govbonds = fa_3a_trunc;
   else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 = fa_3a_sr000001) then
   govbonds = (govbonds + fa_3a_sr000001);
    else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 > fa_3a_sr000001) then
    govbonds = (govbonds + (((fa_3a_sr000002 - fa_3a_sr000001)/2) + fa_3a_sr000001));
     else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 < fa_3a_sr000001) then
     govbonds = (govbonds + (((fa_3a_sr000001 - fa_3a_sr000002)/2) + fa_3a_sr000002));
      else if (fa_3a_trunc in(-1, -2, -4) & fa_3a_uab_b = 0) then govbonds = (govbonds + quartile1);
       else if (fa_3a_trunc in(-1, -2, -4) & fa_3a_uab_b = 1) then govbonds = (govbonds + quartile2);
        else if (fa_3a_trunc in(-1, -2, -4) & fa_3a_uab_c = 0) then govbonds = (govbonds + quartile3);
         else if (fa_3a_trunc in(-1, -2, -4) & fa_3a_uab_c = 1) then govbonds = (govbonds + 57500);
          else if (fa_3a_uab_a in(-1, -2) | fa_3a_uab_b in(-1, -2) | fa_3a_uab_c in(-1, -2)) then govbonds = -3;

/********************************************/
/* STOCK Component - mutual                 */
/********************************************/

if (fa_4 = 1 & fa_4a_trunc >= 0) then mutual = (mutual + fa_4a_trunc);
 else if (fa_4 = 1 & fa_4_ref_1 = 1 & fa_4a_sr000001 < 0 & fa_4a_sr000002 < 0
 & fa_4a_uab_a < 0 & fa_4a_uab_b < 0 & fa_4a_uab_c < 0) then mutual = -1;
  else if (fa_4 = 1 & fa_4a_trunc in(-1, -2) & fa_4a_sr000001 < 0 & fa_4a_sr000002 < 0
  & fa_4a_uab_a < 0 & fa_4a_uab_b < 0 & fa_4a_uab_c < 0) then mutual = fa_4a_trunc;
   else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 = fa_4a_sr000001) then
   mutual = (mutual + fa_4a_sr000001);
    else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 > fa_4a_sr000001) then
    mutual = (mutual + (((fa_4a_sr000002 - fa_4a_sr000001)/2) + fa_4a_sr000001));
     else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 < fa_4a_sr000001) then
     mutual = (mutual + (((fa_4a_sr000001 - fa_4a_sr000002)/2) + fa_4a_sr000002));
      else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_b = 0) then mutual = (mutual + quartile1);
       else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_b = 1) then mutual = (mutual + quartile2);
        else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_c = 0) then mutual = (mutual + quartile3);
         else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_c = 1) then mutual = (mutual + 70000);
          else if (fa_4a_uab_a in(-1, -2) | fa_4a_uab_b in(-1, -2) | fa_4a_uab_c in(-1, -2)) then mutual = -3;

/********************************************/
/* STOCK Component - lifeinsure             */
/********************************************/

if (fa_5 = 1 & fa_5a_trunc >= 0) then lifeinsure = (lifeinsure + fa_5a_trunc);
 else if (fa_5 = 1 & fa_5_ref_1 = 1 & fa_5a_sr000001 < 0 & fa_5a_sr000002 < 0
 & fa_5a_uab_a < 0 & fa_5a_uab_b < 0 & fa_5a_uab_c < 0) then lifeinsure = -1;
  else if (fa_5 = 1 & fa_5a_trunc in(-1, -2) & fa_5a_sr000001 < 0 & fa_5a_sr000002 < 0
  & fa_5a_uab_a < 0 & fa_5a_uab_b < 0 & fa_5a_uab_c < 0) then lifeinsure = fa_5a_trunc;
   else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002 >= 0 & fa_5a_sr000002 = fa_5a_sr000001) then
   lifeinsure = (lifeinsure + fa_5a_sr000001);
    else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002 >= 0 & fa_5a_sr000002 > fa_5a_sr000001) then
    lifeinsure = (lifeinsure + (((fa_5a_sr000002 - fa_5a_sr000001)/2) + fa_5a_sr000001));
     else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002 >= 0 & fa_5a_sr000002 < fa_5a_sr000001) then
     lifeinsure = (lifeinsure + (((fa_5a_sr000001 - fa_5a_sr000002)/2) + fa_5a_sr000002));
      else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_b = 0) then lifeinsure = (lifeinsure + quartile1);
       else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_b = 1) then lifeinsure = (lifeinsure + quartile2);
        else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_c = 0) then lifeinsure = (lifeinsure + quartile3);
         else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_c = 1) then lifeinsure = (lifeinsure + 100000);
          else if (fa_5a_uab_a in(-1, -2) | fa_5a_uab_b in(-1, -2) | fa_5a_uab_c in(-1, -2)) then lifeinsure = -3;

/********************************************/
/* STOCK Component - shares                 */
/********************************************/

if (fa_9 = 1 & fa_9a_trunc >= 0) then shares = (shares + fa_9a_trunc);
 else if (fa_9 = 1 & fa_9_ref_1 = 1 & fa_9a_sr000001 < 0 & fa_9a_sr000002 < 0
 & fa_9a_uab_a < 0 & fa_9a_uab_b < 0 & fa_9a_uab_c < 0) then shares = -1;
  else if (fa_9 = 1 & fa_9a_trunc in(-1, -2) & fa_9a_sr000001 < 0 & fa_9a_sr000002 < 0
  & fa_9a_uab_a < 0 & fa_9a_uab_b < 0 & fa_9a_uab_c < 0) then shares = fa_9a_trunc;
   else if (fa_9a_sr000001 >= 0 & fa_9a_sr000002 >= 0 & fa_9a_sr000002 = fa_9a_sr000001) then
   shares = (shares + fa_9a_sr000001);
    else if (fa_9a_sr000001 >= 0 & fa_9a_sr000002 >= 0 & fa_9a_sr000002 > fa_9a_sr000001) then
    shares = (shares + (((fa_9a_sr000002 - fa_9a_sr000001)/2) + fa_9a_sr000001));
     else if (fa_9a_sr000001 >= 0 & fa_9a_sr000002 >= 0 & fa_9a_sr000002 < fa_9a_sr000001) then
     shares = (shares + (((fa_9a_sr000001 - fa_9a_sr000002)/2) + fa_9a_sr000002));
      else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_b = 0) then shares = (shares + quartile1);
       else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_b = 1) then shares = (shares + quartile2);
        else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_c = 0) then shares = (shares + quartile3);
         else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_c = 1) then shares = (shares + 100000);
          else if (fa_9a_uab_a in(-1, -2) | fa_9a_uab_b in(-1, -2) | fa_9a_uab_c in(-1, -2)) then shares = -3;

/********************************************/
/* STOCK Component - corpbond               */
/********************************************/

if (fa_10 = 1 & fa_10a_trunc >= 0) then corpbond = (corpbond + fa_10a_trunc);
 else if (fa_10 = 1 & fa_10_ref_1 = 1 & fa_10a_sr000001 < 0 & fa_10a_sr000002 < 0
 & fa_10a_uab_a < 0 & fa_10a_uab_b < 0 & fa_10a_uab_c < 0) then corpbond = -1;
  else if (fa_10 = 1 & fa_10a_trunc in(-1, -2) & fa_10a_sr000001 < 0 & fa_10a_sr000002 < 0
  & fa_10a_uab_a < 0 & fa_10a_uab_b < 0 & fa_10a_uab_c < 0) then corpbond = fa_10a_trunc;
   else if (fa_10a_sr000001 >= 0 & fa_10a_sr000002 >= 0 & fa_10a_sr000002 = fa_10a_sr000001) then
   corpbond = (corpbond + fa_10a_sr000001);
    else if (fa_10a_sr000001 >= 0 & fa_10a_sr000002 >= 0 & fa_10a_sr000002 > fa_10a_sr000001) then
    corpbond = (corpbond + (((fa_10a_sr000002 - fa_10a_sr000001)/2) + fa_10a_sr000001));
     else if (fa_10a_sr000001 >= 0 & fa_10a_sr000002 >= 0 & fa_10a_sr000002 < fa_10a_sr000001) then
     corpbond = (corpbond + (((fa_10a_sr000001 - fa_10a_sr000002)/2) + fa_10a_sr000002));
      else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_b = 0) then corpbond = (corpbond + quartile1);
       else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_b = 1) then corpbond = (corpbond + quartile2);
        else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_c = 0) then corpbond = (corpbond + quartile3);
         else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_c = 1) then corpbond = (corpbond + 100000);
          else if (fa_10a_uab_a in(-1, -2) | fa_10a_uab_b in(-1, -2) | fa_10a_uab_c in(-1, -2)) then corpbond = -3;

/********************************************/
/* STOCK Component - moneyowedtor           */
/********************************************/

if (fa_11 = 1 & fa_11a_trunc >= 0) then moneyowedtor = (moneyowedtor + fa_11a_trunc);
 else if (fa_11 = 1 & fa_11_ref_1 = 1 & fa_11a_sr000001 < 0 & fa_11a_sr000002 < 0
 & fa_11a_uab_a < 0 & fa_11a_uab_b < 0 & fa_11a_uab_c < 0) then moneyowedtor = -1;
  else if (fa_11 = 1 & fa_11a_trunc in(-1, -2) & fa_11a_sr000001 < 0 & fa_11a_sr000002 < 0
  & fa_11a_uab_a < 0 & fa_11a_uab_b < 0 & fa_11a_uab_c < 0) then moneyowedtor = fa_11a_trunc;
   else if (fa_11a_sr000001 >= 0 & fa_11a_sr000002 >= 0 & fa_11a_sr000002 = fa_11a_sr000001) then
   moneyowedtor = (moneyowedtor + fa_11a_sr000001);
    else if (fa_11a_sr000001 >= 0 & fa_11a_sr000002 >= 0 & fa_11a_sr000002 > fa_11a_sr000001) then
    moneyowedtor = (moneyowedtor + (((fa_11a_sr000002 - fa_11a_sr000001)/2) + fa_11a_sr000001));
     else if (fa_11a_sr000001 >= 0 & fa_11a_sr000002 >= 0 & fa_11a_sr000002 < fa_11a_sr000001) then
     moneyowedtor = (moneyowedtor + (((fa_11a_sr000001 - fa_11a_sr000002)/2) + fa_11a_sr000002));
      else if (fa_11a_trunc in(-1, -2, -4) & fa_11a_uab_b = 0) then moneyowedtor = (moneyowedtor + quartile1);
       else if (fa_11a_trunc in(-1, -2, -4) & fa_11a_uab_b = 1) then moneyowedtor = (moneyowedtor + quartile2);
        else if (fa_11a_trunc in(-1, -2, -4) & fa_11a_uab_c = 0) then moneyowedtor = (moneyowedtor + quartile3);
         else if (fa_11a_trunc in(-1, -2, -4) & fa_11a_uab_c = 1) then moneyowedtor = (moneyowedtor + 60000);
          else if (fa_11a_uab_a in(-1, -2) | fa_11a_uab_b in(-1, -2) | fa_11a_uab_c in(-1, -2)) then moneyowedtor = -3;

/*******************************/
/* Add components STOCK        */
/*******************************/

if (govbonds >= 0) then stockc = (stockc + govbonds);
if (mutual >= 0) then stockc = (stockc + mutual);
if (lifeinsure >= 0) then stockc = (stockc + lifeinsure);
if (shares >= 0) then stockc = (stockc + shares);
if (corpbond >= 0) then stockc = (stockc + corpbond);
if (moneyowedtor >= 0) then stockc = (stockc + moneyowedtor);
if (govbonds in(-1, -2, -3)) then stockc = -3;
else if (mutual in(-1, -2, -3)) then stockc = -3;
else if (lifeinsure in(-1, -2, -3)) then stockc = -3;
else if (shares in(-1, -2, -3)) then stockc = -3;
else if (corpbond in(-1, -2, -3)) then stockc = -3;
else if (moneyowedtor in(-1, -2, -3)) then stockc = -3;

/****************************/
/* Compute HOME             */
/****************************/

/********************************************/
/* HOME Component - home1                   */
/********************************************/

if (nfa_1 = 1 & nfa_1a_trunc >= 0) then home1 = (home1 + nfa_1a_trunc);
 else if (nfa_1 = 1 & nfa_1_ref_1 = 1 & nfa_1a_sr000001 < 0 & nfa_1a_sr000002 < 0
 & nfa_1a_uab_a < 0 & nfa_1a_uab_b < 0 & nfa_1a_uab_c < 0) then home1 = -1;
  else if (nfa_1 = 1 & nfa_1a_trunc in(-1, -2) & nfa_1a_sr000001 < 0 & nfa_1a_sr000002 < 0
  & nfa_1a_uab_a < 0 & nfa_1a_uab_b < 0 & nfa_1a_uab_c < 0) then home1 = nfa_1a_trunc;
   else if (nfa_1a_sr000001 >= 0 & nfa_1a_sr000002 >= 0 & nfa_1a_sr000002 = nfa_1a_sr000001) then
   home1 = (home1 + nfa_1a_sr000001);
    else if (nfa_1a_sr000001 >= 0 & nfa_1a_sr000002 >= 0 & nfa_1a_sr000002 > nfa_1a_sr000001) then
    home1 = (home1 + (((nfa_1a_sr000002 - nfa_1a_sr000001)/2) + nfa_1a_sr000001));
     else if (nfa_1a_sr000001 >= 0 & nfa_1a_sr000002 >= 0 & nfa_1a_sr000002 < nfa_1a_sr000001) then
     home1 = (home1 + (((nfa_1a_sr000001 - nfa_1a_sr000002)/2) + nfa_1a_sr000002));
      else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_b = 0) then home1 = (home1 + quartile1);
       else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_b = 1) then home1 = (home1 + quartile2);
        else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_c = 0) then home1 = (home1 + quartile3);
         else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_c = 1) then home1 = (home1 + 165000);
          else if (nfa_1a_uab_a in(-1, -2) | nfa_1a_uab_b in(-1, -2) | nfa_1a_uab_c in(-1, -2)) then home1 = -3;

/********************************************/
/* HOME Component - secondhome              */
/********************************************/

if (nfa_2 = 1 & nfa_2a_trunc >= 0) then secondhome = (secondhome + nfa_2a_trunc);
 else if (nfa_2 = 1 & nfa_2_ref_1 = 1 & nfa_2a_sr000001 < 0 & nfa_2a_sr000002 < 0
 & nfa_2a_uab_a < 0 & nfa_2a_uab_b < 0 & nfa_2a_uab_c < 0) then secondhome = -1;
  else if (nfa_2 = 1 & nfa_2a_trunc in(-1, -2) & nfa_2a_sr000001 < 0 & nfa_2a_sr000002 < 0
  & nfa_2a_uab_a < 0 & nfa_2a_uab_b < 0 & nfa_2a_uab_c < 0) then secondhome = nfa_2a_trunc;
   else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 = nfa_2a_sr000001) then
   secondhome = (secondhome + nfa_2a_sr000001);
    else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 > nfa_2a_sr000001) then
    secondhome = (secondhome + (((nfa_2a_sr000002 - nfa_2a_sr000001)/2) + nfa_2a_sr000001));
     else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 < nfa_2a_sr000001) then
     secondhome = (secondhome + (((nfa_2a_sr000001 - nfa_2a_sr000002)/2) + nfa_2a_sr000002));
      else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_b = 0) then secondhome = (secondhome + quartile1);
       else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_b = 1) then secondhome = (secondhome + quartile2);
        else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_c = 0) then secondhome = (secondhome + quartile3);
         else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_c = 1) then secondhome = (secondhome + 150000);
          else if (nfa_2a_uab_a in(-1, -2) | nfa_2a_uab_b in(-1, -2) | nfa_2a_uab_c in(-1, -2)) then secondhome = -3;

/*******************************/
/* Add components HOME         */
/*******************************/

if (home1 >= 0) then homec = (homec + home1);
if (secondhome >= 0) then homec = (homec + secondhome);
if (home1 in(-1, -2, -3)) then homec = -3;
else if (secondhome in(-1, -2, -3)) then homec = -3;

/****************************/
/* Compute MORT             */
/****************************/

/********************************************/
/* MORT Component - mort1                   */
/********************************************/

if (nfa_1b_trunc >= 0) then mort1 = (mort1 + nfa_1b_trunc);
 else if (nfa_1b_ref_1 = 1 & nfa_1b_sr000001_trunc < 0 & nfa_1b_sr000002_trunc < 0
 & nfa_1b_uab_a < 0 & nfa_1b_uab_b < 0 & nfa_1b_uab_c < 0) then mort1 = -1;
  else if (nfa_1b_trunc in(-1, -2) & nfa_1b_sr000001_trunc < 0 & nfa_1b_sr000002_trunc < 0
  & nfa_1b_uab_a < 0 & nfa_1b_uab_b < 0 & nfa_1b_uab_c < 0) then mort1 = nfa_1b_trunc;
   else if (nfa_1b_sr000001_trunc >= 0 & nfa_1b_sr000002_trunc >= 0 & nfa_1b_sr000002_trunc = nfa_1b_sr000001_trunc) then
   mort1 = (mort1 + nfa_1b_sr000001_trunc);
    else if (nfa_1b_sr000001_trunc >= 0 & nfa_1b_sr000002_trunc >= 0 & nfa_1b_sr000002_trunc > nfa_1b_sr000001_trunc) then
    mort1 = (mort1 + (((nfa_1b_sr000002_trunc - nfa_1b_sr000001_trunc)/2) + nfa_1b_sr000001_trunc));
     else if (nfa_1b_sr000001_trunc >= 0 & nfa_1b_sr000002_trunc >= 0 & nfa_1b_sr000002_trunc < nfa_1b_sr000001_trunc) then
     mort1 = (mort1 + (((nfa_1b_sr000001_trunc - nfa_1b_sr000002_trunc)/2) + nfa_1b_sr000002_trunc));
      else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_b = 0) then mort1 = (mort1 + quartile1);
       else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_b = 1) then mort1 = (mort1 + quartile2);
        else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_c = 0) then mort1 = (mort1 + quartile3);
         else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_c = 1) then mort1 = (mort1 + 100000);
          else if (nfa_1b_uab_a in(-1, -2) | nfa_1b_uab_b in(-1, -2) | nfa_1b_uab_c in(-1, -2)) then mort1 = -3;

/********************************************/
/* MORT Component - secondmort              */
/********************************************/

if (nfa_2b_trunc >= 0) then secondmort = (secondmort + nfa_2b_trunc);
 else if (nfa_2b_ref_1 = 1 & nfa_2b_sr000001 < 0 & nfa_2b_sr000002 < 0
 & nfa_2b_uab_a < 0 & nfa_2b_uab_b < 0 & nfa_2b_uab_c < 0) then secondmort = -1;
  else if (nfa_2b_trunc in(-1, -2) & nfa_2b_sr000001 < 0 & nfa_2b_sr000002 < 0
  & nfa_2b_uab_a < 0 & nfa_2b_uab_b < 0 & nfa_2b_uab_c < 0) then secondmort = nfa_2b_trunc;
   else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 = nfa_2b_sr000001) then
   secondmort = (secondmort + nfa_2b_sr000001);
    else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 > nfa_2b_sr000001) then
    secondmort = (secondmort + (((nfa_2b_sr000002 - nfa_2b_sr000001)/2) + nfa_2b_sr000001));
     else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 < nfa_2b_sr000001) then
     secondmort = (secondmort + (((nfa_2b_sr000001 - nfa_2b_sr000002)/2) + nfa_2b_sr000002));
      else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_b = 0) then secondmort = (secondmort + quartile1);
       else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_b = 1) then secondmort = (secondmort + quartile2);
        else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_c = 0) then secondmort = (secondmort + quartile3);
         else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_c = 1) then secondmort = (secondmort + 100000);
          else if (nfa_2b_uab_a in(-1, -2) | nfa_2b_uab_b in(-1, -2) | nfa_2b_uab_c in(-1, -2)) then secondmort = -3;

/*******************************/
/* Add components MORT         */
/*******************************/

if (mort1 >= 0) then mortc = (mortc + mort1);
if (secondmort >= 0) then mortc = (mortc + secondmort);
if (mort1 in(-1, -2, -3)) then mortc = -3;
else if (secondmort in(-1, -2, -3)) then mortc = -3;

/****************************/
/* Compute PDEBT            */
/****************************/

/********************************************/
/* PDEBT Component - pdebt1                 */
/********************************************/

if (nfa_1c_trunc >= 0) then pdebt1 = (pdebt1 + nfa_1c_trunc);
 else if (nfa_1c_ref_1 = 1 & nfa_1c_sr000001 < 0 & nfa_1c_sr000002 < 0
 & nfa_1c_uab_a < 0 & nfa_1c_uab_b < 0 & nfa_1c_uab_c < 0) then pdebt1 = -1;
  else if (nfa_1c_trunc in(-1, -2) & nfa_1c_sr000001 < 0 & nfa_1c_sr000002 < 0
  & nfa_1c_uab_a < 0 & nfa_1c_uab_b < 0 & nfa_1c_uab_c < 0) then pdebt1 = nfa_1c_trunc;
   else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 = nfa_1c_sr000001) then
   pdebt1 = (pdebt1 + nfa_1c_sr000001);
    else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 > nfa_1c_sr000001) then
    pdebt1 = (pdebt1 + (((nfa_1c_sr000002 - nfa_1c_sr000001)/2) + nfa_1c_sr000001));
     else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 < nfa_1c_sr000001) then
     pdebt1 = (pdebt1 + (((nfa_1c_sr000001 - nfa_1c_sr000002)/2) + nfa_1c_sr000002));
      else if (nfa_1c_trunc in(-1, -2, -4) & nfa_1c_uab_b = 0) then pdebt1 = (pdebt1 + quartile1);
       else if (nfa_1c_trunc in(-1, -2, -4) & nfa_1c_uab_b = 1) then pdebt1 = (pdebt1 + quartile2);
        else if (nfa_1c_trunc in(-1, -2, -4) & nfa_1c_uab_c = 0) then pdebt1 = (pdebt1 + quartile3);
         else if (nfa_1c_trunc in(-1, -2, -4) & nfa_1c_uab_c = 1) then pdebt1 = (pdebt1 + 55000);
          else if (nfa_1c_uab_a in(-1, -2) | nfa_1c_uab_b in(-1, -2) | nfa_1c_uab_c in(-1, -2)) then pdebt1 = -3;

/********************************************/
/* PDEBT Component - secondpdebt            */
/********************************************/

if (nfa_2c >= 0) then secondpdebt = (secondpdebt + nfa_2c);
 else if (nfa_2c_ref_1 = 1 & nfa_2c_sr000001 < 0 & nfa_2c_sr000002 < 0
 & nfa_2c_uab_a < 0 & nfa_2c_uab_b < 0) then secondpdebt = -1;
  else if (nfa_2c in(-1, -2) & nfa_2c_sr000001 < 0 & nfa_2c_sr000002 < 0
  & nfa_2c_uab_a < 0 & nfa_2c_uab_b < 0) then secondpdebt = nfa_2c;
   else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 = nfa_2c_sr000001) then
   secondpdebt = (secondpdebt + nfa_2c_sr000001);
    else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 > nfa_2c_sr000001) then
    secondpdebt = (secondpdebt + (((nfa_2c_sr000002 - nfa_2c_sr000001)/2) + nfa_2c_sr000001));
     else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 < nfa_2c_sr000001) then
     secondpdebt = (secondpdebt + (((nfa_2c_sr000001 - nfa_2c_sr000002)/2) + nfa_2c_sr000002));
      else if (nfa_2c in(-1, -2, -4) & nfa_2c_uab_b = 0) then secondpdebt = (secondpdebt + quartile1);
       else if (nfa_2c in(-1, -2, -4) & nfa_2c_uab_b = 1) then secondpdebt = (secondpdebt + quartile2);
        else if (nfa_2c_uab_a in(-1, -2) | nfa_2c_uab_b in(-1, -2)) then secondpdebt = -3;

/*******************************/
/* Add components PDEBT        */
/*******************************/

if (pdebt1 >= 0) then pdebtc = (pdebtc + pdebt1);
if (secondpdebt >= 0) then pdebtc = (pdebtc + secondpdebt);
if (pdebt1 in(-1, -2, -3)) then pdebtc = -3;
else if (secondpdebt in(-1, -2, -3)) then pdebtc = -3;

/****************************/
/* Compute IRA              */
/****************************/

/********************************************/
/* IRA Component - ira1                     */
/********************************************/

if (fa_8 = 1 & fa_8d_trunc_01 >= 0) then ira1 = (ira1 + fa_8d_trunc_01);
 else if (fa_8 = 1 & fa_8d_trunc_01 in(-1, -2) & fa_8d_sr000001_01 < 0 & fa_8d_sr000002_01 < 0
 & fa_8d_uab_a_01 < 0 & fa_8d_uab_c_01 < 0) then ira1 = fa_8d_trunc_01;
  else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 >= 0 & fa_8d_sr000002_01 = fa_8d_sr000001_01) then
  ira1 = (ira1 + fa_8d_sr000001_01);
   else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 >= 0 & fa_8d_sr000002_01 > fa_8d_sr000001_01) then
   ira1 = (ira1 + (((fa_8d_sr000002_01 - fa_8d_sr000001_01)/2) + fa_8d_sr000001_01));
    else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 >= 0 & fa_8d_sr000002_01 < fa_8d_sr000001_01) then
    ira1 = (ira1 + (((fa_8d_sr000001_01 - fa_8d_sr000002_01)/2) + fa_8d_sr000002_01));
     else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_c_01 = 0) then ira1 = (ira1 + quartile3);
      else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_c_01 = 1) then ira1 = (ira1 + 77000);
       else if (fa_8d_uab_a_01 in(-1, -2) | fa_8d_uab_c_01 in(-1, -2)) then ira1 = -3;

/********************************************/
/* IRA Component - ira2                     */
/********************************************/

if (fa_8 = 1 & fa_8d_trunc_02 >= 0) then ira2 = (ira2 + fa_8d_trunc_02);
 else if (fa_8 = 1 & fa_8d_trunc_02 in(-1, -2) & fa_8d_sr000001_02 < 0 & fa_8d_sr000002_02 < 0
 & fa_8d_uab_a_02 < 0 & fa_8d_uab_b_02 < 0 & fa_8d_uab_c_02 < 0) then ira2 = fa_8d_trunc_02;
  else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 >= 0 & fa_8d_sr000002_02 = fa_8d_sr000001_02) then
  ira2 = (ira2 + fa_8d_sr000001_02);
   else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 >= 0 & fa_8d_sr000002_02 > fa_8d_sr000001_02) then
   ira2 = (ira2 + (((fa_8d_sr000002_02 - fa_8d_sr000001_02)/2) + fa_8d_sr000001_02));
    else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 >= 0 & fa_8d_sr000002_02 < fa_8d_sr000001_02) then
    ira2 = (ira2 + (((fa_8d_sr000001_02 - fa_8d_sr000002_02)/2) + fa_8d_sr000002_02));
     else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_b_02 = 0) then ira2 = (ira2 + quartile1);
      else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_b_02 = 1) then ira2 = (ira2 + quartile2);
       else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_c_02 = 0) then ira2 = (ira2 + quartile3);
        else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_c_02 = 1) then ira2 = (ira2 + 50000);
         else if (fa_8d_uab_a_02 in(-1, -2) | fa_8d_uab_b_02 in(-1, -2) | fa_8d_uab_c_02 in(-1, -2)) then ira2 = -3;

/********************************************/
/* IRA Component - ira3                     */
/********************************************/

if (fa_8 = 1 & fa_8d_trunc_03 >= 0) then ira3 = (ira3 + fa_8d_trunc_03);
  else if (fa_8 = 1 & fa_8d_trunc_03 in(-1, -2) & fa_8d_sr000001_03 < 0 & fa_8d_sr000002_03 < 0
  & fa_8d_uab_a_03 < 0 & fa_8d_uab_b_03 < 0 ) then ira3 = fa_8d_trunc_03;
   else if (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_03 >= 0 & fa_8d_sr000002_03 = fa_8d_sr000001_03) then
   ira3 = (ira3 + fa_8d_sr000001_03);
    else if (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_03 >= 0 & fa_8d_sr000002_03 > fa_8d_sr000001_03) then
    ira3 = (ira3 + (((fa_8d_sr000002_03 - fa_8d_sr000001_03)/2) + fa_8d_sr000001_03));
     else if (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_03 >= 0 & fa_8d_sr000002_03 < fa_8d_sr000001_03) then
     ira3 = (ira3 + (((fa_8d_sr000001_03 - fa_8d_sr000002_03)/2) + fa_8d_sr000002_03));
      else if (fa_8d_trunc_03 in(-1, -2, -4) & fa_8d_uab_b_03 = 0) then ira3 = (ira3 + quartile1);
       else if (fa_8d_trunc_03 in(-1, -2, -4) & fa_8d_uab_b_03 = 1) then ira3 = (ira3 + quartile2);
        else if (fa_8d_uab_a_03 in(-1, -2) | fa_8d_uab_b_03 in(-1, -2)) then ira3 = -3;

/********************************************/
/* IRA Component - ira4                     */
/********************************************/

if (fa_8 = 1 & fa_8d_trunc_04 >= 0) then ira4 = (ira4 + fa_8d_trunc_04);
  else if (fa_8 = 1 & fa_8d_trunc_04 in(-1, -2) & fa_8d_sr000001_04 < 0 & fa_8d_sr000002_04 < 0
  & fa_8d_uab_a_04 < 0 & fa_8d_uab_b_04 < 0 & fa_8d_uab_c_04 < 0) then ira4 = fa_8d_trunc_04;
   else if (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_04 >= 0 & fa_8d_sr000002_04 = fa_8d_sr000001_04) then
   ira4 = (ira4 + fa_8d_sr000001_04);
    else if (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_04 >= 0 & fa_8d_sr000002_04 > fa_8d_sr000001_04) then
    ira4 = (ira4 + (((fa_8d_sr000002_04 - fa_8d_sr000001_04)/2) + fa_8d_sr000001_04));
     else if (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_04 >= 0 & fa_8d_sr000002_04 < fa_8d_sr000001_04) then
     ira4 = (ira4 + (((fa_8d_sr000001_04 - fa_8d_sr000002_04)/2) + fa_8d_sr000002_04));
      else if (fa_8d_trunc_04 in(-1, -2, -4) & fa_8d_uab_b_04 = 0) then ira4 = (ira4 + quartile1);
       else if (fa_8d_trunc_04 in(-1, -2, -4) & fa_8d_uab_b_04 = 1) then ira4 = (ira4 + quartile2);
        else if (fa_8d_trunc_04 in(-1, -2, -4) & fa_8d_uab_c_04 = 0) then ira4 = (ira4 + quartile3);
         else if (fa_8d_trunc_04 in(-1, -2, -4) & fa_8d_uab_c_04 = 1) then ira4 = (ira4 + 42500);
          else if (fa_8d_uab_a_04 in(-1, -2) | fa_8d_uab_b_04 in(-1, -2) | fa_8d_uab_c_04 in(-1, -2)) then ira4 = -3;

/********************************************/
/* IRA Component - ira5                     */
/********************************************/

if (fa_8 = 1 & fa_8d_trunc_05 >= 0) then ira5 = (ira5 + fa_8d_trunc_05);
  else if (fa_8 = 1 & fa_8d_trunc_05 in(-1, -2) & fa_8d_sr000001_05 < 0 & fa_8d_sr000002_05 < 0
  & fa_8d_uab_a_05 < 0 & fa_8d_uab_b_05 < 0 & fa_8d_uab_c_05 < 0) then ira5 = fa_8d_trunc_05;
   else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 >= 0 & fa_8d_sr000002_05 = fa_8d_sr000001_05) then
   ira5 = (ira5 + fa_8d_sr000001_05);
    else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 >= 0 & fa_8d_sr000002_05 > fa_8d_sr000001_05) then
    ira5 = (ira5 + (((fa_8d_sr000002_05 - fa_8d_sr000001_05)/2) + fa_8d_sr000001_05));
     else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 >= 0 & fa_8d_sr000002_05 < fa_8d_sr000001_05) then
     ira5 = (ira5 + (((fa_8d_sr000001_05 - fa_8d_sr000002_05)/2) + fa_8d_sr000002_05));
      else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_b_05 = 0) then ira5 = (ira5 + quartile1);
       else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_b_05 = 1) then ira5 = (ira5 + quartile2);
        else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_c_05 = 0) then ira5 = (ira5 + quartile3);
         else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_c_05 = 1) then ira5 = (ira5 + 52000);
          else if (fa_8d_uab_a_05 in(-1, -2) | fa_8d_uab_b_05 in(-1, -2) | fa_8d_uab_c_05 in(-1, -2)) then ira5 = -3;

/********************************************/
/* IRA Component - ira6                     */
/********************************************/

if (fa_8 = 1 & fa_8d_trunc_06 >= 0) then ira6 = (ira6 + fa_8d_trunc_06);
  else if (fa_8 = 1 & fa_8d_trunc_06 in(-1, -2) & fa_8d_sr000001_06 < 0 & fa_8d_sr000002_06 < 0
  & fa_8d_uab_a_06 < 0 & fa_8d_uab_b_06 < 0) then ira6 = fa_8d_trunc_06;
   else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 >= 0 & fa_8d_sr000002_06 = fa_8d_sr000001_06) then
   ira6 = (ira6 + fa_8d_sr000001_06);
    else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 >= 0 & fa_8d_sr000002_06 > fa_8d_sr000001_06) then
    ira6 = (ira6 + (((fa_8d_sr000002_06 - fa_8d_sr000001_06)/2) + fa_8d_sr000001_06));
     else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 >= 0 & fa_8d_sr000002_06 < fa_8d_sr000001_06) then
     ira6 = (ira6 + (((fa_8d_sr000001_06 - fa_8d_sr000002_06)/2) + fa_8d_sr000002_06));
      else if (fa_8d_trunc_06 in(-1, -2, -4) & fa_8d_uab_b_06 = 0) then ira6 = (ira6 + quartile1);
       else if (fa_8d_trunc_06 in(-1, -2, -4) & fa_8d_uab_b_06 = 1) then ira6 = (ira6 + quartile2);
        else if (fa_8d_uab_a_06 in(-1, -2) | fa_8d_uab_b_06 in(-1, -2)) then ira6 = -3;

/********************************************/
/* IRA Component - ira7                     */
/********************************************/

if (fa_8 = 1 & fa_8d_trunc_07 >= 0) then ira7 = (ira7 + fa_8d_trunc_07);
  else if (fa_8 = 1 & fa_8d_trunc_07 in(-1, -2) & fa_8d_sr000001_07 < 0 & fa_8d_sr000002_07 < 0
  & fa_8d_uab_a_07 < 0 & fa_8d_uab_c_07 < 0) then ira7 = fa_8d_trunc_07;
   else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 >= 0 & fa_8d_sr000002_07 = fa_8d_sr000001_07) then
   ira7 = (ira7 + fa_8d_sr000001_07);
    else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 >= 0 & fa_8d_sr000002_07 > fa_8d_sr000001_07) then
    ira7 = (ira7 + (((fa_8d_sr000002_07 - fa_8d_sr000001_07)/2) + fa_8d_sr000001_07));
     else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 >= 0 & fa_8d_sr000002_07 < fa_8d_sr000001_07) then
     ira7 = (ira7 + (((fa_8d_sr000001_07 - fa_8d_sr000002_07)/2) + fa_8d_sr000002_07));
      else if (fa_8d_trunc_07 in(-1, -2, -4) & fa_8d_uab_c_07 = 0) then ira7 = (ira7 + quartile3);
       else if (fa_8d_trunc_07 in(-1, -2, -4) & fa_8d_uab_c_07 = 1) then ira7 = (ira7 + 80000);
        else if (fa_8d_uab_a_07 in(-1, -2) | fa_8d_uab_c_07 in(-1, -2)) then ira7 = -3;

/*******************************/
/* Add components IRA          */
/*******************************/

if (ira1 >= 0) then irac = (irac + ira1);
if (ira2 >= 0) then irac = (irac + ira2);
if (ira3 >= 0) then irac = (irac + ira3);
if (ira4 >= 0) then irac = (irac + ira4);
if (ira5 >= 0) then irac = (irac + ira5);
if (ira6 >= 0) then irac = (irac + ira6);
if (ira7 >= 0) then irac = (irac + ira7);
if (ira1 in(-1, -2, -3)) then irac = -3;
else if (ira2 in(-1, -2, -3)) then irac = -3;
else if (ira3 in(-1, -2, -3)) then irac = -3;
else if (ira4 in(-1, -2, -3)) then irac = -3;
else if (ira5 in(-1, -2, -3)) then irac = -3;
else if (ira6 in(-1, -2, -3)) then irac = -3;
else if (ira7 in(-1, -2, -3)) then irac = -3;

/****************************/
/* Compute A401K            */
/****************************/

/********************************************/
/* A401K component - r_401k            */
/********************************************/

if (fa_6b = 1 & fa_6e_trunc >= 0) then r_401k = (r_401k + fa_6e_trunc);
 else if (fa_6b = 1 & fa_6e_ref_1 = 1 & fa_6e_sr000001 < 0 & fa_6e_sr000002 < 0
 & fa_6e_uab_a < 0 & fa_6e_uab_b < 0 & fa_6e_uab_c < 0) then r_401k = -1;
  else if (fa_6b = 1 & fa_6e_trunc in(-1, -2) & fa_6e_sr000001 < 0 & fa_6e_sr000002 < 0
  & fa_6e_uab_a < 0 & fa_6e_uab_b < 0 & fa_6e_uab_c < 0) then r_401k = fa_6e_trunc;
   else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 = fa_6e_sr000001) then
    r_401k = (r_401k + fa_6e_sr000001);
     else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 > fa_6e_sr000001) then
     r_401k = (r_401k + (((fa_6e_sr000002 - fa_6e_sr000001)/2) + fa_6e_sr000001));
      else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 < fa_6e_sr000001) then
      r_401k = (r_401k + (((fa_6e_sr000001 - fa_6e_sr000002)/2) + fa_6e_sr000002));
       else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_b = 0) then r_401k = (r_401k + quartile1);
        else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_b = 1) then r_401k = (r_401k + quartile2);
         else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_c = 0) then r_401k = (r_401k + quartile3);
          else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_c = 1) then r_401k = (r_401k + 70000);
           else if (fa_6e_uab_a in(-1, -2) | fa_6e_uab_b in(-1, -2) | fa_6e_uab_c in(-1, -2)) then r_401k = -3;

/********************************************/
/* A401K component - sp_401k           */
/********************************************/

if (fa_7 = 1 & fa_7c_trunc >= 0) then sp_401k = (sp_401k + fa_7c_trunc);
 else if (fa_7 = 1 & fa_7c_ref_1 = 1 & fa_7c_sr000001 < 0 & fa_7c_sr000002 < 0
 & fa_7c_uab_a < 0 & fa_7c_uab_b < 0 & fa_7c_uab_c < 0) then sp_401k = -1;
  else if (fa_7 = 1 & fa_7c_trunc in(-1, -2) & fa_7c_sr000001 < 0 & fa_7c_sr000002 < 0
  & fa_7c_uab_a < 0 & fa_7c_uab_b < 0 & fa_7c_uab_c < 0) then sp_401k = fa_7c_trunc;
   else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002 >= 0 & fa_7c_sr000002 = fa_7c_sr000001) then
   sp_401k = (sp_401k + fa_7c_sr000001);
    else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002 >= 0 & fa_7c_sr000002 > fa_7c_sr000001) then
    sp_401k = (sp_401k + (((fa_7c_sr000002 - fa_7c_sr000001)/2) + fa_7c_sr000001));
     else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002 >= 0 & fa_7c_sr000002 < fa_7c_sr000001) then
     sp_401k = (sp_401k + (((fa_7c_sr000001 - fa_7c_sr000002)/2) + fa_7c_sr000002));
      else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_b = 0) then sp_401k = (sp_401k + quartile1);
       else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_b = 1) then sp_401k = (sp_401k + quartile2);
        else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_c = 0) then sp_401k = (sp_401k + quartile3);
         else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_c = 1) then sp_401k = (sp_401k + 75000);
          else if (fa_7c_uab_a in(-1, -2) | fa_7c_uab_b in(-1, -2) | fa_7c_uab_c in(-1, -2)) then sp_401k = -3;

/*******************************/
/* Add components A401K        */
/*******************************/

if (r_401k >= 0) then a401kc = (a401kc + r_401k);
if (sp_401k >= 0) then a401kc = (a401kc + sp_401k);
if (r_401k in(-1, -2, -3)) then a401kc = -3;
else if (sp_401k in(-1, -2, -3)) then a401kc = -3;

/****************************/
/* Compute CDEBT            */
/****************************/

/**************************************************/
/* CDEBT Component - amtowe_assetpoorcars1        */
/**************************************************/

if (sc_12b_01 >= 0) then amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + sc_12b_01);
 else if (sc_12b_01 = 1 & sc_12b_ref_1a_01 = 1 & sc_12b_sr000001_01 < 0 & sc_12b_sr000002_01 < 0
 & sc_12b_uab_a_01 < 0) then amtowe_assetpoorcars1 = -1;
 else if (sc_12b_01 in(-1, -2) & sc_12b_sr000001_01 < 0 & sc_12b_sr000002_01 < 0
 & sc_12b_uab_a_01 < 0) then amtowe_assetpoorcars1 = sc_12b_01;
  else if (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 >= 0 & sc_12b_sr000002_01 = sc_12b_sr000001_01) then
  amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + sc_12b_sr000001_01);
   else if (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 >= 0 & sc_12b_sr000002_01 > sc_12b_sr000001_01) then
   amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + (((sc_12b_sr000002_01 - sc_12b_sr000001_01)/2) + sc_12b_sr000001_01));
    else if (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 >= 0 & sc_12b_sr000002_01 < sc_12b_sr000001_01) then
    amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + (((sc_12b_sr000001_01 - sc_12b_sr000002_01)/2) + sc_12b_sr000002_01));
     else if (sc_12b_uab_a_01 in(-1, -2)) then amtowe_assetpoorcars1 = -3;

/**************************************************/
/* CDEBT Component - amtowe_assetpoorcars2        */
/**************************************************/

if (sc_12b_02 >= 0) then amtowe_assetpoorcars2 = (amtowe_assetpoorcars2 + sc_12b_02);
 else if (sc_12b_02 = 1 & sc_12b_ref_1a_02 = 1) then amtowe_assetpoorcars2 = -1;
  else if (sc_12b_02 in(-1, -2)) then amtowe_assetpoorcars2 = sc_12b_02;

/**************************************************/
/* CDEBT Component - amtowe_assetpoorcars3        */
/**************************************************/

if (sc_12b_03 >= 0) then amtowe_assetpoorcars3 = (amtowe_assetpoorcars3 + sc_12b_03);
 else if (sc_12b_03 = 1 & sc_12b_ref_1a_03 = 1) then amtowe_assetpoorcars3 = -1;
 else if (sc_12b_03 in(-1, -2)) then amtowe_assetpoorcars3 = sc_12b_03;

/**************************************************/
/* CDEBT Component - amountowe_vehicles1          */
/**************************************************/

if (nfa_4f_trunc_01 >= 0) then amountowe_vehicles1 = (amountowe_vehicles1 + nfa_4f_trunc_01);
 else if (nfa_4f_trunc_01 in(-1, -2) & nfa_4f_sr000001_01 < 0 & nfa_4f_sr000002_01 < 0
 & nfa_4f_uab_a_01 < 0 & nfa_4f_uab_b_01 < 0 & nfa_4f_uab_c_01 < 0) then amountowe_vehicles1 = nfa_4f_trunc_01;
   else if (nfa_4f_sr000001_01 >= 0 & nfa_4f_sr000002_01 >= 0 & nfa_4f_sr000002_01 = nfa_4f_sr000001_01) then
   amountowe_vehicles1 = (amountowe_vehicles1 + nfa_4f_sr000001_01);
    else if (nfa_4f_sr000001_01 >= 0 & nfa_4f_sr000002_01 >= 0 & nfa_4f_sr000002_01 > nfa_4f_sr000001_01) then
    amountowe_vehicles1 = (amountowe_vehicles1 + (((nfa_4f_sr000002_01 - nfa_4f_sr000001_01)/2) + nfa_4f_sr000001_01));
     else if (nfa_4f_sr000001_01 >= 0 & nfa_4f_sr000002_01 >= 0 & nfa_4f_sr000002_01 < nfa_4f_sr000001_01) then
     amountowe_vehicles1 = (amountowe_vehicles1 + (((nfa_4f_sr000001_01 - nfa_4f_sr000002_01)/2) + nfa_4f_sr000002_01));
      else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_b_01 = 0) then amountowe_vehicles1 = (amountowe_vehicles1 + quartile1);
       else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_b_01 = 1) then amountowe_vehicles1 = (amountowe_vehicles1 + quartile2);
        else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_c_01 = 0) then amountowe_vehicles1 = (amountowe_vehicles1 + quartile3);
         else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_c_01 = 1) then amountowe_vehicles1 = (amountowe_vehicles1 + 36000);
          else if (nfa_4f_uab_a_01 in(-1, -2) | nfa_4f_uab_b_01 in(-1, -2) | nfa_4f_uab_c_01 in(-1, -2)) then amtowe_vehicles1 = -3;

/**************************************************/
/* CDEBT Component - amountowe_vehicles2          */
/**************************************************/

if (nfa_4f_trunc_02 >= 0) then amountowe_vehicles2 = (amountowe_vehicles2 + nfa_4f_trunc_02);
 else if (nfa_4f_trunc_02 in(-1, -2) & nfa_4f_sr000001_02 < 0 & nfa_4f_sr000002_02 < 0
 & nfa_4f_uab_a_02 < 0 & nfa_4f_uab_b_02 < 0 & nfa_4f_uab_c_02 < 0) then amountowe_vehicles2 = nfa_4f_trunc_02;
   else if (nfa_4f_sr000001_02 >= 0 & nfa_4f_sr000002_02 >= 0 & nfa_4f_sr000002_02 = nfa_4f_sr000001_02) then
   amountowe_vehicles2 = (amountowe_vehicles2 + nfa_4f_sr000001_02);
    else if (nfa_4f_sr000001_02 >= 0 & nfa_4f_sr000002_02 >= 0 & nfa_4f_sr000002_02 > nfa_4f_sr000001_02) then
    amountowe_vehicles2 = (amountowe_vehicles2 + (((nfa_4f_sr000002_02 - nfa_4f_sr000001_02)/2) + nfa_4f_sr000001_02));
     else if (nfa_4f_sr000001_02 >= 0 & nfa_4f_sr000002_02 >= 0 & nfa_4f_sr000002_02 < nfa_4f_sr000001_02) then
     amountowe_vehicles2 = (amountowe_vehicles2 + (((nfa_4f_sr000001_02 - nfa_4f_sr000002_02)/2) + nfa_4f_sr000002_02));
      else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_b_02 = 0) then amountowe_vehicles2 = (amountowe_vehicles2 + quartile1);
       else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_b_02 = 1) then amountowe_vehicles2 = (amountowe_vehicles2 + quartile2);
        else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_c_02 = 0) then amountowe_vehicles2 = (amountowe_vehicles2 + quartile3);
         else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_c_02 = 1) then amountowe_vehicles2 = (amountowe_vehicles2 + 35000);
          else if (nfa_4f_uab_a_02 in(-1, -2) | nfa_4f_uab_b_02 in(-1, -2) | nfa_4f_uab_c_02 in(-1, -2)) then amtowe_vehicles2 = -3;

/**************************************************/
/* CDEBT Component - amountowe_vehicles3          */
/**************************************************/

if (nfa_4f_trunc_03 >= 0) then amountowe_vehicles3 = (amountowe_vehicles3 + nfa_4f_trunc_03);
 else if (nfa_4f_trunc_03 in(-1, -2) & nfa_4f_sr000001_03 < 0 & nfa_4f_sr000002_03 < 0
 & nfa_4f_uab_a_03 < 0 & nfa_4f_uab_b_03 < 0 & nfa_4f_uab_c_03 < 0) then amountowe_vehicles3 = nfa_4f_trunc_03;
   else if (nfa_4f_sr000001_03 >= 0 & nfa_4f_sr000002_03 >= 0 & nfa_4f_sr000002_03 = nfa_4f_sr000001_03) then
   amountowe_vehicles3 = (amountowe_vehicles3 + nfa_4f_sr000001_03);
    else if (nfa_4f_sr000001_03 >= 0 & nfa_4f_sr000002_03 >= 0 & nfa_4f_sr000002_03 > nfa_4f_sr000001_03) then
    amountowe_vehicles3 = (amountowe_vehicles3 + (((nfa_4f_sr000002_03 - nfa_4f_sr000001_03)/2) + nfa_4f_sr000001_03));
     else if (nfa_4f_sr000001_03 >= 0 & nfa_4f_sr000002_03 >= 0 & nfa_4f_sr000002_03 < nfa_4f_sr000001_03) then
     amountowe_vehicles3 = (amountowe_vehicles3 + (((nfa_4f_sr000001_03 - nfa_4f_sr000002_03)/2) + nfa_4f_sr000002_03));
      else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_b_03 = 0) then amountowe_vehicles3 = (amountowe_vehicles3 + quartile1);
       else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_b_03 = 1) then amountowe_vehicles3 = (amountowe_vehicles3 + quartile2);
        else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_c_03 = 0) then amountowe_vehicles3 = (amountowe_vehicles3 + quartile3);
         else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_c_03 = 1) then amountowe_vehicles3 = (amountowe_vehicles3 + 40000);
          else if (nfa_4f_uab_a_03 in(-1, -2) | nfa_4f_uab_b_03 in(-1, -2) | nfa_4f_uab_c_03 in(-1, -2)) then amtowe_vehicles3 = -3;

/**************************************************/
/* CDEBT Component - amountowe_vehicles4          */
/**************************************************/

if (nfa_4f_trunc_04 >= 0) then amountowe_vehicles4 = (amountowe_vehicles4 + nfa_4f_trunc_04);
 else if (nfa_4f_trunc_04 in(-1, -2) & nfa_4f_sr000001_04 < 0 & nfa_4f_sr000002_04 < 0
 & nfa_4f_uab_a_04 < 0) then amountowe_vehicles4 = nfa_4f_trunc_04;
  else if (nfa_4f_sr000001_04 >= 0 & nfa_4f_sr000002_04 >= 0 & nfa_4f_sr000002_04 = nfa_4f_sr000001_04) then
  amountowe_vehicles4 = (amountowe_vehicles4 + nfa_4f_sr000001_04);
   else if (nfa_4f_sr000001_04 >= 0 & nfa_4f_sr000002_04 >= 0 & nfa_4f_sr000002_04 > nfa_4f_sr000001_04) then
   amountowe_vehicles4 = (amountowe_vehicles4 + (((nfa_4f_sr000002_04 - nfa_4f_sr000001_04)/2) + nfa_4f_sr000001_04));
    else if (nfa_4f_sr000001_04 >= 0 & nfa_4f_sr000002_04 >= 0 & nfa_4f_sr000002_04 < nfa_4f_sr000001_04) then
    amountowe_vehicles4 = (amountowe_vehicles4 + (((nfa_4f_sr000001_04 - nfa_4f_sr000002_04)/2) + nfa_4f_sr000002_04));
     else if (nfa_4f_uab_a_04 in(-1, -2)) then amtowe_vehicles4 = -3;

/**************************************************/
/* CDEBT Component - amountowe_vehicles5          */
/**************************************************/

if (nfa_4f_05 >= 0) then amountowe_vehicles5 = (amountowe_vehicles5 + nfa_4f_05);
 else if (nfa_4f_05 in(-1, -2) & nfa_4f_uab_a_05 < 0) then amountowe_vehicles5 = nfa_4f_05;
  else if (nfa_4f_uab_a_05 in(-1, -2)) then amtowe_vehicles5 = -3;

/**************************************************/
/* CDEBT Component - amountowe_vehicles6          */
/**************************************************/

if (nfa_4f_trunc_06 >= 0) then amountowe_vehicles6 = (amountowe_vehicles6 + nfa_4f_trunc_06);
 else if (nfa_4f_trunc_06 in(-1, -2)) then amountowe_vehicles6 = nfa_4f_trunc_06;

/**************************************************/
/* CDEBT Component - amtowe_othervehicles         */
/**************************************************/

if (nfa_5 = 1 & nfa_5b_trunc >= 0) then amtowe_othervehicles = (amtowe_othervehicles + nfa_5b_trunc);
 else if (nfa_5 = 1 & nfa_5b_trunc in(-1, -2) & nfa_5b_sr000001 < 0 & nfa_5b_sr000002 < 0
 & nfa_5b_uab_a < 0 & nfa_5b_uab_b < 0 & nfa_5b_uab_c < 0) then amtowe_othervehicles = nfa_5b_trunc;
  else if (nfa_5b_sr000001 >= 0 & nfa_5b_sr000002 >= 0 & nfa_5b_sr000002 = nfa_5b_sr000001) then
  amtowe_othervehicles = (amtowe_othervehicles + nfa_5b_sr000001);
   else if (nfa_5b_sr000001 >= 0 & nfa_5b_sr000002 >= 0 & nfa_5b_sr000002 > nfa_5b_sr000001) then
   amtowe_othervehicles = (amtowe_othervehicles + (((nfa_5b_sr000002 - nfa_5b_sr000001)/2) + nfa_5b_sr000001));
    else if (nfa_5b_sr000001 >= 0 & nfa_5b_sr000002 >= 0 & nfa_5b_sr000002 < nfa_5b_sr000001) then
    amtowe_othervehicles = (amtowe_othervehicles + (((nfa_5b_sr000001 - nfa_5b_sr000002)/2) + nfa_5b_sr000002));
     else if (nfa_5b_trunc in(-1, -2, -4) & nfa_5b_uab_b = 0) then amtowe_othervehicles = (amtowe_othervehicles + quartile1);
      else if (nfa_5b_trunc in(-1, -2, -4) & nfa_5b_uab_b = 1) then amtowe_othervehicles = (amtowe_othervehicles + quartile2);
       else if (nfa_5b_trunc in(-1, -2, -4) & nfa_5b_uab_c = 0) then amtowe_othervehicles = (amtowe_othervehicles + quartile3);
        else if (nfa_5b_trunc in(-1, -2, -4) & nfa_5b_uab_c = 1) then amtowe_othervehicles = (amtowe_othervehicles + 65000);
         else if (nfa_5b_uab_a in(-1, -2) | nfa_5b_uab_b in(-1, -2) | nfa_5b_uab_c in(-1, -2)) then amtowe_othervehicles = -3;

/*******************************/
/* Add components CDEBT        */
/*******************************/

if (amtowe_assetpoorcars1 >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars1);
if (amtowe_assetpoorcars2 >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars2);
if (amtowe_assetpoorcars3 >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars3);
if (amountowe_vehicles1 >= 0) then cdebtc = (cdebtc + amountowe_vehicles1);
if (amountowe_vehicles2 >= 0) then cdebtc = (cdebtc + amountowe_vehicles2);
if (amountowe_vehicles3 >= 0) then cdebtc = (cdebtc + amountowe_vehicles3);
if (amountowe_vehicles4 >= 0) then cdebtc = (cdebtc + amountowe_vehicles4);
if (amountowe_vehicles5 >= 0) then cdebtc = (cdebtc + amountowe_vehicles5);
if (amountowe_vehicles6 >= 0) then cdebtc = (cdebtc + amountowe_vehicles6);
if (amtowe_othervehicles >= 0) then cdebtc = (cdebtc + amtowe_othervehicles);

if (amtowe_assetpoorcars1 in(-1, -2, -3)) then cdebtc = -3;
else if (amtowe_assetpoorcars2 in(-1, -2, -3)) then cdebtc = -3;
else if (amtowe_assetpoorcars3 in(-1, -2, -3)) then cdebtc = -3;
else if (amountowe_vehicles1 in(-1, -2, -3)) then cdebtc = -3;
else if (amountowe_vehicles2 in(-1, -2, -3)) then cdebtc = -3;
else if (amountowe_vehicles3 in(-1, -2, -3)) then cdebtc = -3;
else if (amountowe_vehicles4 in(-1, -2, -3)) then cdebtc = -3;
else if (amountowe_vehicles5 in(-1, -2, -3)) then cdebtc = -3;
else if (amountowe_vehicles6 in(-1, -2, -3)) then cdebtc = -3;
else if (amtowe_othervehicles in(-1, -2, -3)) then cdebtc = -3;

/****************************/
/* Compute CAR              */
/****************************/
/**************************************************/
/* CAR Component - mktval_assetpoorcars1          */
/**************************************************/

if (sc_12a_01 >= 0) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + sc_12a_01);
 else if (sc_12a_ref_1a_01 = 1 & sc_12a_sr000001_01 < 0 & sc_12a_sr000002_01 < 0
 & sc_12a_uab_a_01 < 0 & sc_12a_uab_b_01 < 0) then mktval_assetpoorcars1 = -1;
  else if (sc_12a_01 in(-1, -2) & sc_12a_sr000001_01 < 0 & sc_12a_sr000002_01 < 0
  & sc_12a_uab_a_01 < 0 & sc_12a_uab_b_01 < 0) then mktval_assetpoorcars1 = sc_12a_01;
    else if (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 >= 0 & sc_12a_sr000002_01 = sc_12a_sr000001_01) then
    mktval_assetpoorcars1 = (mktval_assetpoorcars1 + sc_12a_sr000001_01);
     else if (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 >= 0 & sc_12a_sr000002_01 > sc_12a_sr000001_01) then
     mktval_assetpoorcars1 = (mktval_assetpoorcars1 + (((sc_12a_sr000002_01 - sc_12a_sr000001_01)/2) + sc_12a_sr000001_01));
      else if (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 >= 0 & sc_12a_sr000002_01 < sc_12a_sr000001_01) then
      mktval_assetpoorcars1 = (mktval_assetpoorcars1 + (((sc_12a_sr000001_01 - sc_12a_sr000002_01)/2) + sc_12a_sr000001_02));
       else if (sc_12a_01 in(-1, -2, -4) & sc_12a_uab_b_01 = 0) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + quartile1);
        else if (sc_12a_01 in(-1, -2, -4) & sc_12a_uab_b_01 = 1) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + quartile2);
         else if (sc_12a_uab_a_01 in(-1, -2) | sc_12a_uab_b_01 in(-1, -2)) then mktval_assetpoorcars1 = -3;

/**************************************************/
/* CAR Component - mktval_assetpoorcars2          */
/**************************************************/

if (sc_12a_02 >= 0) then mktval_assetpoorcars2 = (mktval_assetpoorcars2 + sc_12a_02);
 else if (sc_12a_02 = 1 & sc_12a_ref_1a_02 = 1 & sc_12a_sr000001_02 < 0 & sc_12a_sr000002_02 < 0
 & sc_12a_uab_a_02 < 0) then mktval_assetpoorcars2 = -1;
 else if (sc_12a_02 in(-1, -2) & sc_12a_sr000001_02 < 0 & sc_12a_sr000002_02 < 0
 & sc_12a_uab_a_02 < 0) then mktval_assetpoorcars2 = sc_12a_02;
   else if (sc_12a_sr000001_02 >= 0 & sc_12a_sr000002_02 >= 0 & sc_12a_sr000002_02 = sc_12a_sr000001_02) then
   mktval_assetpoorcars2 = (mktval_assetpoorcars2 + sc_12a_sr000001_02);
    else if (sc_12a_sr000001_02 >= 0 & sc_12a_sr000002_02 >= 0 & sc_12a_sr000002_02 > sc_12a_sr000001_02) then
    mktval_assetpoorcars2 = (mktval_assetpoorcars2 + (((sc_12a_sr000002_02 - sc_12a_sr000001_02)/2) + sc_12a_sr000001_02));
     else if (sc_12a_sr000001_02 >= 0 & sc_12a_sr000002_02 >= 0 & sc_12a_sr000002_02 < sc_12a_sr000001_02) then
     mktval_assetpoorcars2 = (mktval_assetpoorcars2 + (((sc_12a_sr000001_02 - sc_12a_sr000002_02)/2) + sc_12a_sr000002_02));
      else if (sc_12a_uab_a_02 in(-1, -2)) then mktval_assetpoorcars2 = -3;

/**************************************************/
/* CAR Component - mktval_assetpoorcars3          */
/**************************************************/

if (sc_12a_03 >= 0) then mktval_assetpoorcars3 = (mktval_assetpoorcars3 + sc_12a_03);
 else if (sc_12a_03 = 1 & sc_12a_ref_1a_03 = 1) then mktval_assetpoorcars3 = -1;
  else if (sc_12a_03 in(-1, -2)) then mktval_assetpoorcars3 = sc_12a_03;

/**************************************************/
/* CAR Component - marketvalue_vehicles1          */
/**************************************************/

if (nfa_4c_trunc_01 >= 0) then marketvalue_vehicles1 = (marketvalue_vehicles1 + nfa_4c_trunc_01);
 else if (nfa_4c_trunc_01 in(-1, -2) & nfa_4c_sr000001_01 < 0 & nfa_4c_sr000002_01 < 0
 & nfa_4c_uab_a_01 < 0 & nfa_4c_uab_b_01 < 0 & nfa_4c_uab_c_01 < 0) then marketvalue_vehicles1 = nfa_4c_trunc_01;
   else if (nfa_4c_sr000001_01 >= 0 & nfa_4c_sr000002_01 >= 0 & nfa_4c_sr000002_01 = nfa_4c_sr000001_01) then
   marketvalue_vehicles1 = (marketvalue_vehicles1 + nfa_4c_sr000001_01);
    else if (nfa_4c_sr000001_01 >= 0 & nfa_4c_sr000002_01 >= 0 & nfa_4c_sr000002_01 > nfa_4c_sr000001_01) then
    marketvalue_vehicles1 = (marketvalue_vehicles1 + (((nfa_4c_sr000002_01 - nfa_4c_sr000001_01)/2) + nfa_4c_sr000001_01));
     else if (nfa_4c_sr000001_01 >= 0 & nfa_4c_sr000002_01 >= 0 & nfa_4c_sr000002_01 < nfa_4c_sr000001_01) then
     marketvalue_vehicles1 = (marketvalue_vehicles1 + (((nfa_4c_sr000001_01 - nfa_4c_sr000002_01)/2) + nfa_4c_sr000002_01));
      else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_b_01 = 0) then marketvalue_vehicles1 = (marketvalue_vehicles1 + quartile1);
       else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_b_01 = 1) then marketvalue_vehicles1 = (marketvalue_vehicles1 + quartile2);
        else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_c_01 = 0) then marketvalue_vehicles1 = (marketvalue_vehicles1 + quartile3);
         else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_c_01 = 1) then marketvalue_vehicles1 = (marketvalue_vehicles1 + 40000);
          else if (nfa_4c_uab_a_01 in(-1, -2) | nfa_4c_uab_b_01 in(-1, -2) | nfa_4c_uab_c_01 in(-1, -2)) then marketvalue_vehicles1 = -3;

/**************************************************/
/* CAR Component - marketvalue_vehicles2          */
/**************************************************/

if (nfa_4c_trunc_02 >= 0) then marketvalue_vehicles2 = (marketvalue_vehicles2 + nfa_4c_trunc_02);
 else if (nfa_4c_trunc_02 in(-1, -2) & nfa_4c_sr000001_02 < 0 & nfa_4c_sr000002_02 < 0
 & nfa_4c_uab_a_02 < 0 & nfa_4c_uab_b_02 < 0 & nfa_4c_uab_c_02 < 0) then marketvalue_vehicles2 = nfa_4c_trunc_02;
   else if (nfa_4c_sr000001_02 >= 0 & nfa_4c_sr000002_02 >= 0 & nfa_4c_sr000002_02 = nfa_4c_sr000001_02) then
   marketvalue_vehicles2 = (marketvalue_vehicles2 + nfa_4c_sr000001_02);
    else if (nfa_4c_sr000001_02 >= 0 & nfa_4c_sr000002_02 >= 0 & nfa_4c_sr000002_02 > nfa_4c_sr000001_02) then
    marketvalue_vehicles2 = (marketvalue_vehicles2 + (((nfa_4c_sr000002_02 - nfa_4c_sr000001_02)/2) + nfa_4c_sr000001_02));
     else if (nfa_4c_sr000001_02 >= 0 & nfa_4c_sr000002_02 >= 0 & nfa_4c_sr000002_02 < nfa_4c_sr000001_02) then
     marketvalue_vehicles2 = (marketvalue_vehicles2 + (((nfa_4c_sr000001_02 - nfa_4c_sr000002_02)/2) + nfa_4c_sr000002_02));
      else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_b_02 = 0) then marketvalue_vehicles2 = (marketvalue_vehicles2 + quartile1);
       else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_b_02 = 1) then marketvalue_vehicles2 = (marketvalue_vehicles2 + quartile2);
        else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_c_02 = 0) then marketvalue_vehicles2 = (marketvalue_vehicles2 + quartile3);
         else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_c_02 = 1) then marketvalue_vehicles2 = (marketvalue_vehicles2 + 36000);
          else if (nfa_4c_uab_a_02 in(-1, -2) | nfa_4c_uab_b_02 in(-1, -2) | nfa_4c_uab_c_02 in(-1, -2)) then marketvalue_vehicles2 = -3;

/**************************************************/
/* CAR Component - marketvalue_vehicles3          */
/**************************************************/

if (nfa_4c_trunc_03 >= 0) then marketvalue_vehicles3 = (marketvalue_vehicles3 + nfa_4c_trunc_03);
 else if (nfa_4c_trunc_03 in(-1, -2) & nfa_4c_sr000001_03 < 0 & nfa_4c_sr000002_03 < 0
 & nfa_4c_uab_a_03 < 0 & nfa_4c_uab_b_03 < 0 & nfa_4c_uab_c_03 < 0) then marketvalue_vehicles3 = nfa_4c_trunc_03;
   else if (nfa_4c_sr000001_03 >= 0 & nfa_4c_sr000002_03 >= 0 & nfa_4c_sr000002_03 = nfa_4c_sr000001_03) then
   marketvalue_vehicles3 = (marketvalue_vehicles3 + nfa_4c_sr000001_03);
    else if (nfa_4c_sr000001_03 >= 0 & nfa_4c_sr000002_03 >= 0 & nfa_4c_sr000002_03 > nfa_4c_sr000001_03) then
    marketvalue_vehicles3 = (marketvalue_vehicles3 + (((nfa_4c_sr000002_03 - nfa_4c_sr000001_03)/2) + nfa_4c_sr000001_03));
     else if (nfa_4c_sr000001_03 >= 0 & nfa_4c_sr000002_03 >= 0 & nfa_4c_sr000002_03 < nfa_4c_sr000001_03) then
     marketvalue_vehicles3 = (marketvalue_vehicles3 + (((nfa_4c_sr000001_03 - nfa_4c_sr000002_03)/2) + nfa_4c_sr000002_03));
      else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_b_03 = 0) then marketvalue_vehicles3 = (marketvalue_vehicles3 + quartile1);
       else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_b_03 = 1) then marketvalue_vehicles3 = (marketvalue_vehicles3 + quartile2);
        else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_c_03 = 0) then marketvalue_vehicles3 = (marketvalue_vehicles3 + quartile3);
         else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_c_03 = 1) then marketvalue_vehicles3 = (marketvalue_vehicles3 + 40000);
          else if (nfa_4c_uab_a_03 in(-1, -2) | nfa_4c_uab_b_03 in(-1, -2) | nfa_4c_uab_c_03 in(-1, -2)) then marketvalue_vehicles3 = -3;

/**************************************************/
/* CAR Component - marketvalue_vehicles4          */
/**************************************************/

if (nfa_4c_trunc_04 >= 0) then marketvalue_vehicles4 = (marketvalue_vehicles4 + nfa_4c_trunc_04);
 else if (nfa_4c_trunc_04 in(-1, -2) & nfa_4c_sr000001_04 < 0 & nfa_4c_sr000002_04 < 0
 & nfa_4c_uab_a_04 < 0 & nfa_4c_uab_b_04 < 0) then marketvalue_vehicles4 = nfa_4c_trunc_04;
   else if (nfa_4c_sr000001_04 >= 0 & nfa_4c_sr000002_04 >= 0 & nfa_4c_sr000002_04 = nfa_4c_sr000001_04) then
   marketvalue_vehicles4 = (marketvalue_vehicles4 + nfa_4c_sr000001_04);
    else if (nfa_4c_sr000001_04 >= 0 & nfa_4c_sr000002_04 >= 0 & nfa_4c_sr000002_04 > nfa_4c_sr000001_04) then
    marketvalue_vehicles4 = (marketvalue_vehicles4 + (((nfa_4c_sr000002_04 - nfa_4c_sr000001_04)/2) + nfa_4c_sr000001_04));
     else if (nfa_4c_sr000001_04 >= 0 & nfa_4c_sr000002_04 >= 0 & nfa_4c_sr000002_04 < nfa_4c_sr000001_04) then
     marketvalue_vehicles4 = (marketvalue_vehicles4 + (((nfa_4c_sr000001_04 - nfa_4c_sr000002_04)/2) + nfa_4c_sr000002_04));
      else if (nfa_4c_trunc_04 in(-1, -2, -4) & nfa_4c_uab_b_04 = 0) then marketvalue_vehicles4 = (marketvalue_vehicles4 + quartile1);
       else if (nfa_4c_trunc_04 in(-1, -2, -4) & nfa_4c_uab_b_04 = 1) then marketvalue_vehicles4 = (marketvalue_vehicles4 + quartile2);
        else if (nfa_4c_uab_a_04 in(-1, -2) | nfa_4c_uab_b_04 in(-1, -2)) then marketvalue_vehicles4 = -3;

/**************************************************/
/* CAR Component - marketvalue_vehicles5          */
/**************************************************/

if (nfa_4c_trunc_05 >= 0) then marketvalue_vehicles5 = (marketvalue_vehicles5 + nfa_4c_trunc_05);
 else if (nfa_4c_trunc_05 in(-1, -2) & nfa_4c_sr000001_05 < 0 & nfa_4c_sr000002_05 < 0
 & nfa_4c_uab_a_05 < 0 & nfa_4c_uab_b_05 < 0) then marketvalue_vehicles5 = nfa_4c_trunc_05;
   else if (nfa_4c_sr000001_05 >= 0 & nfa_4c_sr000002_05 >= 0 & nfa_4c_sr000002_05 = nfa_4c_sr000001_05) then
   marketvalue_vehicles5 = (marketvalue_vehicles5 + nfa_4c_sr000001_05);
    else if (nfa_4c_sr000001_05 >= 0 & nfa_4c_sr000002_05 >= 0 & nfa_4c_sr000002_05 > nfa_4c_sr000001_05) then
    marketvalue_vehicles5 = (marketvalue_vehicles5 + (((nfa_4c_sr000002_05 - nfa_4c_sr000001_05)/2) + nfa_4c_sr000001_05));
     else if (nfa_4c_sr000001_05 >= 0 & nfa_4c_sr000002_05 >= 0 & nfa_4c_sr000002_05 < nfa_4c_sr000001_05) then
     marketvalue_vehicles5 = (marketvalue_vehicles5 + (((nfa_4c_sr000001_05 - nfa_4c_sr000002_05)/2) + nfa_4c_sr000002_05));
      else if (nfa_4c_trunc_05 in(-1, -2, -4) & nfa_4c_uab_b_05 = 0) then marketvalue_vehicles5 = (marketvalue_vehicles5 + quartile1);
       else if (nfa_4c_trunc_05 in(-1, -2, -4) & nfa_4c_uab_b_05 = 1) then marketvalue_vehicles5 = (marketvalue_vehicles5 + quartile2);
        else if (nfa_4c_uab_a_05 in(-1, -2) | nfa_4c_uab_b_05 in(-1, -2)) then marketvalue_vehicles5 = -3;

/**************************************************/
/* CAR Component - marketvalue_vehicles6          */
/**************************************************/

if (nfa_4c_06 >= 0) then marketvalue_vehicles6 = (marketvalue_vehicles6 + nfa_4c_06);
 else if (nfa_4c_06 in(-1, -2) & nfa_4c_sr000001_06 < 0 & nfa_4c_sr000002_06 < 0
 & nfa_4c_uab_a_06 < 0 & nfa_4c_uab_b_06 < 0) then marketvalue_vehicles6 = nfa_4c_06;
  else if (nfa_4c_sr000001_06 >= 0 & nfa_4c_sr000002_06 >= 0 & nfa_4c_sr000002_06 = nfa_4c_sr000001_06) then
  marketvalue_vehicles6 = (marketvalue_vehicles6 + nfa_4c_sr000001_06);
   else if (nfa_4c_sr000001_06 >= 0 & nfa_4c_sr000002_06 >= 0 & nfa_4c_sr000002_06 > nfa_4c_sr000001_06) then
   marketvalue_vehicles6 = (marketvalue_vehicles6 + (((nfa_4c_sr000002_06 - nfa_4c_sr000001_06)/2) + nfa_4c_sr000001_06));
    else if (nfa_4c_sr000001_06 >= 0 & nfa_4c_sr000002_06 >= 0 & nfa_4c_sr000002_06 < nfa_4c_sr000001_06) then
    marketvalue_vehicles6 = (marketvalue_vehicles6 + (((nfa_4c_sr000001_06 - nfa_4c_sr000002_06)/2) + nfa_4c_sr000002_06));
     else if (nfa_4c_06 in(-1, -2, -4) & nfa_4c_uab_b_06 = 0) then marketvalue_vehicles6 = (marketvalue_vehicles6 + quartile1);
      else if (nfa_4c_06 in(-1, -2, -4) & nfa_4c_uab_b_06 = 1) then marketvalue_vehicles6 = (marketvalue_vehicles6 + quartile2);
       else if (nfa_4c_uab_a_06 in(-1, -2) | nfa_4c_uab_b_06 in(-1, -2)) then marketvalue_vehicles6 = -3;

/**************************************************/
/* CAR Component - marketvalue_vehicles7          */
/**************************************************/

if (nfa_4c_07 >= 0) then marketvalue_vehicles7 = (marketvalue_vehicles7 + nfa_4c_07);
 else if (nfa_4c_07 in(-1, -2) & nfa_4c_sr000001_07 < 0 & nfa_4c_sr000002_07 < 0
 & nfa_4c_uab_a_07 < 0 & nfa_4c_uab_b_07 < 0) then marketvalue_vehicles7 = nfa_4c_07;
  else if (nfa_4c_sr000001_07 >= 0 & nfa_4c_sr000002_07 >= 0 & nfa_4c_sr000002_07 = nfa_4c_sr000001_07) then
  marketvalue_vehicles7 = (marketvalue_vehicles7 + nfa_4c_sr000001_07);
   else if (nfa_4c_sr000001_07 >= 0 & nfa_4c_sr000002_07 >= 0 & nfa_4c_sr000002_07 > nfa_4c_sr000001_07) then
   marketvalue_vehicles7 = (marketvalue_vehicles7 + (((nfa_4c_sr000002_07 - nfa_4c_sr000001_07)/2) + nfa_4c_sr000001_07));
    else if (nfa_4c_sr000001_07 >= 0 & nfa_4c_sr000002_07 >= 0 & nfa_4c_sr000002_07 < nfa_4c_sr000001_07) then
    marketvalue_vehicles7 = (marketvalue_vehicles7 + (((nfa_4c_sr000001_07 - nfa_4c_sr000002_07)/2) + nfa_4c_sr000002_07));
     else if (nfa_4c_07 in(-1, -2, -4) & nfa_4c_uab_b_07 = 0) then marketvalue_vehicles7 = (marketvalue_vehicles7 + quartile1);
      else if (nfa_4c_07 in(-1, -2, -4) & nfa_4c_uab_b_07 = 1) then marketvalue_vehicles7 = (marketvalue_vehicles7 + quartile2);
       else if (nfa_4c_uab_a_07 in(-1, -2) | nfa_4c_uab_b_07 in(-1, -2)) then marketvalue_vehicles7 = -3;

/**************************************************/
/* CAR Component - marketvalue_vehicles8          */
/**************************************************/

if (nfa_4c_08 >= 0) then marketvalue_vehicles8 = (marketvalue_vehicles8 + nfa_4c_08);
 else if (nfa_4c_08 in(-1, -2) & nfa_4c_sr000001_08 < 0 & nfa_4c_sr000002_08 < 0
 & nfa_4c_uab_a_08 < 0 & nfa_4c_uab_b_08 < 0) then marketvalue_vehicles8 = nfa_4c_08;
  else if (nfa_4c_sr000001_08 >= 0 & nfa_4c_sr000002_08 >= 0 & nfa_4c_sr000002_08 = nfa_4c_sr000001_08) then
  marketvalue_vehicles8 = (marketvalue_vehicles8 + nfa_4c_sr000001_08);
   else if (nfa_4c_sr000001_08 >= 0 & nfa_4c_sr000002_08 >= 0 & nfa_4c_sr000002_08 > nfa_4c_sr000001_08) then
   marketvalue_vehicles8 = (marketvalue_vehicles8 + (((nfa_4c_sr000002_08 - nfa_4c_sr000001_08)/2) + nfa_4c_sr000001_08));
    else if (nfa_4c_sr000001_08 >= 0 & nfa_4c_sr000002_08 >= 0 & nfa_4c_sr000002_08 < nfa_4c_sr000001_08) then
    marketvalue_vehicles8 = (marketvalue_vehicles8 + (((nfa_4c_sr000001_08 - nfa_4c_sr000002_08)/2) + nfa_4c_sr000002_08));
     else if (nfa_4c_08 in(-1, -2, -4) & nfa_4c_uab_b_08 = 0) then marketvalue_vehicles8 = (marketvalue_vehicles8 + quartile1);
      else if (nfa_4c_08 in(-1, -2, -4) & nfa_4c_uab_b_08 = 1) then marketvalue_vehicles8 = (marketvalue_vehicles8 + quartile2);
         else if (nfa_4c_uab_a_08 in(-1, -2) | nfa_4c_uab_b_08 in(-1, -2)) then marketvalue_vehicles8 = -3;

/**************************************************/
/* CAR Component - marketvalue_vehicles9          */
/**************************************************/

if (nfa_4c_09 >= 0) then marketvalue_vehicles9 = (marketvalue_vehicles9 + nfa_4c_09);
 else if (nfa_4c_09 in(-1, -2) & nfa_4c_sr000001_09 < 0 & nfa_4c_sr000002_09 < 0
 & nfa_4c_uab_a_09 < 0 & nfa_4c_uab_b_09 < 0) then marketvalue_vehicles9 = nfa_4c_09;
   else if (nfa_4c_sr000001_09 >= 0 & nfa_4c_sr000002_09 >= 0 & nfa_4c_sr000002_09 = nfa_4c_sr000001_09) then
   marketvalue_vehicles9 = (marketvalue_vehicles9 + nfa_4c_sr000001_09);
    else if (nfa_4c_sr000001_09 >= 0 & nfa_4c_sr000002_09 >= 0 & nfa_4c_sr000002_09 > nfa_4c_sr000001_09) then
    marketvalue_vehicles9 = (marketvalue_vehicles9 + (((nfa_4c_sr000002_09 - nfa_4c_sr000001_09)/2) + nfa_4c_sr000001_09));
     else if (nfa_4c_sr000001_09 >= 0 & nfa_4c_sr000002_09 >= 0 & nfa_4c_sr000002_09 < nfa_4c_sr000001_09) then
     marketvalue_vehicles9 = (marketvalue_vehicles9 + (((nfa_4c_sr000001_09 - nfa_4c_sr000002_09)/2) + nfa_4c_sr000002_09));
      else if (nfa_4c_09 in(-1, -2, -4) & nfa_4c_uab_b_09 = 0) then marketvalue_vehicles9 = (marketvalue_vehicles9 + quartile1);
       else if (nfa_4c_09 in(-1, -2, -4) & nfa_4c_uab_b_09 = 1) then marketvalue_vehicles9 = (marketvalue_vehicles9 + quartile2);
          else if (nfa_4c_uab_a_09 in(-1, -2) | nfa_4c_uab_b_09 in(-1, -2)) then marketvalue_vehicles9 = -3;

/**************************************************/
/* CAR Component - marketvalue_vehicles10         */
/**************************************************/

if (nfa_4c_10 >= 0) then marketvalue_vehicles10 = (marketvalue_vehicles10 + nfa_4c_10);
 else if (nfa_4c_10 in(-1, -2) & nfa_4c_sr000001_10 < 0 & nfa_4c_sr000002_10 < 0
 & nfa_4c_uab_a_10 < 0 & nfa_4c_uab_b_10 < 0) then marketvalue_vehicles10 = nfa_4c_10;
   else if (nfa_4c_sr000001_10 >= 0 & nfa_4c_sr000002_10 >= 0 & nfa_4c_sr000002_10 = nfa_4c_sr000001_10) then
   marketvalue_vehicles10 = (marketvalue_vehicles10 + nfa_4c_sr000001_10);
    else if (nfa_4c_sr000001_10 >= 0 & nfa_4c_sr000002_10 >= 0 & nfa_4c_sr000002_10 > nfa_4c_sr000001_10) then
    marketvalue_vehicles10 = (marketvalue_vehicles10 + (((nfa_4c_sr000002_10 - nfa_4c_sr000001_10)/2) + nfa_4c_sr000001_10));
     else if (nfa_4c_sr000001_10 >= 0 & nfa_4c_sr000002_10 >= 0 & nfa_4c_sr000002_10 < nfa_4c_sr000001_10) then
     marketvalue_vehicles10 = (marketvalue_vehicles10 + (((nfa_4c_sr000001_10 - nfa_4c_sr000002_10)/2) + nfa_4c_sr000002_10));
      else if (nfa_4c_10 in(-1, -2, -4) & nfa_4c_uab_b_10 = 0) then marketvalue_vehicles10 = (marketvalue_vehicles10 + quartile1);
       else if (nfa_4c_10 in(-1, -2, -4) & nfa_4c_uab_b_10 = 1) then marketvalue_vehicles10 = (marketvalue_vehicles10 + quartile2);
        else if (nfa_4c_uab_a_10 in(-1, -2) | nfa_4c_uab_b_10 in(-1, -2)) then marketvalue_vehicles10 = -3;

/**************************************************/
/* CAR Component - marketvalue_vehicles11         */
/**************************************************/

if (nfa_4c_11 >= 0) then marketvalue_vehicles11 = (marketvalue_vehicles11 + nfa_4c_11);
 else if (nfa_4c_11 in(-1, -2) & nfa_4c_uab_a_11 < 0) then marketvalue_vehicles11 = nfa_4c_11;
  else if (nfa_4c_uab_a_11 in(-1, -2)) then marketvalue_vehicles11 = -3;

/**************************************************/
/* CAR Component - marketvalue_vehicles12         */
/**************************************************/

if (nfa_4c_12 >= 0) then marketvalue_vehicles12 = (marketvalue_vehicles12 + nfa_4c_12);
 else if (nfa_4c_12 in(-1, -2) & nfa_4c_uab_a_12 < 0) then marketvalue_vehicles12 = nfa_4c_12;
  else if (nfa_4c_uab_a_12 in(-1, -2)) then marketvalue_vehicles12 = -3;

/**************************************************/
/* CAR Component - marketvalue_vehicles13         */
/**************************************************/

if (nfa_4c_13 >= 0) then marketvalue_vehicles13 = (marketvalue_vehicles13 + nfa_4c_13);
 else if (nfa_4c_13 in(-1, -2)) then marketvalue_vehicles13 = nfa_4c_13;

/**************************************************/
/* CAR Component - marketvalue_vehicles14         */
/**************************************************/

if (nfa_4c_14 >= 0) then marketvalue_vehicles14 = (marketvalue_vehicles14 + nfa_4c_14);
 else if (nfa_4c_14 in(-1, -2)) then marketvalue_vehicles14 = nfa_4c_14;

/**************************************************/
/* CAR Component - marketvalue_vehicles15         */
/**************************************************/

if (nfa_4c_15 >= 0) then marketvalue_vehicles15 = (marketvalue_vehicles15 + nfa_4c_15);
 else if (nfa_4c_15 in(-1, -2)) then marketvalue_vehicles15 = nfa_4c_15;

/**************************************************/
/* CAR Component - mktval_othervehicles           */
/**************************************************/

if (nfa_5 = 1 & nfa_5c_trunc >= 0) then mktval_othervehicles = (mktval_othervehicles + nfa_5c_trunc);
 else if (nfa_5 = 1 & nfa_5c_ref_1 = 1 & nfa_5c_sr000001 < 0 & nfa_5c_sr000002 < 0
 & nfa_5c_uab_a < 0 & nfa_5c_uab_b < 0 & nfa_5c_uab_c < 0) then mktval_othervehicles = -1;
  else if (nfa_5 = 1 & nfa_5c_trunc in(-1, -2) & nfa_5c_sr000001 < 0 & nfa_5c_sr000002 < 0
  & nfa_5c_uab_a < 0 & nfa_5c_uab_b < 0 & nfa_5c_uab_c < 0) then mktval_othervehicles = nfa_5c_trunc;
    else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 = nfa_5c_sr000001) then
    mktval_othervehicles = (mktval_othervehicles + nfa_5c_sr000001);
     else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 > nfa_5c_sr000001) then
     mktval_othervehicles = (mktval_othervehicles + (((nfa_5c_sr000002 - nfa_5c_sr000001)/2) + nfa_5c_sr000001));
      else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 < nfa_5c_sr000001) then
      mktval_othervehicles = (mktval_othervehicles + (((nfa_5c_sr000001 - nfa_5c_sr000002)/2) + nfa_5c_sr000002));
       else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_b = 0) then mktval_othervehicles = (mktval_othervehicles+ quartile1);
        else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_b = 1) then mktval_othervehicles = (mktval_othervehicles + quartile2);
         else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_c = 0) then mktval_othervehicles = (mktval_othervehicles + quartile3);
          else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_c = 1) then mktval_othervehicles = (mktval_othervehicles + 50000);
           else if (nfa_5c_uab_a in(-1, -2) | nfa_5c_uab_b in(-1, -2) | nfa_5c_uab_c in(-1, -2)) then mktval_othervehicles = -3;

/*******************************/
/* Add components CAR          */
/*******************************/

if (mktval_assetpoorcars1 >= 0) then carc = (carc + mktval_assetpoorcars1);
if (mktval_assetpoorcars2 >= 0) then carc = (carc + mktval_assetpoorcars2);
if (mktval_assetpoorcars3 >= 0) then carc = (carc + mktval_assetpoorcars3);
if (marketvalue_vehicles1 >= 0) then carc = (carc + marketvalue_vehicles1);
if (marketvalue_vehicles2 >= 0) then carc = (carc + marketvalue_vehicles2);
if (marketvalue_vehicles3 >= 0) then carc = (carc + marketvalue_vehicles3);
if (marketvalue_vehicles4 >= 0) then carc = (carc + marketvalue_vehicles4);
if (marketvalue_vehicles5 >= 0) then carc = (carc + marketvalue_vehicles5);
if (marketvalue_vehicles6 >= 0) then carc = (carc + marketvalue_vehicles6);
if (marketvalue_vehicles7 >= 0) then carc = (carc + marketvalue_vehicles7);
if (marketvalue_vehicles8 >= 0) then carc = (carc + marketvalue_vehicles8);
if (marketvalue_vehicles9 >= 0) then carc = (carc + marketvalue_vehicles9);
if (marketvalue_vehicles10 >= 0) then carc = (carc + marketvalue_vehicles10);
if (marketvalue_vehicles11 >= 0) then carc = (carc + marketvalue_vehicles11);
if (marketvalue_vehicles12 >= 0) then carc = (carc + marketvalue_vehicles12);
if (marketvalue_vehicles13 >= 0) then carc = (carc + marketvalue_vehicles13);
if (marketvalue_vehicles14 >= 0) then carc = (carc + marketvalue_vehicles14);
if (marketvalue_vehicles15 >= 0) then carc = (carc + marketvalue_vehicles15);
if (mktval_othervehicles >= 0) then carc = (carc + mktval_othervehicles);

if (mktval_assetpoorcars1 in(-1, -2, -3)) then carc = -3;
else if (mktval_assetpoorcars2 in(-1, -2, -3)) then carc = -3;
else if (mktval_assetpoorcars3 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles1 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles2 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles3 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles4 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles5 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles6 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles7 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles8 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles9 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles10 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles11 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles12 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles13 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles14 in(-1, -2, -3)) then carc = -3;
else if (marketvalue_vehicles15 in(-1, -2, -3)) then carc = -3;
else if (mktval_othervehicles in(-1, -2, -3)) then carc = -3;

/************************/
/* Compute TNFW_TRUNC   */
/************************/
/*******************************************************/
/* TNFW_TRUNC - add components created in above code   */
/*******************************************************/

if (homec  >= 0) then tnfw_trunc = (tnfw_trunc + homec );
if (mortc  >= 0) then tnfw_trunc = (tnfw_trunc - mortc );
if (pdebtc >= 0) then tnfw_trunc = (tnfw_trunc - pdebtc);
if (cashc  >= 0) then tnfw_trunc = (tnfw_trunc + cashc );
if (irac   >= 0) then tnfw_trunc = (tnfw_trunc + irac  );
if (a401kc >= 0) then tnfw_trunc = (tnfw_trunc + a401kc);
if (cdsc   >= 0) then tnfw_trunc = (tnfw_trunc + cdsc  );
if (stockc >= 0) then tnfw_trunc = (tnfw_trunc + stockc);
if (bizc   >= 0) then tnfw_trunc = (tnfw_trunc + bizc  );
if (bdebtc >= 0) then tnfw_trunc = (tnfw_trunc - bdebtc);
if (cdebtc >= 0) then tnfw_trunc = (tnfw_trunc - cdebtc);
if (carc   >= 0) then tnfw_trunc = (tnfw_trunc + carc  );
if (posesc >= 0) then tnfw_trunc = (tnfw_trunc + posesc);
if (odebtc >= 0) then tnfw_trunc = (tnfw_trunc - odebtc);

if (homec  in(-1, -2, -3)) then tnfw_trunc = -3;
if (mortc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (pdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cashc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (irac   in(-1, -2, -3)) then tnfw_trunc = -3;
if (a401kc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdsc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (stockc in(-1, -2, -3)) then tnfw_trunc = -3;
if (bizc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (bdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (carc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (posesc in(-1, -2, -3)) then tnfw_trunc = -3;
if (odebtc in(-1, -2, -3)) then tnfw_trunc = -3;

/***************************************************************/
/* TNFW_TRUNC - adjust for partially missing range estimates   */
/***************************************************************/

array ranges1 (n) nfa_1a_sr000001 nfa_1b_sr000001
                  nfa_1c_sr000001 nfa_2a_sr000001
                  nfa_2b_sr000001 nfa_2c_sr000001
                  fa_1a_sr000001
                  fa_8d_sr000001_01 fa_8d_sr000001_02 fa_8d_sr000001_03 fa_8d_sr000001_04
                  fa_8d_sr000001_05 fa_8d_sr000001_06 fa_8d_sr000001_07
                  fa_6e_sr000001 fa_7c_sr000001
                  fa_2a_sr000001
                  fa_3a_sr000001 fa_4a_sr000001 fa_5a_sr000001 fa_9a_sr000001 fa_10a_sr000001
                  fa_11a_sr000001
                  q13_131_sr000001 q13_132_sr000001
                  sc_12b_sr000001_01 nfa_4f_sr000001_01 nfa_4f_sr000001_02 nfa_4f_sr000001_03
                  nfa_4f_sr000001_04
                  sc_12a_sr000001_01 sc_12a_sr000001_02 nfa_4c_sr000001_01 nfa_4c_sr000001_02
                  nfa_4c_sr000001_03 nfa_4c_sr000001_04 nfa_4c_sr000001_05 nfa_4c_sr000001_06
                  nfa_4c_sr000001_07 nfa_4c_sr000001_08 nfa_4c_sr000001_09 nfa_4c_sr000001_10
                  nfa_5c_sr000001
                  nfa_6e_sr000001;

array ranges2 (n) nfa_1a_sr000002 nfa_1b_sr000002 nfa_1c_sr000002 nfa_2a_sr000002 nfa_2b_sr000002
                  nfa_2c_sr000002
                  fa_1a_sr000002
                  fa_8d_sr000002_01 fa_8d_sr000002_02 fa_8d_sr000002_03 fa_8d_sr000002_04 fa_8d_sr000002_05
                  fa_8d_sr000002_06 fa_8d_sr000002_07
                  fa_6e_sr000002 fa_7c_sr000002
                  fa_2a_sr000002
                  fa_3a_sr000002 fa_4a_sr000002 fa_5a_sr000002 fa_9a_sr000002 fa_10a_sr000002
                  fa_11a_sr000002
                  q13_131_sr000002 q13_132_sr000002
                  sc_12b_sr000002_01 nfa_4f_sr000002_01 nfa_4f_sr000002_02 nfa_4f_sr000002_03
                  nfa_4f_sr000002_04
                  sc_12a_sr000002_01 sc_12a_sr000002_02 nfa_4c_sr000002_01 nfa_4c_sr000002_02
                  nfa_4c_sr000002_03 nfa_4c_sr000002_04 nfa_4c_sr000002_05 nfa_4c_sr000002_06
                  nfa_4c_sr000002_07 nfa_4c_sr000002_08 nfa_4c_sr000002_09 nfa_4c_sr000002_10
                  nfa_5c_sr000002
                  nfa_6e_sr000002;

do n = 1 to 44;
if (tnfw_trunc ~= -3 & ((ranges1 >= 0 & ranges2 in(-1, -2)) | (ranges1 in(-1, -2) & ranges2 >= 0)))
  then tnfw_trunc = -3;
end;

/***************************************/
/* APPLY TOPCODE TO TNFW_TRUNC FOR 2004*/
/***************************************/

if (tnfw_trunc_2004 > 1485000) then tnfw_trunc_2004 = 2671980;

tnfw_trunc_2004 = round(tnfw_trunc_2004);

 

2008 TNFW_TRUNC variable creation


/***************************************************/
/* Compute dollar amt for dollars & cents vars     */
/***************************************************/

nfa_7d_truncc = nfa_7d_trunc;
if (nfa_7d_trunc > 0) then nfa_7d_truncc = (nfa_7d_trunc/100);

/***************************************************/
/* Compute dynamic QUARTILE VALUES for estimates   */
/***************************************************/

array quartileqs (i) quartile1 quartile2 quartile3 quartile4;

do i = 1 to 4;
 quartileqs = 0;
end;

if (symbol_entry_othhh = 7200) then do;
  quartile1 = (5000/2);
  quartile2 = (5000 + ((7200-5000)/2));
  quartile3 = (7200 + ((30000-7200)/2));
  quartile4 = 30000; /* Note: Use median of actual values > 30000 where possible.  Otherwise set to 30000 */
end;
else if (symbol_entry_othhh = 13000) then do;
  quartile1 = (5000/2);
  quartile2 = (5000 + ((13000-5000)/2));
  quartile3 = (13000 + ((30000-13000)/2));
  quartile4 = 30000; /* Note: Use median of actual values > 30000 where possible.  Otherwise set to 30000 */
end;

/***************************************************/
/* BEGIN COMPUTATIONS FOR NET WEALTH COMPONENTS    */
/***************************************************/

array assetsc (i) homec mortc pdebtc cashc irac a401kc cdsc stockc trustc bizc bdebtc cdebtc carc posesc odebtc tnfw_trunc
                       collections items ccdebt studentloan childstudentloan owebusiness otherdebt
                       solebiz farm_1_value1 farm_2_value1 farm_3_value1 farm_4_value1 
                       business_1_value1 business_2_value1 business_3_value1 realestate_1_value1 
                       realestate_2_value1 realestate_3_value1 realestate_4_value1 realestate_5_value1
                       realestate_6_value1
                       farm_1_value farm_2_value farm_3_value farm_4_value business_1_value business_2_value
                       business_3_value realestate_1_value realestate_2_value realestate_3_value realestate_4_value
                       realestate_5_value realestate_6_value
                       debtbiz farm_1_debt1 farm_2_debt1 farm_3_debt1 farm_4_debt1 business_1_debt1 business_2_debt1
                       business_3_debt1 realestate_1_debt1 
                       farm_1_debt farm_2_debt farm_3_debt farm_4_debt business_1_debt business_2_debt
                       business_3_debt realestate_1_debt
                       govbonds mutual lifeinsure shares corpbond moneyowedtor
                       home1 secondhome mort1 secondmort pdebt1 secondpdebt
                       ira1 ira2 ira3 ira4 ira5 ira6 ira7 r_401k sp_401k
                       amtowe_assetpoorcars1 amtowe_assetpoorcars2 amtowe_assetpoorcars3 amtowe_assetpoorcars4
                       amtowe_assetpoorcars5
                       amountowe_vehicles1 amountowe_vehicles2 amountowe_vehicles3 amountowe_vehicles4
                       amountowe_vehicles5 amountowe_vehicles6 amountowe_vehicles7 amtowe_othervehicles
                       mktval_assetpoorcars1 mktval_assetpoorcars2 mktval_assetpoorcars3 mktval_assetpoorcars4
                       mktval_assetpoorcars5
                       marketvalue_vehicles1 marketvalue_vehicles2 marketvalue_vehicles3 marketvalue_vehicles4
                       marketvalue_vehicles5 marketvalue_vehicles6 marketvalue_vehicles7 marketvalue_vehicles8
                       marketvalue_vehicles7 marketvalue_vehicles8 marketvalue_vehicles9 marketvalue_vehicles10 
                       marketvalue_vehicles11 marketvalue_vehicles12 
                       marketvalue_vehicles13 marketvalue_vehicles14 marketvalue_vehicles15 marketvalue_vehicles16 
                       marketvalue_vehicles17 mktval_othervehicles;

do i = 1 to 126;
 if (sampweight = 0) then assetsc = -5;
  else if (sampweight > 0) then assetsc = 0;
end;

/**********************/
/* Compute POSES      */
/**********************/
/******************************************/
/* POSES Component - collections          */
/******************************************/

if (nfa_6a = 1 & nfa_6e_trunc >= 0) then collections = (collections + nfa_6e_trunc);
 else if (nfa_6a = 1 & nfa_6e_ref_1 = 1 & nfa_6e_sr000001 < 0 & nfa_6e_sr000002 < 0 
 & nfa_6e_uab_a < 0 & nfa_6e_uab_b < 0 & nfa_6e_uab_c < 0) then collections = -1;
  else if (nfa_6a = 1 & nfa_6e_trunc in(-1, -2) & nfa_6e_sr000001 < 0 & nfa_6e_sr000002 < 0 
  & nfa_6e_uab_a < 0 & nfa_6e_uab_b < 0 & nfa_6e_uab_c < 0) then collections = nfa_6e_trunc;
    else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 >= 0 & nfa_6e_sr000002 = nfa_6e_sr000001) then 
    collections = (collections + nfa_6e_sr000001);
     else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 >= 0 & nfa_6e_sr000002 > nfa_6e_sr000001) then 
     collections = (collections + (((nfa_6e_sr000002 - nfa_6e_sr000001)/2) + nfa_6e_sr000001));
      else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 >= 0 & nfa_6e_sr000002 < nfa_6e_sr000001) then 
      collections = (collections + (((nfa_6e_sr000001 - nfa_6e_sr000002)/2) + nfa_6e_sr000002));
       else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_b = 0) then collections = (collections + quartile1);
        else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_b = 1) then collections = (collections + quartile2);
         else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_c = 0) then collections = (collections + quartile3);
          else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_c = 1) then collections = (collections + 72500);
           else if (nfa_6e_uab_a in(-1, -2) | nfa_6e_uab_b in(-1, -2) | nfa_6e_uab_c in(-1, -2)) then collections = -3;
 
/******************************************/
/* POSES Component - items                */
/******************************************/

if (nfa_7 = 1 & nfa_7d_truncc >= 0) then items = (items + nfa_7d_truncc);
 else if (nfa_7 = 1 & nfa_7d_ref_1 = 1 & nfa_7d_uab_a < 0 & nfa_7d_uab_b < 0 
 & nfa_7d_uab_c < 0) then items = -1;
  else if (nfa_7 = 1 & nfa_7d_truncc in(-1, -2) & nfa_7d_uab_a < 0 & nfa_7d_uab_b < 0 
  & nfa_7d_uab_c < 0) then items = nfa_7d_truncc;
   else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_b = 0) then items = (items + quartile1);
    else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_b = 1) then items = (items + quartile2);
     else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_c = 0) then items = (items + quartile3);
      else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_c = 1) then items = (items + 50000);
       else if (nfa_7d_uab_a in(-1, -2) | nfa_7d_uab_b in(-1, -2) | nfa_7d_uab_c in(-1, -2)) then items = -3;

/*******************************/
/* Add components POSES        */
/*******************************/

if (collections >= 0) then posesc = (posesc + collections); 
if (items >= 0) then posesc = (posesc + items);
if (collections in(-1, -2, -3)) then posesc = -3;
else if (items in(-1, -2, -3)) then posesc = -3;

/****************************/
/* Compute ODEBT            */
/****************************/

/******************************************/
/* ODEBT Component - ccdebt               */
/******************************************/

if (debt_1 = 1 & debt_1a >= 0) then ccdebt = (ccdebt + debt_1a);
 else if (debt_1 = 1 & debt_1a_ref_1 = 1 & debt_1a_sr000001 < 0 & debt_1a_sr000002 < 0 
 & debt_1a_uab_a < 0 & debt_1a_uab_b < 0 & debt_1a_uab_c < 0) then ccdebt = -1;
  else if (debt_1 = 1 & debt_1a in(-1, -2) & debt_1a_sr000001 < 0 & debt_1a_sr000002 < 0 
  & debt_1a_uab_a < 0 & debt_1a_uab_b < 0 & debt_1a_uab_c < 0) then ccdebt = debt_1a;
    else if (debt_1a_sr000001 >= 0 & debt_1a_sr000002 >= 0 & debt_1a_sr000002 = debt_1a_sr000001) then 
    ccdebt = (ccdebt + debt_1a_sr000001);
     else if (debt_1a_sr000001 >= 0 & debt_1a_sr000002 >= 0 & debt_1a_sr000002 > debt_1a_sr000001) then 
     ccdebt = (ccdebt + (((debt_1a_sr000002 - debt_1a_sr000001)/2) + debt_1a_sr000001));
      else if (debt_1a_sr000001 >= 0 & debt_1a_sr000002 >= 0 & debt_1a_sr000002 < debt_1a_sr000001) then 
      ccdebt = (ccdebt + (((debt_1a_sr000001 - debt_1a_sr000002)/2) + debt_1a_sr000002));
       else if (debt_1a in(-1, -2, -4) & debt_1a_uab_b = 0) then ccdebt = (ccdebt + quartile1);
        else if (debt_1a in(-1, -2, -4) & debt_1a_uab_b = 1) then ccdebt = (ccdebt + quartile2);
         else if (debt_1a in(-1, -2, -4) & debt_1a_uab_c = 0) then ccdebt = (ccdebt + quartile3);
          else if (debt_1a in(-1, -2, -4) & debt_1a_uab_c = 1) then ccdebt = (ccdebt + 45000);
           else if (debt_1a_uab_a in(-1, -2) | debt_1a_uab_b in(-1, -2) | debt_1a_uab_c in(-1, -2)) then ccdebt = -3;

/******************************************/
/* ODEBT Component - studentloan          */
/******************************************/

if (debt_2 = 1 & debt_2a >= 0) then studentloan = (studentloan + debt_2a);
 else if (debt_2 = 1 & debt_2a_ref_1 = 1 & debt_2a_uab_a < 0 & debt_2a_uab_b < 0 
 & debt_2a_uab_c < 0) then studentloan = -1;
  else if (debt_2 = 1 & debt_2a in(-1, -2) & debt_2a_uab_a < 0 & debt_2a_uab_b < 0 
  & debt_2a_uab_c < 0) then studentloan = debt_2a;
   else if (debt_2a in(-1, -2, -4) & debt_2a_uab_b = 0) then studentloan = (studentloan + quartile1);
    else if (debt_2a in(-1, -2, -4) & debt_2a_uab_b = 1) then studentloan = (studentloan + quartile2);
     else if (debt_2a in(-1, -2, -4) & debt_2a_uab_c = 0) then studentloan = (studentloan + quartile3);
      else if (debt_2a in(-1, -2, -4) & debt_2a_uab_c = 1) then studentloan = (studentloan + 50000);
       else if (debt_2a_uab_a in(-1, -2) | debt_2a_uab_b in(-1, -2) | debt_2a_uab_c in(-1, -2)) then studentloan = -3;

/******************************************/
/* ODEBT Component - childstudentloan     */
/******************************************/

if (debt_2c = 1 & debt_2d >= 0) then childstudentloan = (childstudentloan + debt_2d);
 else if (debt_2c = 1 & debt_2d_ref_1 = 1 & debt_2d_uab_a < 0 & debt_2d_uab_b < 0 
 & debt_2d_uab_c < 0) then childstudentloan = -1;
  else if (debt_2c = 1 & debt_2d in(-1, -2) & debt_2d_uab_a < 0 & debt_2d_uab_b < 0 
  & debt_2d_uab_c < 0) then childstudentloan = debt_2d;
   else if (debt_2d in(-1, -2, -4) & debt_2d_uab_b = 0) then childstudentloan = (childstudentloan + quartile1);
    else if (debt_2d in(-1, -2, -4) & debt_2d_uab_b = 1) then childstudentloan = (childstudentloan + quartile2);
     else if (debt_2d in(-1, -2, -4) & debt_2d_uab_c = 0) then childstudentloan = (childstudentloan + quartile3);
      else if (debt_2d in(-1, -2, -4) & debt_2d_uab_c = 1) then childstudentloan = (childstudentloan + 40000);
       else if (debt_2d_uab_a in(-1, -2) | debt_2d_uab_b in(-1, -2) | debt_2d_uab_c in(-1, -2)) then childstudentloan = -3;

/******************************************/
/* ODEBT Component - owebusiness          */
/******************************************/

if (debt_3 = 1 & debt_3a_trunc >= 0) then owebusiness = (owebusiness + debt_3a_trunc);
 else if (debt_3 = 1 & debt_3a_ref_1 = 1 & debt_3a_uab_a < 0 & debt_3a_uab_b < 0 
 & debt_3a_uab_c < 0) then owebusiness = -1;
  else if (debt_3 = 1 & debt_3a_trunc in(-1, -2) & debt_3a_uab_a < 0 & debt_3a_uab_b < 0 
  & debt_3a_uab_c < 0) then owebusiness = debt_3a_trunc;
   else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_b = 0) then owebusiness = (owebusiness + quartile1);
    else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_b = 1) then owebusiness = (owebusiness + quartile2);
     else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_c = 0) then owebusiness = (owebusiness + quartile3);
      else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_c = 1) then owebusiness = (owebusiness + 72500);
       else if (debt_3a_uab_a in(-1, -2) | debt_3a_uab_b in(-1, -2) | debt_3a_uab_c in(-1, -2)) then owebusiness = -3;

/******************************************/
/* ODEBT Component - otherdebt            */
/******************************************/

if (debt_4 = 1 & debt_4a_trunc >= 0) then otherdebt = (otherdebt + debt_4a_trunc);
 else if (debt_4 = 1 & debt_4a_ref_1 = 1 & debt_4a_uab_a < 0 & debt_4a_uab_b < 0 
 & debt_4a_uab_c < 0) then otherdebt = -1;
  else if (debt_4 = 1 & debt_4a_trunc in(-1, -2) & debt_4a_uab_a < 0 & debt_4a_uab_b < 0 
  & debt_4a_uab_c < 0) then otherdebt = debt_4a_trunc;
   else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_b = 0) then otherdebt = (otherdebt + quartile1);
    else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_b = 1) then otherdebt = (otherdebt + quartile2);
     else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_c = 0) then otherdebt = (otherdebt + quartile3);
      else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_c = 1) then otherdebt = (otherdebt + 70000);
       else if (debt_4a_uab_a in(-1, -2) | debt_4a_uab_b in(-1, -2) | debt_4a_uab_c in(-1, -2)) then otherdebt = -3;

/*******************************/
/* Add components ODEBT        */
/*******************************/

if (ccdebt >= 0) then odebtc = (odebtc + ccdebt); 
if (studentloan >= 0) then odebtc = (odebtc + studentloan);
if (childstudentloan >= 0) then odebtc = (odebtc + childstudentloan);
if (owebusiness >= 0) then odebtc = (odebtc + owebusiness);
if (otherdebt >= 0) then odebtc = (odebtc + otherdebt);
if (ccdebt in(-1, -2, -3)) then odebtc = -3;
else if (studentloan in(-1, -2, -3)) then odebtc = -3;
else if (childstudentloan in(-1, -2, -3)) then odebtc = -3;
else if (owebusiness in(-1, -2, -3)) then odebtc = -3;
else if (otherdebt in(-1, -2, -3)) then odebtc = -3;

/****************************/
/* Compute BIZ              */
/****************************/

/******************************************/
/* BIZ Component - solebiz                */
/******************************************/

if (q13_131_trunc >= 0) then solebiz = (solebiz + q13_131_trunc);
 else if (q13_131_trunc = 1 & q13_131_ref_1 = 1 & q13_131_sr000001 < 0 & q13_131_sr000002 < 0 
 & q13_131_uab_a < 0 & q13_131_uab_b < 0 & q13_131_uab_c < 0) then solebiz = -1;
  else if (q13_131_trunc in(-1, -2) & q13_131_sr000001 < 0 & q13_131_sr000002 < 0 
  & q13_131_uab_a < 0 & q13_131_uab_b < 0 & q13_131_uab_c < 0) then solebiz = q13_131_trunc;
    else if (q13_131_sr000001 >= 0 & q13_131_sr000002 >= 0 & q13_131_sr000002 = q13_131_sr000001) then 
    solebiz = (solebiz + q13_131_sr000001);
     else if (q13_131_sr000001 >= 0 & q13_131_sr000002 >= 0 & q13_131_sr000002 > q13_131_sr000001) then 
     solebiz = (solebiz + (((q13_131_sr000002 - q13_131_sr000001)/2) + q13_131_sr000001));
      else if (q13_131_sr000001 >= 0 & q13_131_sr000002 >= 0 & q13_131_sr000002 < q13_131_sr000001) then 
      solebiz = (solebiz + (((q13_131_sr000001 - q13_131_sr000002)/2) + q13_131_sr000002));
       else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_b = 0) then solebiz = (solebiz + quartile1);
        else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_b = 1) then solebiz = (solebiz + quartile2);
         else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_c = 0) then solebiz = (solebiz + quartile3);
          else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_c = 1) then solebiz = (solebiz + 250000);
           else if (q13_131_uab_a in(-1, -2) | q13_131_uab_b in(-1, -2) | q13_131_uab_c in(-1, -2)) then solebiz = -3;

/********************************************************************************************************/
/* BIZ Components - farm_#_value, business_#_value, realestate_#_value & percentage ownership           */
/********************************************************************************************************/

if (q13_fjt_11_trunc_01 > -4) then farm_1_value1 = q13_fjt_11_trunc_01;
if (q13_fjt_11_trunc_02 > -4) then farm_2_value1 = q13_fjt_11_trunc_02;
if (q13_fjt_11_trunc_03 > -4) then farm_3_value1 = q13_fjt_11_trunc_03;
if (q13_fjt_11_trunc_04 > -4) then farm_4_value1 = q13_fjt_11_trunc_04;
if (q13_bppjt_11_trunc_01 > -4) then business_1_value1 = q13_bppjt_11_trunc_01;
if (q13_bppjt_11_trunc_02 > -4) then business_2_value1 = q13_bppjt_11_trunc_02;
if (q13_bppjt_11_trunc_03 > -4) then business_3_value1 = q13_bppjt_11_trunc_03;
if (q13_rejt_11_trunc_01 > -4) then realestate_1_value1 = q13_rejt_11_trunc_01;
if (q13_rejt_11_trunc_02 > -4) then realestate_2_value1 = q13_rejt_11_trunc_02;
if (q13_rejt_11_trunc_03 > -4) then realestate_3_value1 = q13_rejt_11_trunc_03;
if (q13_rejt_11_trunc_04 > -4) then realestate_4_value1 = q13_rejt_11_trunc_04;
if (q13_rejt_11_trunc_05 > -4) then realestate_5_value1 = q13_rejt_11_trunc_05;
if (q13_rejt_11_trunc_06 > -4) then realestate_6_value1 = q13_rejt_11_trunc_06;

if (q13_fjt_12b_01 > -4) then farm_1_pcntshare = q13_fjt_12b_01;
if (q13_fjt_12b_02 > -4) then farm_2_pcntshare = q13_fjt_12b_02;
if (q13_fjt_12b_03 > -4) then farm_3_pcntshare = q13_fjt_12b_03;
if (q13_fjt_12b_04 > -4) then farm_4_pcntshare = q13_fjt_12b_04;
if (q13_bppjt_12b_01 > -4) then business_1_pcntshare = q13_bppjt_12b_01;
if (q13_bppjt_12b_02 > -4) then business_2_pcntshare = q13_bppjt_12b_02;
if (q13_bppjt_12b_03 > -4) then business_3_pcntshare = q13_bppjt_12b_03;
if (q13_rejt_12b_01 > -4) then realestate_1_pcntshare = q13_rejt_12b_01;
if (q13_rejt_12b_02 > -4) then realestate_2_pcntshare = q13_rejt_12b_02;
if (q13_rejt_12b_03 > -4) then realestate_3_pcntshare = q13_rejt_12b_03;
if (q13_rejt_12b_04 > -4) then realestate_4_pcntshare = q13_rejt_12b_04;
if (q13_rejt_12b_05 > -4) then realestate_5_pcntshare = q13_rejt_12b_05;
if (q13_rejt_12b_06 > -4) then realestate_6_pcntshare = q13_rejt_12b_06;

if (farm_1_pcntshare > 0) then farm_1_pcntshare = (farm_1_pcntshare / 100);
if (farm_2_pcntshare > 0) then farm_2_pcntshare = (farm_2_pcntshare / 100);
if (farm_3_pcntshare > 0) then farm_3_pcntshare = (farm_3_pcntshare / 100);
if (farm_4_pcntshare > 0) then farm_4_pcntshare = (farm_4_pcntshare / 100);
if (business_1_pcntshare > 0) then business_1_pcntshare = (business_1_pcntshare / 100);
if (business_2_pcntshare > 0) then business_2_pcntshare = (business_2_pcntshare / 100);
if (business_3_pcntshare > 0) then business_3_pcntshare = (business_3_pcntshare / 100);
if (realestate_1_pcntshare > 0) then realestate_1_pcntshare = (realestate_1_pcntshare / 100);
if (realestate_2_pcntshare > 0) then realestate_2_pcntshare = (realestate_2_pcntshare / 100);
if (realestate_3_pcntshare > 0) then realestate_3_pcntshare = (realestate_3_pcntshare / 100);
if (realestate_4_pcntshare > 0) then realestate_4_pcntshare = (realestate_4_pcntshare / 100);
if (realestate_5_pcntshare > 0) then realestate_5_pcntshare = (realestate_5_pcntshare / 100);
if (realestate_6_pcntshare > 0) then realestate_6_pcntshare = (realestate_6_pcntshare / 100);

if (farm_1_value1 >= 0 & farm_1_pcntshare >= 0) then farm_1_value = (farm_1_value1 * farm_1_pcntshare);
if (farm_2_value1 >= 0 & farm_2_pcntshare >= 0) then farm_2_value = (farm_2_value1 * farm_2_pcntshare);
if (farm_3_value1 >= 0 & farm_3_pcntshare >= 0) then farm_3_value = (farm_3_value1 * farm_3_pcntshare);
if (farm_4_value1 >= 0 & farm_4_pcntshare >= 0) then farm_4_value = (farm_4_value1 * farm_4_pcntshare);
if (business_1_value1 >= 0 & business_1_pcntshare >= 0) then business_1_value = (business_1_value1 * business_1_pcntshare);
if (business_2_value1 >= 0 & business_2_pcntshare >= 0) then business_2_value = (business_2_value1 * business_2_pcntshare);
if (business_3_value1 >= 0 & business_3_pcntshare >= 0) then business_3_value = (business_3_value1 * business_3_pcntshare);
if (realestate_1_value1 >= 0 & realestate_1_pcntshare >= 0) then realestate_1_value = (realestate_1_value1 * realestate_1_pcntshare);
if (realestate_2_value1 >= 0 & realestate_2_pcntshare >= 0) then realestate_2_value = (realestate_2_value1 * realestate_2_pcntshare);
if (realestate_3_value1 >= 0 & realestate_3_pcntshare >= 0) then realestate_3_value = (realestate_3_value1 * realestate_3_pcntshare);
if (realestate_4_value1 >= 0 & realestate_4_pcntshare >= 0) then realestate_4_value = (realestate_4_value1 * realestate_4_pcntshare);
if (realestate_5_value1 >= 0 & realestate_5_pcntshare >= 0) then realestate_5_value = (realestate_5_value1 * realestate_5_pcntshare);
if (realestate_6_value1 >= 0 & realestate_6_pcntshare >= 0) then realestate_6_value = (realestate_6_value1 * realestate_6_pcntshare);


/*******************************/
/* Add components BIZ          */
/*******************************/

if (solebiz >= 0) then bizc = (bizc + solebiz); 
if (farm_1_value >= 0) then bizc = (bizc + farm_1_value);
if (farm_2_value >= 0) then bizc = (bizc + farm_2_value);
if (farm_3_value >= 0) then bizc = (bizc + farm_3_value);
if (farm_4_value >= 0) then bizc = (bizc + farm_4_value);
if (business_1_value >= 0) then bizc = (bizc + business_1_value);
if (business_2_value >= 0) then bizc = (bizc + business_2_value);
if (business_3_value >= 0) then bizc = (bizc + business_3_value);
if (realestate_1_value >= 0) then bizc = (bizc + realestate_1_value);
if (realestate_2_value >= 0) then bizc = (bizc + realestate_2_value);
if (realestate_3_value >= 0) then bizc = (bizc + realestate_3_value);
if (realestate_4_value >= 0) then bizc = (bizc + realestate_4_value);
if (realestate_5_value >= 0) then bizc = (bizc + realestate_5_value);
if (realestate_6_value >= 0) then bizc = (bizc + realestate_6_value);

if (solebiz in(-1, -2, -3)) then bizc = -3;
if (farm_1_value in(-1, -2, -3) | farm_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (farm_2_value in(-1, -2, -3) | farm_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (farm_3_value in(-1, -2, -3) | farm_3_pcntshare in(-1, -2, -3)) then bizc = -3;
if (farm_4_value in(-1, -2, -3) | farm_4_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_1_value in(-1, -2, -3) | business_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_2_value in(-1, -2, -3) | business_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_3_value in(-1, -2, -3) | business_3_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_1_value in(-1, -2, -3) | realestate_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_2_value in(-1, -2, -3) | realestate_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_3_value in(-1, -2, -3) | realestate_3_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_4_value in(-1, -2, -3) | realestate_4_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_5_value in(-1, -2, -3) | realestate_5_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_6_value in(-1, -2, -3) | realestate_6_pcntshare in(-1, -2, -3)) then bizc = -3;

/****************************/
/* Compute BDEBT            */
/****************************/

/******************************************/
/* BDEBT Component - debtbiz              */
/******************************************/

if (q13_132_trunc >= 0) then debtbiz = (debtbiz + q13_132_trunc);
 else if (q13_132_trunc = 1 & q13_132_ref_1 = 1 & q13_132_sr000001 < 0 & q13_132_sr000002 < 0 
 & q13_132_uab_a < 0 & q13_132_uab_c < 0) then debtbiz = -1;
  else if (q13_132_trunc in(-1, -2) & q13_132_sr000001 < 0 & q13_132_sr000002 < 0 
  & q13_132_uab_a < 0 & q13_132_uab_c < 0) then debtbiz = q13_132_trunc;
    else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 = q13_132_sr000001) then 
    debtbiz = (debtbiz + q13_132_sr000001);
     else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 > q13_132_sr000001) then 
     debtbiz = (debtbiz + (((q13_132_sr000002 - q13_132_sr000001)/2) + q13_132_sr000001));
      else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 < q13_132_sr000001) then 
      debtbiz = (debtbiz + (((q13_132_sr000001 - q13_132_sr000002)/2) + q13_132_sr000002));
         else if (q13_132_trunc in(-1, -2, -4) & q13_132_uab_c = 0) then debtbiz = (debtbiz + quartile3);
          else if (q13_132_trunc in(-1, -2, -4) & q13_132_uab_c = 1) then debtbiz = (debtbiz + 200000);
           else if (q13_132_uab_a in(-1, -2) | q13_132_uab_c in(-1, -2)) then debtbiz = -3;

/***************************************************************************/
/* BDEBT Components - farm_#_debt, business_#_debt, realestate_#_debt      */
/*       (use ownership percentage computed above for bizc)                */
/***************************************************************************/

if (q13_fjt_12_01 > -4) then farm_1_debt1 = q13_fjt_12_01;
if (q13_fjt_12_02 > -4) then farm_2_debt1 = q13_fjt_12_02;
if (q13_fjt_12_03 > -4) then farm_3_debt1 = q13_fjt_12_03;
if (q13_fjt_12_04 > -4) then farm_4_debt1 = q13_fjt_12_04;
if (q13_bppjt_12_trunc_01 > -4) then business_1_debt1 = q13_bppjt_12_trunc_01;
if (q13_bppjt_12_02 > -4) then business_2_debt1 = q13_bppjt_12_02;
if (q13_bppjt_12_03 > -4) then business_3_debt1 = q13_bppjt_12_03;
if (q13_rejt_12_trunc > -4) then realestate_1_debt1 = q13_rejt_12_trunc;

if (farm_1_debt1 >= 0 & farm_1_pcntshare >= 0) then farm_1_debt = (farm_1_debt1 * farm_1_pcntshare);
if (farm_2_debt1 >= 0 & farm_2_pcntshare >= 0) then farm_2_debt = (farm_2_debt1 * farm_2_pcntshare);
if (farm_3_debt1 >= 0 & farm_3_pcntshare >= 0) then farm_3_debt = (farm_3_debt1 * farm_3_pcntshare);
if (farm_4_debt1 >= 0 & farm_4_pcntshare >= 0) then farm_4_debt = (farm_4_debt1 * farm_4_pcntshare);
if (business_1_debt1 >= 0 & business_1_pcntshare >= 0) then business_1_debt = (business_1_debt1 * business_1_pcntshare);
if (business_2_debt1 >= 0 & business_2_pcntshare >= 0) then business_2_debt = (business_2_debt1 * business_2_pcntshare);
if (business_3_debt1 >= 0 & business_3_pcntshare >= 0) then business_3_debt = (business_3_debt1 * business_3_pcntshare);
if (realestate_1_debt1 >= 0 & realestate_1_pcntshare >= 0) then realestate_1_debt = (realestate_1_debt1 * realestate_1_pcntshare);

/*******************************/
/* Add components BDEBT        */
/*******************************/

if (debtbiz >= 0) then bdebtc = (bdebtc + debtbiz); 
if (farm_1_debt >= 0) then bdebtc = (bdebtc + farm_1_debt);
if (farm_2_debt >= 0) then bdebtc = (bdebtc + farm_2_debt);
if (farm_3_debt >= 0) then bdebtc = (bdebtc + farm_3_debt);
if (farm_4_debt >= 0) then bdebtc = (bdebtc + farm_4_debt);
if (business_1_debt >= 0) then bdebtc = (bdebtc + business_1_debt);
if (business_2_debt >= 0) then bdebtc = (bdebtc + business_2_debt);
if (business_3_debt >= 0) then bdebtc = (bdebtc + business_3_debt);
if (realestate_1_debt >= 0) then bdebtc = (bdebtc + realestate_1_debt);

if (debtbiz in(-1, -2, -3)) then bdebtc = -3; 
if (farm_1_debt in(-1, -2, -3) | farm_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (farm_2_debt in(-1, -2, -3) | farm_2_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (farm_3_debt in(-1, -2, -3) | farm_3_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (farm_4_debt in(-1, -2, -3) | farm_4_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_1_debt in(-1, -2, -3) | business_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_2_debt in(-1, -2, -3) | business_2_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_3_debt in(-1, -2, -3) | business_3_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (realestate_1_debt in(-1, -2, -3) | realestate_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;

/****************************/
/* Compute CASH             */
/****************************/

/******************************************/
/* CASH Component - cash                  */
/******************************************/

if (fa_1 = 1 & fa_1a_trunc >= 0) then cashc = (cashc + fa_1a_trunc);
 else if (fa_1 = 1 & fa_1_ref_1 = 1 & fa_1a_sr000001_trunc < 0 & fa_1a_sr000002_trunc < 0 
 & fa_1a_uab_a < 0 & fa_1a_uab_b < 0 & fa_1a_uab_c < 0) then cashc = -1;
  else if (fa_1 = 1 & fa_1a_trunc in(-1, -2) & fa_1a_sr000001_trunc < 0 & fa_1a_sr000002_trunc < 0 
  & fa_1a_uab_a < 0 & fa_1a_uab_b < 0 & fa_1a_uab_c < 0) then cashc = fa_1a_trunc;
    else if (fa_1a_sr000001_trunc >= 0 & fa_1a_sr000002_trunc >= 0 & fa_1a_sr000002_trunc = fa_1a_sr000001_trunc) then 
    cashc = (cashc + fa_1a_sr000001_trunc);
     else if (fa_1a_sr000001_trunc >= 0 & fa_1a_sr000002_trunc >= 0 & fa_1a_sr000002_trunc > fa_1a_sr000001_trunc) then 
     cashc = (cashc + (((fa_1a_sr000002_trunc - fa_1a_sr000001_trunc)/2) + fa_1a_sr000001_trunc));
      else if (fa_1a_sr000001_trunc >= 0 & fa_1a_sr000002_trunc >= 0 & fa_1a_sr000002_trunc < fa_1a_sr000001_trunc) then 
      cashc = (cashc + (((fa_1a_sr000001_trunc - fa_1a_sr000002_trunc)/2) + fa_1a_sr000002_trunc));
       else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_b = 0) then cashc = (cashc + quartile1);
        else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_b = 1) then cashc = (cashc + quartile2);
         else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_c = 0) then cashc = (cashc + quartile3);
          else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_c = 1) then cashc = (cashc + 70000);
           else if (fa_1a_uab_a in(-1, -2) | fa_1a_uab_b in(-1, -2) | fa_1a_uab_c in(-1, -2)) then cashc = -3;

/*************************************************************/
/* No need to add components for CASHC - set -3 missing      */
/*************************************************************/

if (cashc in(-1, -2, -3)) then cashc = -3;

/****************************/
/* Compute CDS              */
/****************************/

/******************************************/
/* CDS Component - cds                    */
/******************************************/

if (fa_2 = 1 & fa_2a_trunc >= 0) then cdsc = (cdsc + fa_2a_trunc);
 else if (fa_2 = 1 & fa_2_ref_1 = 1 & fa_2a_sr000001 < 0 & fa_2a_sr000002 < 0 
 & fa_2a_uab_a < 0 & fa_2a_uab_b < 0 & fa_2a_uab_c < 0) then cdsc = -1;
  else if (fa_2 = 1 & fa_2a_trunc in(-1, -2) & fa_2a_sr000001 < 0 & fa_2a_sr000002 < 0 
  & fa_2a_uab_a < 0 & fa_2a_uab_b < 0 & fa_2a_uab_c < 0) then cdsc = fa_2a_trunc;
    else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002 >= 0 & fa_2a_sr000002 = fa_2a_sr000001) then 
    cdsc = (cdsc + fa_2a_sr000001);
     else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002 >= 0 & fa_2a_sr000002 > fa_2a_sr000001) then 
     cdsc = (cdsc + (((fa_2a_sr000002 - fa_2a_sr000001)/2) + fa_2a_sr000001));
      else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002 >= 0 & fa_2a_sr000002 < fa_2a_sr000001) then 
      cdsc = (cdsc + (((fa_2a_sr000001 - fa_2a_sr000002)/2) + fa_2a_sr000002));
       else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_b = 0) then cdsc = (cdsc + quartile1);
        else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_b = 1) then cdsc = (cdsc + quartile2);
         else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_c = 0) then cdsc = (cdsc + quartile3);
          else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_c = 1) then cdsc = (cdsc + 60000);
           else if (fa_2a_uab_a in(-1, -2) | fa_2a_uab_b in(-1, -2) | fa_2a_uab_c in(-1, -2)) then cdsc = -3;
 
/*************************************************************/
/* No need to add components for CDSC - set -3 missing       */
/*************************************************************/

if (cdsc in(-1, -2, -3)) then cdsc = -3;

/****************************/
/* Compute STOCK            */
/****************************/

/******************************************/
/* STOCK Component - govbonds             */
/******************************************/

if (fa_3 = 1 & fa_3a >= 0) then govbonds = (govbonds + fa_3a);
 else if (fa_3 = 1 & fa_3_ref_1 = 1 & fa_3a_sr000001 < 0 & fa_3a_sr000002 < 0 
 & fa_3a_uab_a < 0 & fa_3a_uab_b < 0 & fa_3a_uab_c < 0) then govbonds = -1;
  else if (fa_3 = 1 & fa_3a in(-1, -2) & fa_3a_sr000001 < 0 & fa_3a_sr000002 < 0 
  & fa_3a_uab_a < 0 & fa_3a_uab_b < 0 & fa_3a_uab_c < 0) then govbonds = fa_3a;
    else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 = fa_3a_sr000001) then 
    govbonds = (govbonds + fa_3a_sr000001);
     else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 > fa_3a_sr000001) then 
     govbonds = (govbonds + (((fa_3a_sr000002 - fa_3a_sr000001)/2) + fa_3a_sr000001));
      else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 < fa_3a_sr000001) then 
      govbonds = (govbonds + (((fa_3a_sr000001 - fa_3a_sr000002)/2) + fa_3a_sr000002));
       else if (fa_3a in(-1, -2, -4) & fa_3a_uab_b = 0) then govbonds = (govbonds + quartile1);
        else if (fa_3a in(-1, -2, -4) & fa_3a_uab_b = 1) then govbonds = (govbonds + quartile2);
         else if (fa_3a in(-1, -2, -4) & fa_3a_uab_c = 0) then govbonds = (govbonds + quartile3);
          else if (fa_3a in(-1, -2, -4) & fa_3a_uab_c = 1) then govbonds = (govbonds + 45000);
           else if (fa_3a_uab_a in(-1, -2) | fa_3a_uab_b in(-1, -2) | fa_3a_uab_c in(-1, -2)) then govbonds = -3;

/******************************************/
/* STOCK Component - mutual               */
/******************************************/

if (fa_4 = 1 & fa_4a_trunc >= 0) then mutual = (mutual + fa_4a_trunc);
 else if (fa_4 = 1 & fa_4_ref_1 = 1 & fa_4a_sr000001 < 0 & fa_4a_sr000002 < 0 
 & fa_4a_uab_a < 0 & fa_4a_uab_b < 0 & fa_4a_uab_c < 0) then mutual = -1;
  else if (fa_4 = 1 & fa_4a_trunc in(-1, -2) & fa_4a_sr000001 < 0 & fa_4a_sr000002 < 0 
  & fa_4a_uab_a < 0 & fa_4a_uab_b < 0 & fa_4a_uab_c < 0) then mutual = fa_4a_trunc;
    else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 = fa_4a_sr000001) then 
    mutual = (mutual + fa_4a_sr000001);
     else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 > fa_4a_sr000001) then 
     mutual = (mutual + (((fa_4a_sr000002 - fa_4a_sr000001)/2) + fa_4a_sr000001));
      else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 < fa_4a_sr000001) then 
      mutual = (mutual + (((fa_4a_sr000001 - fa_4a_sr000002)/2) + fa_4a_sr000002));
       else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_b = 0) then mutual = (mutual + quartile1);
        else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_b = 1) then mutual = (mutual + quartile2);
         else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_c = 0) then mutual = (mutual + quartile3);
          else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_c = 1) then mutual = (mutual + 100000);
           else if (fa_4a_uab_a in(-1, -2) | fa_4a_uab_b in(-1, -2) | fa_4a_uab_c in(-1, -2)) then mutual = -3;
 
/******************************************/
/* STOCK Component - lifeinsure           */
/******************************************/

if (fa_5 = 1 & fa_5a_trunc >= 0) then lifeinsure = (lifeinsure + fa_5a_trunc);
 else if (fa_5 = 1 & fa_5_ref_1 = 1 & fa_5a_sr000001 < 0 & fa_5a_sr000002 < 0 
 & fa_5a_uab_a < 0 & fa_5a_uab_b < 0 & fa_5a_uab_c < 0) then lifeinsure = -1;
  else if (fa_5 = 1 & fa_5a_trunc in(-1, -2) & fa_5a_sr000001 < 0 & fa_5a_sr000002 < 0 
  & fa_5a_uab_a < 0 & fa_5a_uab_b < 0 & fa_5a_uab_c < 0) then lifeinsure = fa_5a_trunc;
    else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002 >= 0 & fa_5a_sr000002 = fa_5a_sr000001) then 
    lifeinsure = (lifeinsure + fa_5a_sr000001);
     else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002 >= 0 & fa_5a_sr000002 > fa_5a_sr000001) then 
     lifeinsure = (lifeinsure + (((fa_5a_sr000002 - fa_5a_sr000001)/2) + fa_5a_sr000001));
      else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002 >= 0 & fa_5a_sr000002 < fa_5a_sr000001) then 
      lifeinsure = (lifeinsure + (((fa_5a_sr000001 - fa_5a_sr000002)/2) + fa_5a_sr000002));
       else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_b = 0) then lifeinsure = (lifeinsure + quartile1);
        else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_b = 1) then lifeinsure = (lifeinsure + quartile2);
         else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_c = 0) then lifeinsure = (lifeinsure + quartile3);
          else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_c = 1) then lifeinsure = (lifeinsure + 100000);
           else if (fa_5a_uab_a in(-1, -2) | fa_5a_uab_b in(-1, -2) | fa_5a_uab_c in(-1, -2)) then lifeinsure = -3;
  
/******************************************/
/* STOCK Component - shares               */
/******************************************/

if (fa_9 = 1 & fa_9a_trunc >= 0) then shares = (shares + fa_9a_trunc);
 else if (fa_9 = 1 & fa_9_ref_1 = 1 & fa_9a_sr000001 < 0 & fa_9a_sr000002_trunc < 0 
 & fa_9a_uab_a < 0 & fa_9a_uab_b < 0 & fa_9a_uab_c < 0) then shares = -1;
  else if (fa_9 = 1 & fa_9a_trunc in(-1, -2) & fa_9a_sr000001 < 0 & fa_9a_sr000002_trunc < 0 
  & fa_9a_uab_a < 0 & fa_9a_uab_b < 0 & fa_9a_uab_c < 0) then shares = fa_9a_trunc;
    else if (fa_9a_sr000001 >= 0 & fa_9a_sr000002_trunc >= 0 & fa_9a_sr000002_trunc = fa_9a_sr000001) then 
    shares = (shares + fa_9a_sr000001);
     else if (fa_9a_sr000001 >= 0 & fa_9a_sr000002_trunc >= 0 & fa_9a_sr000002_trunc > fa_9a_sr000001) then 
     shares = (shares + (((fa_9a_sr000002_trunc - fa_9a_sr000001)/2) + fa_9a_sr000001));
      else if (fa_9a_sr000001 >= 0 & fa_9a_sr000002_trunc >= 0 & fa_9a_sr000002_trunc < fa_9a_sr000001) then 
      shares = (shares + (((fa_9a_sr000001 - fa_9a_sr000002_trunc)/2) + fa_9a_sr000002_trunc));
       else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_b = 0) then shares = (shares + quartile1);
        else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_b = 1) then shares = (shares + quartile2);
         else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_c = 0) then shares = (shares + quartile3);
          else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_c = 1) then shares = (shares + 100000);
           else if (fa_9a_uab_a in(-1, -2) | fa_9a_uab_b in(-1, -2) | fa_9a_uab_c in(-1, -2)) then shares = -3;
 
/******************************************/
/* STOCK Component - corpbond             */
/******************************************/

if (fa_10 = 1 & fa_10a_trunc >= 0) then corpbond = (corpbond + fa_10a_trunc);
 else if (fa_10 = 1 & fa_10_ref_1 = 1 & fa_10a_sr000001 < 0 & fa_10a_sr000002 < 0 
 & fa_10a_uab_a < 0 & fa_10a_uab_c < 0) then corpbond = -1;
  else if (fa_10 = 1 & fa_10a_trunc in(-1, -2) & fa_10a_sr000001 < 0 & fa_10a_sr000002 < 0 
  & fa_10a_uab_a < 0 & fa_10a_uab_c < 0) then corpbond = fa_10a_trunc;
    else if (fa_10a_sr000001 >= 0 & fa_10a_sr000002 >= 0 & fa_10a_sr000002 = fa_10a_sr000001) then 
    corpbond = (corpbond + fa_10a_sr000001);
     else if (fa_10a_sr000001 >= 0 & fa_10a_sr000002 >= 0 & fa_10a_sr000002 > fa_10a_sr000001) then 
     corpbond = (corpbond + (((fa_10a_sr000002 - fa_10a_sr000001)/2) + fa_10a_sr000001));
      else if (fa_10a_sr000001 >= 0 & fa_10a_sr000002 >= 0 & fa_10a_sr000002 < fa_10a_sr000001) then 
      corpbond = (corpbond + (((fa_10a_sr000001 - fa_10a_sr000002)/2) + fa_10a_sr000002));
       else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_c = 0) then corpbond = (corpbond + quartile3);
        else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_c = 1) then corpbond = (corpbond + 190000);
         else if (fa_10a_uab_a in(-1, -2) /* | fa_10a_uab_b in(-1, -2) */ | fa_10a_uab_c in(-1, -2)) then corpbond = -3;

/******************************************/
/* STOCK Component - moneyowedtor         */
/******************************************/

if (fa_11 = 1 & fa_11a_trunc >= 0) then moneyowedtor = (moneyowedtor + fa_11a_trunc);
 else if (fa_11 = 1 & fa_11_ref_1 = 1 & fa_11a_sr000001 < 0 & fa_11a_sr000002 < 0 
 & fa_11a_uab_a < 0 & fa_11a_uab_b < 0 & fa_11a_uab_c < 0) then moneyowedtor = -1;
  else if (fa_11 = 1 & fa_11a_trunc in(-1, -2) & fa_11a_sr000001 < 0 & fa_11a_sr000002 < 0 
  & fa_11a_uab_a < 0 & fa_11a_uab_b < 0 & fa_11a_uab_c < 0) then moneyowedtor = fa_11a_trunc;
    else if (fa_11a_sr000001 >= 0 & fa_11a_sr000002 >= 0 & fa_11a_sr000002 = fa_11a_sr000001) then 
    moneyowedtor = (moneyowedtor + fa_11a_sr000001);
     else if (fa_11a_sr000001 >= 0 & fa_11a_sr000002 >= 0 & fa_11a_sr000002 > fa_11a_sr000001) then 
     moneyowedtor = (moneyowedtor + (((fa_11a_sr000002 - fa_11a_sr000001)/2) + fa_11a_sr000001));
      else if (fa_11a_sr000001 >= 0 & fa_11a_sr000002 >= 0 & fa_11a_sr000002 < fa_11a_sr000001) then 
      moneyowedtor = (moneyowedtor + (((fa_11a_sr000001 - fa_11a_sr000002)/2) + fa_11a_sr000002));
       else if (fa_11a_trunc in(-1, -2, -4) & fa_11a_uab_b = 0) then moneyowedtor = (moneyowedtor + quartile1);
        else if (fa_11a_trunc in(-1, -2, -4) & fa_11a_uab_b = 1) then moneyowedtor = (moneyowedtor + quartile2);
         else if (fa_11a_trunc in(-1, -2, -4) & fa_11a_uab_c = 0) then moneyowedtor = (moneyowedtor + quartile3);
          else if (fa_11a_trunc in(-1, -2, -4) & fa_11a_uab_c = 1) then moneyowedtor = (moneyowedtor + 90000);
           else if (fa_11a_uab_a in(-1, -2) | fa_11a_uab_b in(-1, -2) | fa_11a_uab_c in(-1, -2)) then moneyowedtor = -3;
 
/*******************************/
/* Add components STOCK        */
/*******************************/

if (govbonds >= 0) then stockc = (stockc + govbonds); 
if (mutual >= 0) then stockc = (stockc + mutual);
if (lifeinsure >= 0) then stockc = (stockc + lifeinsure);
if (shares >= 0) then stockc = (stockc + shares);
if (corpbond >= 0) then stockc = (stockc + corpbond);
if (moneyowedtor >= 0) then stockc = (stockc + moneyowedtor);
if (govbonds in(-1, -2, -3)) then stockc = -3;
else if (mutual in(-1, -2, -3)) then stockc = -3;
else if (lifeinsure in(-1, -2, -3)) then stockc = -3;
else if (shares in(-1, -2, -3)) then stockc = -3;
else if (corpbond in(-1, -2, -3)) then stockc = -3;
else if (moneyowedtor in(-1, -2, -3)) then stockc = -3;

/****************************/
/* Compute HOME             */
/****************************/

/******************************************/
/* HOME Component - home1                 */
/******************************************/

if (nfa_1 = 1 & nfa_1a_trunc >= 0) then home1 = (home1 + nfa_1a_trunc);
 else if (nfa_1 = 1 & nfa_1_ref_1 = 1 & nfa_1a_sr000001_trunc < 0 & nfa_1a_sr000002_trunc < 0 
 & nfa_1a_uab_a < 0 & nfa_1a_uab_b < 0 & nfa_1a_uab_c < 0) then home1 = -1;
  else if (nfa_1 = 1 & nfa_1a_trunc in(-1, -2) & nfa_1a_sr000001_trunc < 0 & nfa_1a_sr000002_trunc < 0 
  & nfa_1a_uab_a < 0 & nfa_1a_uab_b < 0 & nfa_1a_uab_c < 0) then home1 = nfa_1a_trunc;
    else if (nfa_1a_sr000001_trunc >= 0 & nfa_1a_sr000002_trunc >= 0 & nfa_1a_sr000002_trunc = nfa_1a_sr000001_trunc) then 
    home1 = (home1 + nfa_1a_sr000001_trunc);
     else if (nfa_1a_sr000001_trunc >= 0 & nfa_1a_sr000002_trunc >= 0 & nfa_1a_sr000002_trunc > nfa_1a_sr000001_trunc) then 
     home1 = (home1 + (((nfa_1a_sr000002_trunc - nfa_1a_sr000001_trunc)/2) + nfa_1a_sr000001_trunc));
      else if (nfa_1a_sr000001_trunc >= 0 & nfa_1a_sr000002_trunc >= 0 & nfa_1a_sr000002_trunc < nfa_1a_sr000001_trunc) then 
      home1 = (home1 + (((nfa_1a_sr000001_trunc - nfa_1a_sr000002_trunc)/2) + nfa_1a_sr000002_trunc));
       else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_b = 0) then home1 = (home1 + quartile1);
        else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_b = 1) then home1 = (home1 + quartile2);
         else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_c = 0) then home1 = (home1 + quartile3);
          else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_c = 1) then home1 = (home1 + 200000);
           else if (nfa_1a_uab_a in(-1, -2) | nfa_1a_uab_b in(-1, -2) | nfa_1a_uab_c in(-1, -2)) then home1 = -3;
 
/******************************************/
/* HOME Component - secondhome            */
/******************************************/

if (nfa_2 = 1 & nfa_2a_trunc >= 0) then secondhome = (secondhome + nfa_2a_trunc);
 else if (nfa_2 = 1 & nfa_2_ref_1 = 1 & nfa_2a_sr000001 < 0 & nfa_2a_sr000002 < 0 
 & nfa_2a_uab_a < 0 & nfa_2a_uab_b < 0 & nfa_2a_uab_c < 0) then secondhome = -1;
  else if (nfa_2 = 1 & nfa_2a_trunc in(-1, -2) & nfa_2a_sr000001 < 0 & nfa_2a_sr000002 < 0 
  & nfa_2a_uab_a < 0 & nfa_2a_uab_b < 0 & nfa_2a_uab_c < 0) then secondhome = nfa_2a_trunc;
    else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 = nfa_2a_sr000001) then 
    secondhome = (secondhome + nfa_2a_sr000001);
     else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 > nfa_2a_sr000001) then 
     secondhome = (secondhome + (((nfa_2a_sr000002 - nfa_2a_sr000001)/2) + nfa_2a_sr000001));
      else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 < nfa_2a_sr000001) then 
      secondhome = (secondhome + (((nfa_2a_sr000001 - nfa_2a_sr000002)/2) + nfa_2a_sr000002));
       else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_b = 0) then secondhome = (secondhome + quartile1);
        else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_b = 1) then secondhome = (secondhome + quartile2);
         else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_c = 0) then secondhome = (secondhome + quartile3);
          else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_c = 1) then secondhome = (secondhome + 180000);
           else if (nfa_2a_uab_a in(-1, -2) | nfa_2a_uab_b in(-1, -2) | nfa_2a_uab_c in(-1, -2)) then secondhome = -3;
 
/*******************************/
/* Add components HOME         */
/*******************************/

if (home1 >= 0) then homec = (homec + home1); 
if (secondhome >= 0) then homec = (homec + secondhome);
if (home1 in(-1, -2, -3)) then homec = -3;
else if (secondhome in(-1, -2, -3)) then homec = -3;

/****************************/
/* Compute MORT             */
/****************************/

/******************************************/
/* MORT Component - mort1                 */
/******************************************/

if (nfa_1b_trunc >= 0) then mort1 = (mort1 + nfa_1b_trunc);
 else if (nfa_1b_ref_1 = 1 & nfa_1b_sr000001_trunc < 0 & nfa_1b_sr000002_trunc < 0 
 & nfa_1b_uab_a < 0 & nfa_1b_uab_b < 0) then mort1 = -1;
  else if (nfa_1b_trunc in(-1, -2) & nfa_1b_sr000001_trunc < 0 & nfa_1b_sr000002_trunc < 0 
  & nfa_1b_uab_a < 0 & nfa_1b_uab_b < 0) then mort1 = nfa_1b_trunc;
    else if (nfa_1b_sr000001_trunc >= 0 & nfa_1b_sr000002_trunc >= 0 & nfa_1b_sr000002_trunc = nfa_1b_sr000001_trunc) then 
    mort1 = (mort1 + nfa_1b_sr000001_trunc);
     else if (nfa_1b_sr000001_trunc >= 0 & nfa_1b_sr000002_trunc >= 0 & nfa_1b_sr000002_trunc > nfa_1b_sr000001_trunc) then 
     mort1 = (mort1 + (((nfa_1b_sr000002_trunc - nfa_1b_sr000001_trunc)/2) + nfa_1b_sr000001_trunc));
      else if (nfa_1b_sr000001_trunc >= 0 & nfa_1b_sr000002_trunc >= 0 & nfa_1b_sr000002_trunc < nfa_1b_sr000001_trunc) then 
      mort1 = (mort1 + (((nfa_1b_sr000001_trunc - nfa_1b_sr000002_trunc)/2) + nfa_1b_sr000002_trunc));
       else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_b = 0) then mort1 = (mort1 + quartile1);
        else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_b = 1) then mort1 = (mort1 + quartile2);
         else if (nfa_1b_uab_a in(-1, -2) | nfa_1b_uab_b in(-1, -2)) then mort1 = -3;
 
/******************************************/
/* MORT Component - secondmort            */
/******************************************/

if (nfa_2b_trunc >= 0) then secondmort = (secondmort + nfa_2b_trunc);
 else if (nfa_2b_ref_1 = 1 & nfa_2b_sr000001 < 0 & nfa_2b_sr000002 < 0 
 & nfa_2b_uab_a < 0 & nfa_2b_uab_b < 0 & nfa_2b_uab_c < 0) then secondmort = -1;
  else if (nfa_2b_trunc in(-1, -2) & nfa_2b_sr000001 < 0 & nfa_2b_sr000002 < 0 
  & nfa_2b_uab_a < 0 & nfa_2b_uab_b < 0 & nfa_2b_uab_c < 0) then secondmort = nfa_2b_trunc;
    else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 = nfa_2b_sr000001) then 
    secondmort = (secondmort + nfa_2b_sr000001);
     else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 > nfa_2b_sr000001) then 
     secondmort = (secondmort + (((nfa_2b_sr000002 - nfa_2b_sr000001)/2) + nfa_2b_sr000001));
      else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 < nfa_2b_sr000001) then 
      secondmort = (secondmort + (((nfa_2b_sr000001 - nfa_2b_sr000002)/2) + nfa_2b_sr000002));
       else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_b = 0) then secondmort = (secondmort + quartile1);
        else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_b = 1) then secondmort = (secondmort + quartile2);
         else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_c = 0) then secondmort = (secondmort + quartile3);
          else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_c = 1) then secondmort = (secondmort + 145000);
           else if (nfa_2b_uab_a in(-1, -2) | nfa_2b_uab_b in(-1, -2) | nfa_2b_uab_c in(-1, -2)) then secondmort = -3;
 
/*******************************/
/* Add components MORT         */
/*******************************/

if (mort1 >= 0) then mortc = (mortc + mort1); 
if (secondmort >= 0) then mortc = (mortc + secondmort);
if (mort1 in(-1, -2, -3)) then mortc = -3;
else if (secondmort in(-1, -2, -3)) then mortc = -3;

/****************************/
/* Compute PDEBT            */
/****************************/

/******************************************/
/* PDEBT Component - pdebt1               */
/******************************************/

if (nfa_1c >= 0) then pdebt1 = (pdebt1 + nfa_1c);
 else if (nfa_1c_ref_1 = 1 & nfa_1c_sr000001 < 0 & nfa_1c_sr000002 < 0 
 & nfa_1c_uab_a < 0 & nfa_1c_uab_b < 0 & nfa_1c_uab_c < 0) then pdebt1 = -1;
  else if (nfa_1c in(-1, -2) & nfa_1c_sr000001 < 0 & nfa_1c_sr000002 < 0 
  & nfa_1c_uab_a < 0 & nfa_1c_uab_b < 0 & nfa_1c_uab_c < 0) then pdebt1 = nfa_1c;
    else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 = nfa_1c_sr000001) then 
    pdebt1 = (pdebt1 + nfa_1c_sr000001);
     else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 > nfa_1c_sr000001) then 
     pdebt1 = (pdebt1 + (((nfa_1c_sr000002 - nfa_1c_sr000001)/2) + nfa_1c_sr000001));
      else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 < nfa_1c_sr000001) then 
      pdebt1 = (pdebt1 + (((nfa_1c_sr000001 - nfa_1c_sr000002)/2) + nfa_1c_sr000002));
       else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_b = 0) then pdebt1 = (pdebt1 + quartile1);
        else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_b = 1) then pdebt1 = (pdebt1 + quartile2);
         else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_c = 0) then pdebt1 = (pdebt1 + quartile3);
          else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_c = 1) then pdebt1 = (pdebt1 + 50000);
           else if (nfa_1c_uab_a in(-1, -2) | nfa_1c_uab_b in(-1, -2) | nfa_1c_uab_c in(-1, -2)) then pdebt1 = -3;
 
/******************************************/
/* PDEBT Component - secondpdebt          */
/******************************************/

if (nfa_2c >= 0) then secondpdebt = (secondpdebt + nfa_2c);
 else if (nfa_2c_ref_1 = 1 & nfa_2c_sr000001 < 0 & nfa_2c_sr000002 < 0 
 & nfa_2c_uab_a < 0) then secondpdebt = -1;
  else if (nfa_2c in(-1, -2) & nfa_2c_sr000001 < 0 & nfa_2c_sr000002 < 0 
  & nfa_2c_uab_a < 0) then secondpdebt = nfa_2c;
    else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 = nfa_2c_sr000001) then 
    secondpdebt = (secondpdebt + nfa_2c_sr000001);
     else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 > nfa_2c_sr000001) then 
     secondpdebt = (secondpdebt + (((nfa_2c_sr000002 - nfa_2c_sr000001)/2) + nfa_2c_sr000001));
      else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 < nfa_2c_sr000001) then 
      secondpdebt = (secondpdebt + (((nfa_2c_sr000001 - nfa_2c_sr000002)/2) + nfa_2c_sr000002));
       else if (nfa_2c_uab_a in(-1, -2)) then secondpdebt = -3;

/*******************************/
/* Add components PDEBT        */
/*******************************/

if (pdebt1 >= 0) then pdebtc = (pdebtc + pdebt1); 
if (secondpdebt >= 0) then pdebtc = (pdebtc + secondpdebt);
if (pdebt1 in(-1, -2, -3)) then pdebtc = -3;
else if (secondpdebt in(-1, -2, -3)) then pdebtc = -3;

/****************************/
/* Compute IRA              */
/****************************/

/******************************************/
/* IRA Component - ira1                   */
/******************************************/

if (fa_8 = 1 & fa_8d_trunc_01 >= 0) then ira1 = (ira1 + fa_8d_trunc_01);
 else if (fa_8 = 1 & fa_8d_trunc_01 in(-1, -2) & fa_8d_sr000001_01 < 0 & fa_8d_sr000002_01 < 0 
 & fa_8d_uab_a_01 < 0 & fa_8d_uab_b_01 < 0 & fa_8d_uab_c_01 < 0) then ira1 = fa_8d_trunc_01;
  else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 >= 0 & fa_8d_sr000002_01 = fa_8d_sr000001_01) then 
  ira1 = (ira1 + fa_8d_sr000001_01);
   else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 >= 0 & fa_8d_sr000002_01 > fa_8d_sr000001_01) then 
   ira1 = (ira1 + (((fa_8d_sr000002_01 - fa_8d_sr000001_01)/2) + fa_8d_sr000001_01));
    else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 >= 0 & fa_8d_sr000002_01 < fa_8d_sr000001_01) then 
    ira1 = (ira1 + (((fa_8d_sr000001_01 - fa_8d_sr000002_01)/2) + fa_8d_sr000002_01));
     else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_b_01 = 0) then ira1 = (ira1 + quartile1);
      else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_b_01 = 1) then ira1 = (ira1 + quartile2);
       else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_c_01 = 0) then ira1 = (ira1 + quartile3);
        else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_c_01 = 1) then ira1 = (ira1 + 80000);
         else if (fa_8d_uab_a_01 in(-1, -2) | fa_8d_uab_b_01 in(-1, -2) | fa_8d_uab_c_01 in(-1, -2)) then ira1 = -3;

/******************************************/
/* IRA Component - ira2                   */
/******************************************/

if (fa_8 = 1 & fa_8d_trunc_02 >= 0) then ira2 = (ira2 + fa_8d_trunc_02);
 else if (fa_8 = 1 & fa_8d_trunc_02 in(-1, -2) & fa_8d_sr000001_02 < 0 & fa_8d_sr000002_02 < 0 
 & fa_8d_uab_a_02 < 0 & fa_8d_uab_b_02 < 0 & fa_8d_uab_c_02 < 0) then ira2 = fa_8d_trunc_02;
  else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 >= 0 & fa_8d_sr000002_02 = fa_8d_sr000001_02) then 
  ira2 = (ira2 + fa_8d_sr000001_02);
   else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 >= 0 & fa_8d_sr000002_02 > fa_8d_sr000001_02) then 
   ira2 = (ira2 + (((fa_8d_sr000002_02 - fa_8d_sr000001_02)/2) + fa_8d_sr000001_02));
    else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 >= 0 & fa_8d_sr000002_02 < fa_8d_sr000001_02) then 
    ira2 = (ira2 + (((fa_8d_sr000001_02 - fa_8d_sr000002_02)/2) + fa_8d_sr000002_02));
     else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_b_02 = 0) then ira2 = (ira2 + quartile1);
      else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_b_02 = 1) then ira2 = (ira2 + quartile2);
       else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_c_02 = 0) then ira2 = (ira2 + quartile3);
        else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_c_02 = 1) then ira2 = (ira2 + 55000);
         else if (fa_8d_uab_a_02 in(-1, -2) | fa_8d_uab_b_02 in(-1, -2) | fa_8d_uab_c_02 in(-1, -2)) then ira2 = -3;
 
/******************************************/
/* IRA Component - ira3                   */
/******************************************/

if (fa_8 = 1 & fa_8d_03 >= 0) then ira3 = (ira3 + fa_8d_03);
  else if (fa_8 = 1 & fa_8d_03 in(-1, -2) & fa_8d_sr000001_03 < 0 & fa_8d_sr000002_03 < 0 
  & fa_8d_uab_a_03 < 0 & fa_8d_uab_c_03 < 0) then ira3 = fa_8d_03;
    else if (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_03 >= 0 & fa_8d_sr000002_03 = fa_8d_sr000001_03) then 
    ira3 = (ira3 + fa_8d_sr000001_03);
     else if (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_03 >= 0 & fa_8d_sr000002_03 > fa_8d_sr000001_03) then 
     ira3 = (ira3 + (((fa_8d_sr000002_03 - fa_8d_sr000001_03)/2) + fa_8d_sr000001_03));
      else if (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_03 >= 0 & fa_8d_sr000002_03 < fa_8d_sr000001_03) then 
      ira3 = (ira3 + (((fa_8d_sr000001_03 - fa_8d_sr000002_03)/2) + fa_8d_sr000002_03));
       else if (fa_8d_03 in(-1, -2, -4) & fa_8d_uab_c_03 = 0) then ira3 = (ira3 + quartile3);
        else if (fa_8d_03 in(-1, -2, -4) & fa_8d_uab_c_03 = 1) then ira3 = (ira3 + 100000);
         else if (fa_8d_uab_a_03 in(-1, -2) | fa_8d_uab_c_03 in(-1, -2)) then ira3 = -3;

/******************************************/
/* IRA Component - ira4                   */
/******************************************/

if (fa_8 = 1 & fa_8d_04 >= 0) then ira4 = (ira4 + fa_8d_04);
  else if (fa_8 = 1 & fa_8d_04 in(-1, -2) & fa_8d_sr000001_04 < 0 & fa_8d_sr000002_04 < 0 
  & fa_8d_uab_a_04 < 0 & fa_8d_uab_c_04 < 0) then ira4 = fa_8d_04;
    else if (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_04 >= 0 & fa_8d_sr000002_04 = fa_8d_sr000001_04) then 
    ira4 = (ira4 + fa_8d_sr000001_04);
     else if (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_04 >= 0 & fa_8d_sr000002_04 > fa_8d_sr000001_04) then 
     ira4 = (ira4 + (((fa_8d_sr000002_04 - fa_8d_sr000001_04)/2) + fa_8d_sr000001_04));
      else if (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_04 >= 0 & fa_8d_sr000002_04 < fa_8d_sr000001_04) then 
      ira4 = (ira4 + (((fa_8d_sr000001_04 - fa_8d_sr000002_04)/2) + fa_8d_sr000002_04));
       else if (fa_8d_04 in(-1, -2, -4) & fa_8d_uab_c_04 = 0) then ira4 = (ira4 + quartile3);
        else if (fa_8d_04 in(-1, -2, -4) & fa_8d_uab_c_04 = 1) then ira4 = (ira4 + 115000);
         else if (fa_8d_uab_a_04 in(-1, -2) | fa_8d_uab_c_04 in(-1, -2)) then ira4 = -3;

/******************************************/
/* IRA Component - ira5                   */
/******************************************/

if (fa_8 = 1 & fa_8d_trunc_05 >= 0) then ira5 = (ira5 + fa_8d_trunc_05);
  else if (fa_8 = 1 & fa_8d_trunc_05 in(-1, -2) & fa_8d_sr000001_05 < 0 & fa_8d_sr000002_05 < 0 
  & fa_8d_uab_a_05 < 0 & fa_8d_uab_c_05 < 0) then ira5 = fa_8d_trunc_05;
    else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 >= 0 & fa_8d_sr000002_05 = fa_8d_sr000001_05) then 
    ira5 = (ira5 + fa_8d_sr000001_05);
     else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 >= 0 & fa_8d_sr000002_05 > fa_8d_sr000001_05) then 
     ira5 = (ira5 + (((fa_8d_sr000002_05 - fa_8d_sr000001_05)/2) + fa_8d_sr000001_05));
      else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 >= 0 & fa_8d_sr000002_05 < fa_8d_sr000001_05) then 
      ira5 = (ira5 + (((fa_8d_sr000001_05 - fa_8d_sr000002_05)/2) + fa_8d_sr000002_05));
       else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_c_05 = 0) then ira5 = (ira5 + quartile3);
        else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_c_05 = 1) then ira5 = (ira5 + 65000);
         else if (fa_8d_uab_a_05 in(-1, -2) | fa_8d_uab_c_05 in(-1, -2)) then ira5 = -3;
 
/******************************************/
/* IRA Component - ira6                   */
/******************************************/

if (fa_8 = 1 & fa_8d_06 >= 0) then ira6 = (ira6 + fa_8d_06);
  else if (fa_8 = 1 & fa_8d_06 in(-1, -2) & fa_8d_sr000001_06 < 0 & fa_8d_sr000002_06 < 0 
  & fa_8d_uab_a_06 < 0 & fa_8d_uab_b_06 < 0 & fa_8d_uab_c_06 < 0) then ira6 = fa_8d_06;
    else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 >= 0 & fa_8d_sr000002_06 = fa_8d_sr000001_06) then 
    ira6 = (ira6 + fa_8d_sr000001_06);
     else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 >= 0 & fa_8d_sr000002_06 > fa_8d_sr000001_06) then 
     ira6 = (ira6 + (((fa_8d_sr000002_06 - fa_8d_sr000001_06)/2) + fa_8d_sr000001_06));
      else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 >= 0 & fa_8d_sr000002_06 < fa_8d_sr000001_06) then 
      ira6 = (ira6 + (((fa_8d_sr000001_06 - fa_8d_sr000002_06)/2) + fa_8d_sr000002_06));
       else if (fa_8d_06 in(-1, -2, -4) & fa_8d_uab_b_06 = 0) then ira6 = (ira6 + quartile1);
        else if (fa_8d_06 in(-1, -2, -4) & fa_8d_uab_b_06 = 1) then ira6 = (ira6 + quartile2);
         else if (fa_8d_06 in(-1, -2, -4) & fa_8d_uab_c_06 = 0) then ira6 = (ira6 + quartile3);
          else if (fa_8d_06 in(-1, -2, -4) & fa_8d_uab_c_06 = 1) then ira6 = (ira6 + 59000);
           else if (fa_8d_uab_a_06 in(-1, -2) | fa_8d_uab_b_06 in(-1, -2) | fa_8d_uab_c_06 in(-1, -2)) then ira6 = -3;
 
/******************************************/
/* IRA Component - ira7                   */
/******************************************/

if (fa_8 = 1 & fa_8d_trunc_07 >= 0) then ira7 = (ira7 + fa_8d_trunc_07);
  else if (fa_8 = 1 & fa_8d_trunc_07 in(-1, -2) & fa_8d_sr000001_07 < 0 & fa_8d_sr000002_07 < 0 
  & fa_8d_uab_a_07 < 0 & fa_8d_uab_b_07 < 0 & fa_8d_uab_c_07 < 0) then ira7 = fa_8d_trunc_07;
    else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 >= 0 & fa_8d_sr000002_07 = fa_8d_sr000001_07) then 
    ira7 = (ira7 + fa_8d_sr000001_07);
     else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 >= 0 & fa_8d_sr000002_07 > fa_8d_sr000001_07) then 
     ira7 = (ira7 + (((fa_8d_sr000002_07 - fa_8d_sr000001_07)/2) + fa_8d_sr000001_07));
      else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 >= 0 & fa_8d_sr000002_07 < fa_8d_sr000001_07) then 
      ira7 = (ira7 + (((fa_8d_sr000001_07 - fa_8d_sr000002_07)/2) + fa_8d_sr000002_07));
       else if (fa_8d_trunc_07 in(-1, -2, -4) & fa_8d_uab_b_07 = 0) then ira7 = (ira7 + quartile1);
        else if (fa_8d_trunc_07 in(-1, -2, -4) & fa_8d_uab_b_07 = 1) then ira7 = (ira7 + quartile2);
         else if (fa_8d_trunc_07 in(-1, -2, -4) & fa_8d_uab_c_07 = 0) then ira7 = (ira7 + quartile3);
          else if (fa_8d_trunc_07 in(-1, -2, -4) & fa_8d_uab_c_07 = 1) then ira7 = (ira7 + 65000);
           else if (fa_8d_uab_a_07 in(-1, -2) | fa_8d_uab_b_07 in(-1, -2) | fa_8d_uab_c_07 in(-1, -2)) then ira7 = -3;
 
/*******************************/
/* Add components IRA          */
/*******************************/

if (ira1 >= 0) then irac = (irac + ira1); 
if (ira2 >= 0) then irac = (irac + ira2); 
if (ira3 >= 0) then irac = (irac + ira3); 
if (ira4 >= 0) then irac = (irac + ira4); 
if (ira5 >= 0) then irac = (irac + ira5); 
if (ira6 >= 0) then irac = (irac + ira6); 
if (ira7 >= 0) then irac = (irac + ira7); 
if (ira1 in(-1, -2, -3)) then irac = -3;
else if (ira2 in(-1, -2, -3)) then irac = -3;
else if (ira3 in(-1, -2, -3)) then irac = -3;
else if (ira4 in(-1, -2, -3)) then irac = -3;
else if (ira5 in(-1, -2, -3)) then irac = -3;
else if (ira6 in(-1, -2, -3)) then irac = -3;
else if (ira7 in(-1, -2, -3)) then irac = -3;

/****************************/
/* Compute A401K            */
/****************************/

/******************************************/
/* A401K component - r_401k               */
/******************************************/

if (fa_6b = 1 & fa_6e_trunc >= 0) then r_401k = (r_401k + fa_6e_trunc);
 else if (fa_6b = 1 & fa_6e_ref_1 = 1 & fa_6e_sr000001 < 0 & fa_6e_sr000002 < 0 
 & fa_6e_uab_a < 0 & fa_6e_uab_b < 0 & fa_6e_uab_c < 0) then r_401k = -1;
  else if (fa_6b = 1 & fa_6e_trunc in(-1, -2) & fa_6e_sr000001 < 0 & fa_6e_sr000002 < 0 
  & fa_6e_uab_a < 0 & fa_6e_uab_b < 0 & fa_6e_uab_c < 0) then r_401k = fa_6e_trunc;
   else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 = fa_6e_sr000001) then 
    r_401k = (r_401k + fa_6e_sr000001);
     else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 > fa_6e_sr000001) then 
     r_401k = (r_401k + (((fa_6e_sr000002 - fa_6e_sr000001)/2) + fa_6e_sr000001));
      else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 < fa_6e_sr000001) then 
      r_401k = (r_401k + (((fa_6e_sr000001 - fa_6e_sr000002)/2) + fa_6e_sr000002));
       else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_b = 0) then r_401k = (r_401k + quartile1);
        else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_b = 1) then r_401k = (r_401k + quartile2);
         else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_c = 0) then r_401k = (r_401k + quartile3);
          else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_c = 1) then r_401k = (r_401k + 80000);
           else if (fa_6e_uab_a in(-1, -2) | fa_6e_uab_b in(-1, -2) | fa_6e_uab_c in(-1, -2)) then r_401k = -3;

/******************************************/
/* A401K component - sp_401k              */
/******************************************/

if (fa_7 = 1 & fa_7c_trunc >= 0) then sp_401k = (sp_401k + fa_7c_trunc);
 else if (fa_7 = 1 & fa_7c_ref_1 = 1 & fa_7c_sr000001 < 0 & fa_7c_sr000002_trunc < 0 
 & fa_7c_uab_a < 0 & fa_7c_uab_b < 0 & fa_7c_uab_c < 0) then sp_401k = -1;
  else if (fa_7 = 1 & fa_7c_trunc in(-1, -2) & fa_7c_sr000001 < 0 & fa_7c_sr000002_trunc < 0 
  & fa_7c_uab_a < 0 & fa_7c_uab_b < 0 & fa_7c_uab_c < 0) then sp_401k = fa_7c_trunc;
    else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002_trunc >= 0 & fa_7c_sr000002_trunc = fa_7c_sr000001) then 
    sp_401k = (sp_401k + fa_7c_sr000001);
     else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002_trunc >= 0 & fa_7c_sr000002_trunc > fa_7c_sr000001) then 
     sp_401k = (sp_401k + (((fa_7c_sr000002_trunc - fa_7c_sr000001)/2) + fa_7c_sr000001));
      else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002_trunc >= 0 & fa_7c_sr000002_trunc < fa_7c_sr000001) then 
      sp_401k = (sp_401k + (((fa_7c_sr000001 - fa_7c_sr000002_trunc)/2) + fa_7c_sr000002_trunc));
       else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_b = 0) then sp_401k = (sp_401k + quartile1);
        else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_b = 1) then sp_401k = (sp_401k + quartile2);
         else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_c = 0) then sp_401k = (sp_401k + quartile3);
          else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_c = 1) then sp_401k = (sp_401k + 94500);
           else if (fa_7c_uab_a in(-1, -2) | fa_7c_uab_b in(-1, -2) | fa_7c_uab_c in(-1, -2)) then sp_401k = -3;

/*******************************/
/* Add components A401K        */
/*******************************/

if (r_401k >= 0) then a401kc = (a401kc + r_401k); 
if (sp_401k >= 0) then a401kc = (a401kc + sp_401k); 
if (r_401k in(-1, -2, -3)) then a401kc = -3;
else if (sp_401k in(-1, -2, -3)) then a401kc = -3;

/****************************/
/* Compute CDEBT            */
/****************************/

/*******************************************/
/* CDEBT Component - amtowe_assetpoorcars1 */
/*******************************************/

if (sc_12b_01 >= 0) then amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + sc_12b_01);
 else if (sc_12b_01 = 1 & sc_12b_ref_1a_01 = 1 & sc_12b_sr000001_01 < 0 & sc_12b_sr000002_01 < 0) then amtowe_assetpoorcars1 = -1;
 else if (sc_12b_01 in(-1, -2) & sc_12b_sr000001_01 < 0 & sc_12b_sr000002_01 < 0) then amtowe_assetpoorcars1 = sc_12b_01;
  else if (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 >= 0 & sc_12b_sr000002_01 = sc_12b_sr000001_01) then 
  amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + sc_12b_sr000001_01);
   else if (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 >= 0 & sc_12b_sr000002_01 > sc_12b_sr000001_01) then 
   amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + (((sc_12b_sr000002_01 - sc_12b_sr000001_01)/2) + sc_12b_sr000001_01));
    else if (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 >= 0 & sc_12b_sr000002_01 < sc_12b_sr000001_01) then 
    amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + (((sc_12b_sr000001_01 - sc_12b_sr000002_01)/2) + sc_12b_sr000002_01));
 
/*******************************************/
/* CDEBT Component - amtowe_assetpoorcars2 */
/*******************************************/

if (sc_12b_02 >= 0) then amtowe_assetpoorcars2 = (amtowe_assetpoorcars2 + sc_12b_02);
 else if (sc_12b_02 = 1 & sc_12b_ref_1a_02 = 1) then amtowe_assetpoorcars2 = -1;
  else if (sc_12b_02 in(-1, -2)) then amtowe_assetpoorcars2 = sc_12b_02;

/*******************************************/
/* CDEBT Component - amtowe_assetpoorcars3 */
/*******************************************/

if (sc_12b_03 >= 0) then amtowe_assetpoorcars3 = (amtowe_assetpoorcars3 + sc_12b_03);
 else if (sc_12b_03 = 1 & sc_12b_ref_1a_03 = 1) then amtowe_assetpoorcars3 = -1;
 else if (sc_12b_03 in(-1, -2)) then amtowe_assetpoorcars3 = sc_12b_03;

/*******************************************/
/* CDEBT Component - amtowe_assetpoorcars4 */
/*******************************************/

if (sc_12b_04 >= 0) then amtowe_assetpoorcars4 = (amtowe_assetpoorcars4 + sc_12b_04);
 else if (sc_12b_04 = 1 & sc_12b_ref_1a_04 = 1) then amtowe_assetpoorcars4 = -1;
 else if (sc_12b_04 in(-1, -2)) then amtowe_assetpoorcars4 = sc_12b_04;

/*******************************************/
/* CDEBT Component - amtowe_assetpoorcars5 */
/*******************************************/

if (sc_12b_05 >= 0) then amtowe_assetpoorcars5 = (amtowe_assetpoorcars5 + sc_12b_05);
 else if (sc_12b_05 = 1 & sc_12b_ref_1a_05 = 1) then amtowe_assetpoorcars5 = -1;
 else if (sc_12b_05 in(-1, -2)) then amtowe_assetpoorcars5 = sc_12b_05;

/******************************************/
/* CDEBT Component - amountowe_vehicles1  */
/******************************************/

if (nfa_4f_trunc_01 >= 0) then amountowe_vehicles1 = (amountowe_vehicles1 + nfa_4f_trunc_01);
 else if (nfa_4f_trunc_01 in(-1, -2) & nfa_4f_sr000001_01 < 0 & nfa_4f_sr000002_01 < 0 
 & nfa_4f_uab_a_01 < 0 & nfa_4f_uab_b_01 < 0 & nfa_4f_uab_c_01 < 0) then amountowe_vehicles1 = nfa_4f_trunc_01;
   else if (nfa_4f_sr000001_01 >= 0 & nfa_4f_sr000002_01 >= 0 & nfa_4f_sr000002_01 = nfa_4f_sr000001_01) then 
   amountowe_vehicles1 = (amountowe_vehicles1 + nfa_4f_sr000001_01);
    else if (nfa_4f_sr000001_01 >= 0 & nfa_4f_sr000002_01 >= 0 & nfa_4f_sr000002_01 > nfa_4f_sr000001_01) then 
    amountowe_vehicles1 = (amountowe_vehicles1 + (((nfa_4f_sr000002_01 - nfa_4f_sr000001_01)/2) + nfa_4f_sr000001_01));
     else if (nfa_4f_sr000001_01 >= 0 & nfa_4f_sr000002_01 >= 0 & nfa_4f_sr000002_01 < nfa_4f_sr000001_01) then 
     amountowe_vehicles1 = (amountowe_vehicles1 + (((nfa_4f_sr000001_01 - nfa_4f_sr000002_01)/2) + nfa_4f_sr000002_01));
      else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_b_01 = 0) then amountowe_vehicles1 = (amountowe_vehicles1 + quartile1);
       else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_b_01 = 1) then amountowe_vehicles1 = (amountowe_vehicles1 + quartile2);
        else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_c_01 = 0) then amountowe_vehicles1 = (amountowe_vehicles1 + quartile3);
         else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_c_01 = 1) then amountowe_vehicles1 = (amountowe_vehicles1 + 38000);
          else if (nfa_4f_uab_a_01 in(-1, -2) | nfa_4f_uab_b_01 in(-1, -2) | nfa_4f_uab_c_01 in(-1, -2)) then amtowe_vehicles1 = -3;
 
/******************************************/
/* CDEBT Component - amountowe_vehicles2  */
/******************************************/

if (nfa_4f_trunc_02 >= 0) then amountowe_vehicles2 = (amountowe_vehicles2 + nfa_4f_trunc_02);
 else if (nfa_4f_trunc_02 in(-1, -2) & nfa_4f_sr000001_02 < 0 & nfa_4f_sr000002_02 < 0 
 & nfa_4f_uab_a_02 < 0 & nfa_4f_uab_b_02 < 0 & nfa_4f_uab_c_02 < 0) then amountowe_vehicles2 = nfa_4f_trunc_02;
   else if (nfa_4f_sr000001_02 >= 0 & nfa_4f_sr000002_02 >= 0 & nfa_4f_sr000002_02 = nfa_4f_sr000001_02) then 
   amountowe_vehicles2 = (amountowe_vehicles2 + nfa_4f_sr000001_02);
    else if (nfa_4f_sr000001_02 >= 0 & nfa_4f_sr000002_02 >= 0 & nfa_4f_sr000002_02 > nfa_4f_sr000001_02) then 
    amountowe_vehicles2 = (amountowe_vehicles2 + (((nfa_4f_sr000002_02 - nfa_4f_sr000001_02)/2) + nfa_4f_sr000001_02));
     else if (nfa_4f_sr000001_02 >= 0 & nfa_4f_sr000002_02 >= 0 & nfa_4f_sr000002_02 < nfa_4f_sr000001_02) then 
     amountowe_vehicles2 = (amountowe_vehicles2 + (((nfa_4f_sr000001_02 - nfa_4f_sr000002_02)/2) + nfa_4f_sr000002_02));
      else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_b_02 = 0) then amountowe_vehicles2 = (amountowe_vehicles2 + quartile1);
       else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_b_02 = 1) then amountowe_vehicles2 = (amountowe_vehicles2 + quartile2);
        else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_c_02 = 0) then amountowe_vehicles2 = (amountowe_vehicles2 + quartile3);
         else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_c_02 = 1) then amountowe_vehicles2 = (amountowe_vehicles2 + 36000);
          else if (nfa_4f_uab_a_02 in(-1, -2) | nfa_4f_uab_b_02 in(-1, -2) | nfa_4f_uab_c_02 in(-1, -2)) then amtowe_vehicles2 = -3;
 
/******************************************/
/* CDEBT Component - amountowe_vehicles3  */
/******************************************/

if (nfa_4f_trunc_03 >= 0) then amountowe_vehicles3 = (amountowe_vehicles3 + nfa_4f_trunc_03);
 else if (nfa_4f_trunc_03 in(-1, -2) & nfa_4f_sr000001_03 < 0 & nfa_4f_sr000002_03 < 0 
 & nfa_4f_uab_a_03 < 0 & nfa_4f_uab_b_03 < 0 & nfa_4f_uab_c_03 < 0) then amountowe_vehicles3 = nfa_4f_trunc_03;
   else if (nfa_4f_sr000001_03 >= 0 & nfa_4f_sr000002_03 >= 0 & nfa_4f_sr000002_03 = nfa_4f_sr000001_03) then 
   amountowe_vehicles3 = (amountowe_vehicles3 + nfa_4f_sr000001_03);
    else if (nfa_4f_sr000001_03 >= 0 & nfa_4f_sr000002_03 >= 0 & nfa_4f_sr000002_03 > nfa_4f_sr000001_03) then 
    amountowe_vehicles3 = (amountowe_vehicles3 + (((nfa_4f_sr000002_03 - nfa_4f_sr000001_03)/2) + nfa_4f_sr000001_03));
     else if (nfa_4f_sr000001_03 >= 0 & nfa_4f_sr000002_03 >= 0 & nfa_4f_sr000002_03 < nfa_4f_sr000001_03) then 
     amountowe_vehicles3 = (amountowe_vehicles3 + (((nfa_4f_sr000001_03 - nfa_4f_sr000002_03)/2) + nfa_4f_sr000002_03));
      else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_b_03 = 0) then amountowe_vehicles3 = (amountowe_vehicles3 + quartile1);
       else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_b_03 = 1) then amountowe_vehicles3 = (amountowe_vehicles3 + quartile2);
        else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_c_03 = 0) then amountowe_vehicles3 = (amountowe_vehicles3 + quartile3);
         else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_c_03 = 1) then amountowe_vehicles3 = (amountowe_vehicles3 + 35000);
          else if (nfa_4f_uab_a_03 in(-1, -2) | nfa_4f_uab_b_03 in(-1, -2) | nfa_4f_uab_c_03 in(-1, -2)) then amtowe_vehicles3 = -3;
 
/******************************************/
/* CDEBT Component - amountowe_vehicles4  */
/******************************************/

if (nfa_4f_04 >= 0) then amountowe_vehicles4 = (amountowe_vehicles4 + nfa_4f_04);
 else if (nfa_4f_04 in(-1, -2) & nfa_4f_sr000001_04 < 0 & nfa_4f_sr000002_04 < 0 
 & nfa_4f_uab_a_04 < 0 & nfa_4f_uab_b_04 < 0 & nfa_4f_uab_c_04 < 0) then amountowe_vehicles4 = nfa_4f_04;
  else if (nfa_4f_sr000001_04 >= 0 & nfa_4f_sr000002_04 >= 0 & nfa_4f_sr000002_04 = nfa_4f_sr000001_04) then 
  amountowe_vehicles4 = (amountowe_vehicles4 + nfa_4f_sr000001_04);
   else if (nfa_4f_sr000001_04 >= 0 & nfa_4f_sr000002_04 >= 0 & nfa_4f_sr000002_04 > nfa_4f_sr000001_04) then 
   amountowe_vehicles4 = (amountowe_vehicles4 + (((nfa_4f_sr000002_04 - nfa_4f_sr000001_04)/2) + nfa_4f_sr000001_04));
    else if (nfa_4f_sr000001_04 >= 0 & nfa_4f_sr000002_04 >= 0 & nfa_4f_sr000002_04 < nfa_4f_sr000001_04) then 
    amountowe_vehicles4 = (amountowe_vehicles4 + (((nfa_4f_sr000001_04 - nfa_4f_sr000002_04)/2) + nfa_4f_sr000002_04));
     else if (nfa_4f_04 in(-1, -2, -4) & nfa_4f_uab_b_04 = 0) then amountowe_vehicles4 = (amountowe_vehicles4 + quartile1);
      else if (nfa_4f_04 in(-1, -2, -4) & nfa_4f_uab_b_04 = 1) then amountowe_vehicles4 = (amountowe_vehicles4 + quartile2);
       else if (nfa_4f_04 in(-1, -2, -4) & nfa_4f_uab_c_04 = 0) then amountowe_vehicles4 = (amountowe_vehicles4 + quartile3);
        else if (nfa_4f_04 in(-1, -2, -4) & nfa_4f_uab_c_04 = 1) then amountowe_vehicles4 = (amountowe_vehicles4 + 30000);
          else if (nfa_4f_uab_a_04 in(-1, -2) | nfa_4f_uab_b_04 in(-1, -2) | nfa_4f_uab_c_04 in(-1, -2)) then amtowe_vehicles4 = -3;
 
/******************************************/
/* CDEBT Component - amountowe_vehicles5  */
/******************************************/

if (nfa_4f_trunc_05 >= 0) then amountowe_vehicles5 = (amountowe_vehicles5 + nfa_4f_trunc_05);
 else if (nfa_4f_trunc_05 in(-1, -2) & nfa_4f_sr000001_05 < 0 & nfa_4f_sr000002_05 < 0 
 & nfa_4f_uab_a_05 < 0 & nfa_4f_uab_c_05 < 0) then amountowe_vehicles5 = nfa_4f_trunc_05;
  else if (nfa_4f_sr000001_05 >= 0 & nfa_4f_sr000002_05 >= 0 & nfa_4f_sr000002_05 = nfa_4f_sr000001_05) then 
  amountowe_vehicles5 = (amountowe_vehicles5 + nfa_4f_sr000001_05);
   else if (nfa_4f_sr000001_05 >= 0 & nfa_4f_sr000002_05 >= 0 & nfa_4f_sr000002_05 > nfa_4f_sr000001_05) then 
   amountowe_vehicles5 = (amountowe_vehicles5 + (((nfa_4f_sr000002_05 - nfa_4f_sr000001_05)/2) + nfa_4f_sr000001_05));
    else if (nfa_4f_sr000001_05 >= 0 & nfa_4f_sr000002_05 >= 0 & nfa_4f_sr000002_05 < nfa_4f_sr000001_05) then 
    amountowe_vehicles5 = (amountowe_vehicles5 + (((nfa_4f_sr000001_05 - nfa_4f_sr000002_05)/2) + nfa_4f_sr000002_05));
     else if (nfa_4f_trunc_05 in(-1, -2, -4) & nfa_4f_uab_c_05 = 0) then amountowe_vehicles5 = (amountowe_vehicles5 + quartile3);
      else if (nfa_4f_trunc_05 in(-1, -2, -4) & nfa_4f_uab_c_05 = 1) then amountowe_vehicles5 = (amountowe_vehicles5 + 122000);
        else if (nfa_4f_uab_a_05 in(-1, -2) | nfa_4f_uab_c_05 in(-1, -2)) then amtowe_vehicles5 = -3;
 
/******************************************/
/* CDEBT Component - amountowe_vehicles6  */
/******************************************/

if (nfa_4f_06 >= 0) then amountowe_vehicles6 = (amountowe_vehicles6 + nfa_4f_06);
 else if (nfa_4f_06 in(-1, -2)) then amountowe_vehicles6 = nfa_4f_06;

/******************************************/
/* CDEBT Component - amountowe_vehicles7  */
/******************************************/

if (nfa_4f_07 >= 0) then amountowe_vehicles7 = (amountowe_vehicles7 + nfa_4f_07);
 else if (nfa_4f_07 in(-1, -2)) then amountowe_vehicles7 = nfa_4f_07;

/*******************************************/
/* CDEBT Component - amtowe_othervehicles  */
/*******************************************/

if (nfa_5 = 1 & nfa_5b_trunc >= 0) then amtowe_othervehicles = (amtowe_othervehicles + nfa_5b_trunc);
 else if (nfa_5 = 1 & nfa_5b_trunc in(-1, -2) & nfa_5b_sr000001 < 0 & nfa_5b_sr000002 < 0
 & nfa_5b_uab_a < 0 & nfa_5b_uab_c < 0) then amtowe_othervehicles = nfa_5b_trunc;
   else if (nfa_5b_sr000001 >= 0 & nfa_5b_sr000002 >= 0 & nfa_5b_sr000002 = nfa_5b_sr000001) then 
   amtowe_othervehicles = (amtowe_othervehicles + nfa_5b_sr000001);
    else if (nfa_5b_sr000001 >= 0 & nfa_5b_sr000002 >= 0 & nfa_5b_sr000002 > nfa_5b_sr000001) then 
    amtowe_othervehicles = (amtowe_othervehicles + (((nfa_5b_sr000002 - nfa_5b_sr000001)/2) + nfa_5b_sr000001));
     else if (nfa_5b_sr000001 >= 0 & nfa_5b_sr000002 >= 0 & nfa_5b_sr000002 < nfa_5b_sr000001) then 
     amtowe_othervehicles = (amtowe_othervehicles + (((nfa_5b_sr000001 - nfa_5b_sr000002)/2) + nfa_5b_sr000002));
      else if (nfa_5b_trunc in(-1, -2, -4) & nfa_5b_uab_c = 0) then amtowe_othervehicles = (amtowe_othervehicles + quartile3);
       else if (nfa_5b_trunc in(-1, -2, -4) & nfa_5b_uab_c = 1) then amtowe_othervehicles = (amtowe_othervehicles + 51000);
        else if (nfa_5b_uab_a in(-1, -2) | nfa_5b_uab_c in(-1, -2)) then amtowe_othervehicles = -3;
 
/*******************************/
/* Add components CDEBT        */
/*******************************/

if (amtowe_assetpoorcars1 >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars1); 
if (amtowe_assetpoorcars2 >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars2); 
if (amtowe_assetpoorcars3 >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars3); 
if (amtowe_assetpoorcars4 >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars4); 
if (amtowe_assetpoorcars5 >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars5); 
if (amountowe_vehicles1 >= 0) then cdebtc = (cdebtc + amountowe_vehicles1); 
if (amountowe_vehicles2 >= 0) then cdebtc = (cdebtc + amountowe_vehicles2); 
if (amountowe_vehicles3 >= 0) then cdebtc = (cdebtc + amountowe_vehicles3); 
if (amountowe_vehicles4 >= 0) then cdebtc = (cdebtc + amountowe_vehicles4); 
if (amountowe_vehicles5 >= 0) then cdebtc = (cdebtc + amountowe_vehicles5); 
if (amountowe_vehicles6 >= 0) then cdebtc = (cdebtc + amountowe_vehicles6); 
if (amountowe_vehicles7 >= 0) then cdebtc = (cdebtc + amountowe_vehicles7);
if (amtowe_othervehicles >= 0) then cdebtc = (cdebtc + amtowe_othervehicles);

if (amtowe_assetpoorcars1 in(-1, -2, -3)) then cdebtc = -3; 
else if (amtowe_assetpoorcars2 in(-1, -2, -3)) then cdebtc = -3; 
else if (amtowe_assetpoorcars3 in(-1, -2, -3)) then cdebtc = -3; 
else if (amtowe_assetpoorcars4 in(-1, -2, -3)) then cdebtc = -3; 
else if (amtowe_assetpoorcars5 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles1 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles2 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles3 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles4 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles5 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles6 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles7 in(-1, -2, -3)) then cdebtc = -3; 
else if (amtowe_othervehicles in(-1, -2, -3)) then cdebtc = -3;

/****************************/
/* Compute CAR              */
/****************************/
/******************************************/
/* CAR Component - mktval_assetpoorcars1  */
/******************************************/

if (sc_12a_01 >= 0) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + sc_12a_01);
 else if (sc_12a_ref_1a_01 = 1 & sc_12a_sr000001_01 < 0 & sc_12a_sr000002_01 < 0 
 & sc_12a_uab_a_01 < 0 & sc_12a_uab_b_01 < 0) then mktval_assetpoorcars1 = -1;
  else if (sc_12a_01 in(-1, -2) & sc_12a_sr000001_01 < 0 & sc_12a_sr000002_01 < 0 
  & sc_12a_uab_a_01 < 0 & sc_12a_uab_b_01 < 0) then mktval_assetpoorcars1 = sc_12a_01;
    else if (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 >= 0 & sc_12a_sr000002_01 = sc_12a_sr000001_01) then 
    mktval_assetpoorcars1 = (mktval_assetpoorcars1 + sc_12a_sr000001_01);
     else if (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 >= 0 & sc_12a_sr000002_01 > sc_12a_sr000001_01) then 
     mktval_assetpoorcars1 = (mktval_assetpoorcars1 + (((sc_12a_sr000002_01 - sc_12a_sr000001_01)/2) + sc_12a_sr000001_01));
      else if (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 >= 0 & sc_12a_sr000002_01 < sc_12a_sr000001_01) then 
      mktval_assetpoorcars1 = (mktval_assetpoorcars1 + (((sc_12a_sr000001_01 - sc_12a_sr000002_01)/2) + sc_12a_sr000001_02));
       else if (sc_12a_01 in(-1, -2, -4) & sc_12a_uab_b_01 = 0) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + quartile1);
        else if (sc_12a_01 in(-1, -2, -4) & sc_12a_uab_b_01 = 1) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + quartile2);
         else if (sc_12a_uab_a_01 in(-1, -2) | sc_12a_uab_b_01 in(-1, -2)) then mktval_assetpoorcars1 = -3;

/******************************************/
/* CAR Component - mktval_assetpoorcars2  */
/******************************************/

if (sc_12a_02 >= 0) then mktval_assetpoorcars2 = (mktval_assetpoorcars2 + sc_12a_02);
 else if (sc_12a_02 = 1 & sc_12a_ref_1a_02 = 1 & sc_12a_sr000001_02 < 0 & sc_12a_sr000002_02 < 0) then mktval_assetpoorcars2 = -1;
 else if (sc_12a_02 in(-1, -2) & sc_12a_sr000001_02 < 0 & sc_12a_sr000002_02 < 0) then mktval_assetpoorcars2 = sc_12a_02;
   else if (sc_12a_sr000001_02 >= 0 & sc_12a_sr000002_02 >= 0 & sc_12a_sr000002_02 = sc_12a_sr000001_02) then 
   mktval_assetpoorcars2 = (mktval_assetpoorcars2 + sc_12a_sr000001_02);
    else if (sc_12a_sr000001_02 >= 0 & sc_12a_sr000002_02 >= 0 & sc_12a_sr000002_02 > sc_12a_sr000001_02) then 
    mktval_assetpoorcars2 = (mktval_assetpoorcars2 + (((sc_12a_sr000002_02 - sc_12a_sr000001_02)/2) + sc_12a_sr000001_02));
     else if (sc_12a_sr000001_02 >= 0 & sc_12a_sr000002_02 >= 0 & sc_12a_sr000002_02 < sc_12a_sr000001_02) then 
     mktval_assetpoorcars2 = (mktval_assetpoorcars2 + (((sc_12a_sr000001_02 - sc_12a_sr000002_02)/2) + sc_12a_sr000002_02));

/******************************************/
/* CAR Component - mktval_assetpoorcars3  */
/******************************************/

if (sc_12a_03 >= 0) then mktval_assetpoorcars3 = (mktval_assetpoorcars3 + sc_12a_03);
 else if (sc_12a_03 = 1 & sc_12a_ref_1a_03 = 1) then mktval_assetpoorcars3 = -1;
  else if (sc_12a_03 in(-1, -2)) then mktval_assetpoorcars3 = sc_12a_03;

/******************************************/
/* CAR Component - mktval_assetpoorcars4  */
/******************************************/

if (sc_12a_04 >= 0) then mktval_assetpoorcars4 = (mktval_assetpoorcars4 + sc_12a_04);
 else if (sc_12a_04 = 1 & sc_12a_ref_1a_04 = 1) then mktval_assetpoorcars4 = -1;
  else if (sc_12a_04 in(-1, -2)) then mktval_assetpoorcars4 = sc_12a_04;

/******************************************/
/* CAR Component - mktval_assetpoorcars5  */
/******************************************/

if (sc_12a_05 >= 0) then mktval_assetpoorcars5 = (mktval_assetpoorcars5 + sc_12a_05);
 else if (sc_12a_05 = 1 & sc_12a_ref_1a_05 = 1) then mktval_assetpoorcars5 = -1;
  else if (sc_12a_05 in(-1, -2)) then mktval_assetpoorcars5 = sc_12a_05;

/******************************************/
/* CAR Component - marketvalue_vehicles1  */
/******************************************/

if (nfa_4c_trunc_01 >= 0) then marketvalue_vehicles1 = (marketvalue_vehicles1 + nfa_4c_trunc_01);
 else if (nfa_4c_trunc_01 in(-1, -2) & nfa_4c_sr000001_01 < 0 & nfa_4c_sr000002_01 < 0 
 & nfa_4c_uab_a_01 < 0 & nfa_4c_uab_b_01 < 0 & nfa_4c_uab_c_01 < 0) then marketvalue_vehicles1 = nfa_4c_trunc_01;
   else if (nfa_4c_sr000001_01 >= 0 & nfa_4c_sr000002_01 >= 0 & nfa_4c_sr000002_01 = nfa_4c_sr000001_01) then 
   marketvalue_vehicles1 = (marketvalue_vehicles1 + nfa_4c_sr000001_01);
    else if (nfa_4c_sr000001_01 >= 0 & nfa_4c_sr000002_01 >= 0 & nfa_4c_sr000002_01 > nfa_4c_sr000001_01) then 
    marketvalue_vehicles1 = (marketvalue_vehicles1 + (((nfa_4c_sr000002_01 - nfa_4c_sr000001_01)/2) + nfa_4c_sr000001_01));
     else if (nfa_4c_sr000001_01 >= 0 & nfa_4c_sr000002_01 >= 0 & nfa_4c_sr000002_01 < nfa_4c_sr000001_01) then 
     marketvalue_vehicles1 = (marketvalue_vehicles1 + (((nfa_4c_sr000001_01 - nfa_4c_sr000002_01)/2) + nfa_4c_sr000002_01));
      else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_b_01 = 0) then marketvalue_vehicles1 = (marketvalue_vehicles1 + quartile1);
       else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_b_01 = 1) then marketvalue_vehicles1 = (marketvalue_vehicles1 + quartile2);
        else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_c_01 = 0) then marketvalue_vehicles1 = (marketvalue_vehicles1 + quartile3);
         else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_c_01 = 1) then marketvalue_vehicles1 = (marketvalue_vehicles1 + 40000);
          else if (nfa_4c_uab_a_01 in(-1, -2) | nfa_4c_uab_b_01 in(-1, -2) | nfa_4c_uab_c_01 in(-1, -2)) then marketvalue_vehicles1 = -3;
 
/******************************************/
/* CAR Component - marketvalue_vehicles2  */
/******************************************/

if (nfa_4c_trunc_02 >= 0) then marketvalue_vehicles2 = (marketvalue_vehicles2 + nfa_4c_trunc_02);
 else if (nfa_4c_trunc_02 in(-1, -2) & nfa_4c_sr000001_02 < 0 & nfa_4c_sr000002_02 < 0 
 & nfa_4c_uab_a_02 < 0 & nfa_4c_uab_b_02 < 0 & nfa_4c_uab_c_02 < 0) then marketvalue_vehicles2 = nfa_4c_trunc_02;
   else if (nfa_4c_sr000001_02 >= 0 & nfa_4c_sr000002_02 >= 0 & nfa_4c_sr000002_02 = nfa_4c_sr000001_02) then 
   marketvalue_vehicles2 = (marketvalue_vehicles2 + nfa_4c_sr000001_02);
    else if (nfa_4c_sr000001_02 >= 0 & nfa_4c_sr000002_02 >= 0 & nfa_4c_sr000002_02 > nfa_4c_sr000001_02) then 
    marketvalue_vehicles2 = (marketvalue_vehicles2 + (((nfa_4c_sr000002_02 - nfa_4c_sr000001_02)/2) + nfa_4c_sr000001_02));
     else if (nfa_4c_sr000001_02 >= 0 & nfa_4c_sr000002_02 >= 0 & nfa_4c_sr000002_02 < nfa_4c_sr000001_02) then 
     marketvalue_vehicles2 = (marketvalue_vehicles2 + (((nfa_4c_sr000001_02 - nfa_4c_sr000002_02)/2) + nfa_4c_sr000002_02));
      else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_b_02 = 0) then marketvalue_vehicles2 = (marketvalue_vehicles2 + quartile1);
       else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_b_02 = 1) then marketvalue_vehicles2 = (marketvalue_vehicles2 + quartile2);
        else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_c_02 = 0) then marketvalue_vehicles2 = (marketvalue_vehicles2 + quartile3);
         else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_c_02 = 1) then marketvalue_vehicles2 = (marketvalue_vehicles2 + 40000);
          else if (nfa_4c_uab_a_02 in(-1, -2) | nfa_4c_uab_b_02 in(-1, -2) | nfa_4c_uab_c_02 in(-1, -2)) then marketvalue_vehicles2 = -3;
 
/******************************************/
/* CAR Component - marketvalue_vehicles3  */
/******************************************/

if (nfa_4c_trunc_03 >= 0) then marketvalue_vehicles3 = (marketvalue_vehicles3 + nfa_4c_trunc_03);
 else if (nfa_4c_trunc_03 in(-1, -2) & nfa_4c_sr000001_03 < 0 & nfa_4c_sr000002_03 < 0 
 & nfa_4c_uab_a_03 < 0 & nfa_4c_uab_b_03 < 0 & nfa_4c_uab_c_03 < 0) then marketvalue_vehicles3 = nfa_4c_trunc_03;
   else if (nfa_4c_sr000001_03 >= 0 & nfa_4c_sr000002_03 >= 0 & nfa_4c_sr000002_03 = nfa_4c_sr000001_03) then 
   marketvalue_vehicles3 = (marketvalue_vehicles3 + nfa_4c_sr000001_03);
    else if (nfa_4c_sr000001_03 >= 0 & nfa_4c_sr000002_03 >= 0 & nfa_4c_sr000002_03 > nfa_4c_sr000001_03) then 
    marketvalue_vehicles3 = (marketvalue_vehicles3 + (((nfa_4c_sr000002_03 - nfa_4c_sr000001_03)/2) + nfa_4c_sr000001_03));
     else if (nfa_4c_sr000001_03 >= 0 & nfa_4c_sr000002_03 >= 0 & nfa_4c_sr000002_03 < nfa_4c_sr000001_03) then 
     marketvalue_vehicles3 = (marketvalue_vehicles3 + (((nfa_4c_sr000001_03 - nfa_4c_sr000002_03)/2) + nfa_4c_sr000002_03));
      else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_b_03 = 0) then marketvalue_vehicles3 = (marketvalue_vehicles3 + quartile1);
       else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_b_03 = 1) then marketvalue_vehicles3 = (marketvalue_vehicles3 + quartile2);
        else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_c_03 = 0) then marketvalue_vehicles3 = (marketvalue_vehicles3 + quartile3);
         else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_c_03 = 1) then marketvalue_vehicles3 = (marketvalue_vehicles3 + 40000);
          else if (nfa_4c_uab_a_03 in(-1, -2) | nfa_4c_uab_b_03 in(-1, -2) | nfa_4c_uab_c_03 in(-1, -2)) then marketvalue_vehicles3 = -3;

/******************************************/
/* CAR Component - marketvalue_vehicles4  */
/******************************************/

if (nfa_4c_trunc_04 >= 0) then marketvalue_vehicles4 = (marketvalue_vehicles4 + nfa_4c_trunc_04);
 else if (nfa_4c_trunc_04 in(-1, -2) & nfa_4c_sr000001_04 < 0 & nfa_4c_sr000002_04 < 0 
 & nfa_4c_uab_a_04 < 0 & nfa_4c_uab_b_04 < 0 & nfa_4c_uab_c_04 < 0) then marketvalue_vehicles4 = nfa_4c_trunc_04;
   else if (nfa_4c_sr000001_04 >= 0 & nfa_4c_sr000002_04 >= 0 & nfa_4c_sr000002_04 = nfa_4c_sr000001_04) then 
   marketvalue_vehicles4 = (marketvalue_vehicles4 + nfa_4c_sr000001_04);
    else if (nfa_4c_sr000001_04 >= 0 & nfa_4c_sr000002_04 >= 0 & nfa_4c_sr000002_04 > nfa_4c_sr000001_04) then 
    marketvalue_vehicles4 = (marketvalue_vehicles4 + (((nfa_4c_sr000002_04 - nfa_4c_sr000001_04)/2) + nfa_4c_sr000001_04));
     else if (nfa_4c_sr000001_04 >= 0 & nfa_4c_sr000002_04 >= 0 & nfa_4c_sr000002_04 < nfa_4c_sr000001_04) then 
     marketvalue_vehicles4 = (marketvalue_vehicles4 + (((nfa_4c_sr000001_04 - nfa_4c_sr000002_04)/2) + nfa_4c_sr000002_04));
      else if (nfa_4c_trunc_04 in(-1, -2, -4) & nfa_4c_uab_b_04 = 0) then marketvalue_vehicles4 = (marketvalue_vehicles4 + quartile1);
       else if (nfa_4c_trunc_04 in(-1, -2, -4) & nfa_4c_uab_b_04 = 1) then marketvalue_vehicles4 = (marketvalue_vehicles4 + quartile2);
        else if (nfa_4c_trunc_04 in(-1, -2, -4) & nfa_4c_uab_c_04 = 0) then marketvalue_vehicles4 = (marketvalue_vehicles4 + quartile3);
         else if (nfa_4c_trunc_04 in(-1, -2, -4) & nfa_4c_uab_c_04 = 1) then marketvalue_vehicles4 = (marketvalue_vehicles4 + 40000);
          else if (nfa_4c_uab_a_04 in(-1, -2) | nfa_4c_uab_b_04 in(-1, -2) | nfa_4c_uab_c_04 in(-1, -2)) then marketvalue_vehicles4 = -3;

/******************************************/
/* CAR Component - marketvalue_vehicles5  */
/******************************************/

if (nfa_4c_trunc_05 >= 0) then marketvalue_vehicles5 = (marketvalue_vehicles5 + nfa_4c_trunc_05);
 else if (nfa_4c_trunc_05 in(-1, -2) & nfa_4c_sr000001_05 < 0 & nfa_4c_sr000002_05 < 0 
 & nfa_4c_uab_a_05 < 0 & nfa_4c_uab_b_05 < 0 & nfa_4c_uab_c_05 < 0) then marketvalue_vehicles5 = nfa_4c_trunc_05;
   else if (nfa_4c_sr000001_05 >= 0 & nfa_4c_sr000002_05 >= 0 & nfa_4c_sr000002_05 = nfa_4c_sr000001_05) then 
   marketvalue_vehicles5 = (marketvalue_vehicles5 + nfa_4c_sr000001_05);
    else if (nfa_4c_sr000001_05 >= 0 & nfa_4c_sr000002_05 >= 0 & nfa_4c_sr000002_05 > nfa_4c_sr000001_05) then 
    marketvalue_vehicles5 = (marketvalue_vehicles5 + (((nfa_4c_sr000002_05 - nfa_4c_sr000001_05)/2) + nfa_4c_sr000001_05));
     else if (nfa_4c_sr000001_05 >= 0 & nfa_4c_sr000002_05 >= 0 & nfa_4c_sr000002_05 < nfa_4c_sr000001_05) then 
     marketvalue_vehicles5 = (marketvalue_vehicles5 + (((nfa_4c_sr000001_05 - nfa_4c_sr000002_05)/2) + nfa_4c_sr000002_05));
      else if (nfa_4c_trunc_05 in(-1, -2, -4) & nfa_4c_uab_b_05 = 0) then marketvalue_vehicles5 = (marketvalue_vehicles5 + quartile1);
       else if (nfa_4c_trunc_05 in(-1, -2, -4) & nfa_4c_uab_b_05 = 1) then marketvalue_vehicles5 = (marketvalue_vehicles5 + quartile2);
        else if (nfa_4c_trunc_05 in(-1, -2, -4) & nfa_4c_uab_c_05 = 0) then marketvalue_vehicles5 = (marketvalue_vehicles5 + quartile3);
         else if (nfa_4c_trunc_05 in(-1, -2, -4) & nfa_4c_uab_c_05 = 1) then marketvalue_vehicles5 = (marketvalue_vehicles5 + 75000);
          else if (nfa_4c_uab_a_05 in(-1, -2) | nfa_4c_uab_b_05 in(-1, -2) | nfa_4c_uab_c_05 in(-1, -2)) then marketvalue_vehicles5 = -3;

/******************************************/
/* CAR Component - marketvalue_vehicles6  */
/******************************************/

if (nfa_4c_trunc_06 >= 0) then marketvalue_vehicles6 = (marketvalue_vehicles6 + nfa_4c_trunc_06);
 else if (nfa_4c_trunc_06 in(-1, -2) & nfa_4c_sr000001_06 < 0 & nfa_4c_sr000002_06 < 0 
 & nfa_4c_uab_a_06 < 0) then marketvalue_vehicles6 = nfa_4c_trunc_06;
  else if (nfa_4c_sr000001_06 >= 0 & nfa_4c_sr000002_06 >= 0 & nfa_4c_sr000002_06 = nfa_4c_sr000001_06) then 
  marketvalue_vehicles6 = (marketvalue_vehicles6 + nfa_4c_sr000001_06);
   else if (nfa_4c_sr000001_06 >= 0 & nfa_4c_sr000002_06 >= 0 & nfa_4c_sr000002_06 > nfa_4c_sr000001_06) then 
   marketvalue_vehicles6 = (marketvalue_vehicles6 + (((nfa_4c_sr000002_06 - nfa_4c_sr000001_06)/2) + nfa_4c_sr000001_06));
    else if (nfa_4c_sr000001_06 >= 0 & nfa_4c_sr000002_06 >= 0 & nfa_4c_sr000002_06 < nfa_4c_sr000001_06) then 
    marketvalue_vehicles6 = (marketvalue_vehicles6 + (((nfa_4c_sr000001_06 - nfa_4c_sr000002_06)/2) + nfa_4c_sr000002_06));
     else if (nfa_4c_uab_a_06 in(-1, -2)) then marketvalue_vehicles6 = -3;

/******************************************/
/* CAR Component - marketvalue_vehicles7  */
/******************************************/

if (nfa_4c_trunc_07 >= 0) then marketvalue_vehicles7 = (marketvalue_vehicles7 + nfa_4c_trunc_07);
 else if (nfa_4c_trunc_07 in(-1, -2) & nfa_4c_uab_a_07 < 0) then marketvalue_vehicles7 = nfa_4c_trunc_07;
  else if (nfa_4c_uab_a_07 in(-1, -2)) then marketvalue_vehicles7 = -3;

/******************************************/
/* CAR Component - marketvalue_vehicles8  */
/******************************************/

if (nfa_4c_08 >= 0) then marketvalue_vehicles8 = (marketvalue_vehicles8 + nfa_4c_08);
 else if (nfa_4c_08 in(-1, -2) & nfa_4c_uab_a_08 < 0) then marketvalue_vehicles8 = nfa_4c_08;
  else if (nfa_4c_uab_a_08 in(-1, -2)) then marketvalue_vehicles8 = -3;

/******************************************/
/* CAR Component - marketvalue_vehicles9  */
/******************************************/

if (nfa_4c_trunc_09 >= 0) then marketvalue_vehicles9 = (marketvalue_vehicles9 + nfa_4c_trunc_09);
 else if (nfa_4c_trunc_09 in(-1, -2) & nfa_4c_uab_a_09 < 0) then marketvalue_vehicles9 = nfa_4c_trunc_09;
  else if (nfa_4c_uab_a_09 in(-1, -2)) then marketvalue_vehicles9 = -3;

/*******************************************/
/* CAR Component - marketvalue_vehicles10  */
/*******************************************/

if (nfa_4c_trunc_10 >= 0) then marketvalue_vehicles10 = (marketvalue_vehicles10 + nfa_4c_trunc_10);
 else if (nfa_4c_trunc_10 in(-1, -2) & nfa_4c_uab_a_10 < 0) then marketvalue_vehicles10 = nfa_4c_trunc_10;
  else if (nfa_4c_uab_a_10 in(-1, -2)) then marketvalue_vehicles10 = -3;

/*******************************************/
/* CAR Component - marketvalue_vehicles11  */
/*******************************************/

if (nfa_4c_11 >= 0) then marketvalue_vehicles11 = (marketvalue_vehicles11 + nfa_4c_11);
 else if (nfa_4c_11 in(-1, -2) & nfa_4c_sr000001_11 < 0 & nfa_4c_sr000002_11 < 0
 & nfa_4c_uab_a_11 < 0 & nfa_4c_uab_c_11 < 0) then marketvalue_vehicles11 = nfa_4c_11;
  else if (nfa_4c_sr000001_11 >= 0 & nfa_4c_sr000002_11 >= 0 & nfa_4c_sr000002_11 = nfa_4c_sr000001_11) then 
  marketvalue_vehicles11 = (marketvalue_vehicles11 + nfa_4c_sr000001_11);
   else if (nfa_4c_sr000001_11 >= 0 & nfa_4c_sr000002_11 >= 0 & nfa_4c_sr000002_11 > nfa_4c_sr000001_11) then 
   marketvalue_vehicles11 = (marketvalue_vehicles11 + (((nfa_4c_sr000002_11 - nfa_4c_sr000001_11)/2) + nfa_4c_sr000001_11));
    else if (nfa_4c_sr000001_11 >= 0 & nfa_4c_sr000002_11 >= 0 & nfa_4c_sr000002_11 < nfa_4c_sr000001_11) then 
    marketvalue_vehicles11 = (marketvalue_vehicles11 + (((nfa_4c_sr000001_11 - nfa_4c_sr000002_11)/2) + nfa_4c_sr000002_11));
     else if (nfa_4c_11 in(-1, -2, -4) & nfa_4c_uab_c_11 = 0) then marketvalue_vehicles11 = (marketvalue_vehicles11 + quartile3);
      else if (nfa_4c_11 in(-1, -2, -4) & nfa_4c_uab_c_11 = 1) then marketvalue_vehicles11 = (marketvalue_vehicles11 + 30000);
       else if (nfa_4c_uab_a_11 in(-1, -2) | nfa_4c_uab_c_11 in(-1, -2)) then marketvalue_vehicles11 = -3;

/*******************************************/
/* CAR Component - marketvalue_vehicles12  */
/*******************************************/

if (nfa_4c_trunc_12 >= 0) then marketvalue_vehicles12 = (marketvalue_vehicles12 + nfa_4c_trunc_12);
 else if (nfa_4c_trunc_12 in(-1, -2) & nfa_4c_sr000001_12 < 0 & nfa_4c_sr000002_12 < 0
 & nfa_4c_uab_a_12 < 0) then marketvalue_vehicles12 = nfa_4c_trunc_12;
  else if (nfa_4c_sr000001_12 >= 0 & nfa_4c_sr000002_12 >= 0 & nfa_4c_sr000002_12 = nfa_4c_sr000001_12) then 
  marketvalue_vehicles12 = (marketvalue_vehicles12 + nfa_4c_sr000001_12);
   else if (nfa_4c_sr000001_12 >= 0 & nfa_4c_sr000002_12 >= 0 & nfa_4c_sr000002_12 > nfa_4c_sr000001_12) then 
   marketvalue_vehicles12 = (marketvalue_vehicles12 + (((nfa_4c_sr000002_12 - nfa_4c_sr000001_12)/2) + nfa_4c_sr000001_12));
    else if (nfa_4c_sr000001_12 >= 0 & nfa_4c_sr000002_12 >= 0 & nfa_4c_sr000002_12 < nfa_4c_sr000001_12) then 
    marketvalue_vehicles12 = (marketvalue_vehicles12 + (((nfa_4c_sr000001_12 - nfa_4c_sr000002_12)/2) + nfa_4c_sr000002_12));
         else if (nfa_4c_uab_a_12 in(-1, -2)) then marketvalue_vehicles12 = -3;
 
/*******************************************/
/* CAR Component - marketvalue_vehicles13  */
/*******************************************/

if (nfa_4c_13 >= 0) then marketvalue_vehicles13 = (marketvalue_vehicles13 + nfa_4c_13);
 else if (nfa_4c_13 in(-1, -2) & nfa_4c_uab_a_13 < 0) then marketvalue_vehicles13 = nfa_4c_13;
  else if (nfa_4c_uab_a_13 in(-1, -2)) then marketvalue_vehicles13 = -3;

/*******************************************/
/* CAR Component - marketvalue_vehicles14  */
/*******************************************/

if (nfa_4c_14 >= 0) then marketvalue_vehicles14 = (marketvalue_vehicles14 + nfa_4c_14);
 else if (nfa_4c_14 in(-1, -2) & nfa_4c_uab_a_14 < 0) then marketvalue_vehicles14 = nfa_4c_14;
  else if (nfa_4c_uab_a_14 in(-1, -2)) then marketvalue_vehicles14 = -3;

/*******************************************/
/* CAR Component - marketvalue_vehicles15  */
/*******************************************/

if (nfa_4c_15 >= 0) then marketvalue_vehicles15 = (marketvalue_vehicles15 + nfa_4c_15);
 else if (nfa_4c_15 in(-1, -2) & nfa_4c_uab_a_15 < 0) then marketvalue_vehicles15 = nfa_4c_15;
  else if (nfa_4c_uab_a_15 in(-1, -2)) then marketvalue_vehicles15 = -3;
 
/*******************************************/
/* CAR Component - marketvalue_vehicles16  */
/*******************************************/

if (nfa_4c_16 >= 0) then marketvalue_vehicles16 = (marketvalue_vehicles16 + nfa_4c_16);
 else if (nfa_4c_16 in(-1, -2) & nfa_4c_uab_a_16 < 0) then marketvalue_vehicles16 = nfa_4c_16;
  else if (nfa_4c_uab_a_16 in(-1, -2)) then marketvalue_vehicles16 = -3;
 
/*******************************************/
/* CAR Component - marketvalue_vehicles17  */
/*******************************************/

if (nfa_4c_17 >= 0) then marketvalue_vehicles17 = (marketvalue_vehicles17 + nfa_4c_17);
 else if (nfa_4c_17 in(-1, -2) & nfa_4c_uab_a_17 < 0) then marketvalue_vehicles17 = nfa_4c_17;
  else if (nfa_4c_uab_a_17 in(-1, -2)) then marketvalue_vehicles17 = -3;
 
/******************************************/
/* CAR Component - mktval_othervehicles   */
/******************************************/

if (nfa_5 = 1 & nfa_5c >= 0) then mktval_othervehicles = (mktval_othervehicles + nfa_5c);
 else if (nfa_5 = 1 & nfa_5c_ref_1 = 1 & nfa_5c_sr000001 < 0 & nfa_5c_sr000002 < 0
 & nfa_5c_uab_a < 0 & nfa_5c_uab_b < 0 & nfa_5c_uab_c < 0) then mktval_othervehicles = -1;
  else if (nfa_5 = 1 & nfa_5c in(-1, -2) & nfa_5c_sr000001 < 0 & nfa_5c_sr000002 < 0
  & nfa_5c_uab_a < 0 & nfa_5c_uab_b < 0 & nfa_5c_uab_c < 0) then mktval_othervehicles = nfa_5c;
    else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 = nfa_5c_sr000001) then 
    mktval_othervehicles = (mktval_othervehicles + nfa_5c_sr000001);
     else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 > nfa_5c_sr000001) then 
     mktval_othervehicles = (mktval_othervehicles + (((nfa_5c_sr000002 - nfa_5c_sr000001)/2) + nfa_5c_sr000001));
      else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 < nfa_5c_sr000001) then 
      mktval_othervehicles = (mktval_othervehicles + (((nfa_5c_sr000001 - nfa_5c_sr000002)/2) + nfa_5c_sr000002));
       else if (nfa_5c in(-1, -2, -4) & nfa_5c_uab_b = 0) then mktval_othervehicles = (mktval_othervehicles+ quartile1);
        else if (nfa_5c in(-1, -2, -4) & nfa_5c_uab_b = 1) then mktval_othervehicles = (mktval_othervehicles + quartile2);
         else if (nfa_5c in(-1, -2, -4) & nfa_5c_uab_c = 0) then mktval_othervehicles = (mktval_othervehicles + quartile3);
          else if (nfa_5c in(-1, -2, -4) & nfa_5c_uab_c = 1) then mktval_othervehicles = (mktval_othervehicles + 50000);
           else if (nfa_5c_uab_a in(-1, -2) | nfa_5c_uab_b in(-1, -2) | nfa_5c_uab_c in(-1, -2)) then mktval_othervehicles = -3;
 
/*******************************/
/* Add components CAR          */
/*******************************/

if (mktval_assetpoorcars1 >= 0) then carc = (carc + mktval_assetpoorcars1); 
if (mktval_assetpoorcars2 >= 0) then carc = (carc + mktval_assetpoorcars2); 
if (mktval_assetpoorcars3 >= 0) then carc = (carc + mktval_assetpoorcars3); 
if (mktval_assetpoorcars4 >= 0) then carc = (carc + mktval_assetpoorcars4); 
if (mktval_assetpoorcars5 >= 0) then carc = (carc + mktval_assetpoorcars5); 
if (marketvalue_vehicles1 >= 0) then carc = (carc + marketvalue_vehicles1); 
if (marketvalue_vehicles2 >= 0) then carc = (carc + marketvalue_vehicles2); 
if (marketvalue_vehicles3 >= 0) then carc = (carc + marketvalue_vehicles3); 
if (marketvalue_vehicles4 >= 0) then carc = (carc + marketvalue_vehicles4); 
if (marketvalue_vehicles5 >= 0) then carc = (carc + marketvalue_vehicles5); 
if (marketvalue_vehicles6 >= 0) then carc = (carc + marketvalue_vehicles6); 
if (marketvalue_vehicles7 >= 0) then carc = (carc + marketvalue_vehicles7); 
if (marketvalue_vehicles8 >= 0) then carc = (carc + marketvalue_vehicles8); 
if (marketvalue_vehicles9 >= 0) then carc = (carc + marketvalue_vehicles9); 
if (marketvalue_vehicles10 >= 0) then carc = (carc + marketvalue_vehicles10); 
if (marketvalue_vehicles11 >= 0) then carc = (carc + marketvalue_vehicles11); 
if (marketvalue_vehicles12 >= 0) then carc = (carc + marketvalue_vehicles12); 
if (marketvalue_vehicles13 >= 0) then carc = (carc + marketvalue_vehicles13); 
if (marketvalue_vehicles14 >= 0) then carc = (carc + marketvalue_vehicles14); 
if (marketvalue_vehicles15 >= 0) then carc = (carc + marketvalue_vehicles15); 
if (marketvalue_vehicles16 >= 0) then carc = (carc + marketvalue_vehicles16); 
if (marketvalue_vehicles17 >= 0) then carc = (carc + marketvalue_vehicles17); 
if (mktval_othervehicles >= 0) then carc = (carc + mktval_othervehicles); 

if (mktval_assetpoorcars1 in(-1, -2, -3)) then carc = -3; 
else if (mktval_assetpoorcars2 in(-1, -2, -3)) then carc = -3; 
else if (mktval_assetpoorcars3 in(-1, -2, -3)) then carc = -3; 
else if (mktval_assetpoorcars4 in(-1, -2, -3)) then carc = -3; 
else if (mktval_assetpoorcars5 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles1 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles2 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles3 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles4 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles5 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles6 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles7 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles8 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles9 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles10 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles11 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles12 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles13 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles14 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles15 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles16 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles17 in(-1, -2, -3)) then carc = -3; 
else if (mktval_othervehicles in(-1, -2, -3)) then carc = -3; 

/************************/
/* Compute TNFW_TRUNC   */
/************************/
/*******************************************************/
/* TNFW_TRUNC - add components created in above code   */
/*******************************************************/

if (homec  >= 0) then tnfw_trunc = (tnfw_trunc + homec );
if (mortc  >= 0) then tnfw_trunc = (tnfw_trunc - mortc );
if (pdebtc >= 0) then tnfw_trunc = (tnfw_trunc - pdebtc);
if (cashc  >= 0) then tnfw_trunc = (tnfw_trunc + cashc );
if (irac   >= 0) then tnfw_trunc = (tnfw_trunc + irac  );
if (a401kc >= 0) then tnfw_trunc = (tnfw_trunc + a401kc);
if (cdsc   >= 0) then tnfw_trunc = (tnfw_trunc + cdsc  );
if (stockc >= 0) then tnfw_trunc = (tnfw_trunc + stockc);
if (bizc   >= 0) then tnfw_trunc = (tnfw_trunc + bizc  );
if (bdebtc >= 0) then tnfw_trunc = (tnfw_trunc - bdebtc);
if (cdebtc >= 0) then tnfw_trunc = (tnfw_trunc - cdebtc);
if (carc   >= 0) then tnfw_trunc = (tnfw_trunc + carc  );
if (posesc >= 0) then tnfw_trunc = (tnfw_trunc + posesc);
if (odebtc >= 0) then tnfw_trunc = (tnfw_trunc - odebtc);

if (homec  in(-1, -2, -3)) then tnfw_trunc = -3;
if (mortc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (pdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cashc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (irac   in(-1, -2, -3)) then tnfw_trunc = -3;
if (a401kc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdsc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (stockc in(-1, -2, -3)) then tnfw_trunc = -3;
if (bizc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (bdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (carc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (posesc in(-1, -2, -3)) then tnfw_trunc = -3;
if (odebtc in(-1, -2, -3)) then tnfw_trunc = -3;

/****************************************/
/* APPLY TOPCODE TO TNFW_TRUNC FOR 2008 */
/****************************************/
if (tnfw_trunc_2008 > 2138310) then tnfw_trunc_2008 = 3527333;

tnfw_trunc_2008 = round(tnfw_trunc_2008);

/***************************************************************/
/* TNFW_TRUNC - adjust for partially missing range estimates   */
/***************************************************************/

if (tnfw_trunc ~= -3 & 
    ((nfa_1a_sr000001 >= 0 & nfa_1a_sr000002 in(-1, -2)) | (nfa_1a_sr000001 in(-1, -2) & nfa_1a_sr000002 >= 0)
  | (nfa_1b_sr000001 >= 0 & nfa_1b_sr000002 in(-1, -2)) | (nfa_1b_sr000001 in(-1, -2) & nfa_1b_sr000002 >= 0) 
  | (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 in(-1, -2)) | (nfa_1c_sr000001 in(-1, -2) & nfa_1c_sr000002 >= 0)
  | (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 in(-1, -2)) | (nfa_2a_sr000001 in(-1, -2) & nfa_2a_sr000002 >= 0)
  | (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 in(-1, -2)) | (nfa_2b_sr000001 in(-1, -2) & nfa_2b_sr000002 >= 0) 
  | (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 in(-1, -2)) | (nfa_2c_sr000001 in(-1, -2) & nfa_2c_sr000002 >= 0) 
  | (fa_1a_sr000001 >= 0 & fa_1a_sr000002 in(-1, -2)) | (fa_1a_sr000001 in(-1, -2) & fa_1a_sr000002 >= 0)
  | (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 in(-1, -2)) | (fa_8d_sr000001_01 in(-1, -2) & fa_8d_sr000002_01 >= 0)
  | (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 in(-1, -2)) | (fa_8d_sr000001_02 in(-1, -2) & fa_8d_sr000002_02 >= 0)
  | (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_03 in(-1, -2)) | (fa_8d_sr000001_03 in(-1, -2) & fa_8d_sr000002_03 >= 0)
  | (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_04 in(-1, -2)) | (fa_8d_sr000001_04 in(-1, -2) & fa_8d_sr000002_04 >= 0)
  | (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 in(-1, -2)) | (fa_8d_sr000001_05 in(-1, -2) & fa_8d_sr000002_05 >= 0)
  | (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 in(-1, -2)) | (fa_8d_sr000001_06 in(-1, -2) & fa_8d_sr000002_06 >= 0)
  | (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 in(-1, -2)) | (fa_8d_sr000001_07 in(-1, -2) & fa_8d_sr000002_07 >= 0)
  | (fa_6e_sr000001 >= 0 & fa_6e_sr000002 in(-1, -2)) | (fa_6e_sr000001 in(-1, -2) & fa_6e_sr000002 >= 0)
  | (fa_7c_sr000001 >= 0 & fa_7c_sr000002 in(-1, -2)) | (fa_7c_sr000001 in(-1, -2) & fa_7c_sr000002 >= 0)
  | (fa_2a_sr000001 >= 0 & fa_2a_sr000002 in(-1, -2)) | (fa_2a_sr000001 in(-1, -2) & fa_2a_sr000002 >= 0)
  | (fa_3a_sr000001 >= 0 & fa_3a_sr000002 in(-1, -2)) | (fa_3a_sr000001 in(-1, -2) & fa_3a_sr000002 >= 0)
  | (fa_4a_sr000001 >= 0 & fa_4a_sr000002 in(-1, -2)) | (fa_4a_sr000001 in(-1, -2) & fa_4a_sr000002 >= 0)
  | (fa_5a_sr000001 >= 0 & fa_5a_sr000002 in(-1, -2)) | (fa_5a_sr000001 in(-1, -2) & fa_5a_sr000002 >= 0)
  | (fa_9a_sr000001 >= 0 & fa_9a_sr000002 in(-1, -2)) | (fa_9a_sr000001 in(-1, -2) & fa_9a_sr000002 >= 0)
  | (fa_10a_sr000001 >= 0 & fa_10a_sr000002 in(-1, -2)) | (fa_10a_sr000001 in(-1, -2) & fa_10a_sr000002 >= 0)
  | (fa_11a_sr000001 >= 0 & fa_11a_sr000002 in(-1, -2)) | (fa_11a_sr000001 in(-1, -2) & fa_11a_sr000002 >= 0)
  | (q13_131_sr000001 >= 0 & q13_131_sr000002 in(-1, -2)) | (q13_131_sr000001 in(-1, -2) & q13_131_sr000002 >= 0)
  | (q13_132_sr000001 >= 0 & q13_132_sr000002 in(-1, -2)) | (q13_132_sr000001 in(-1, -2) & q13_132_sr000002 >= 0)
  | (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 in(-1, -2)) | (sc_12b_sr000001_01 in(-1, -2) & sc_12b_sr000002_01 >= 0)
  | (nfa_4f_sr000001_01 >= 0 & nfa_4f_sr000002_01 in(-1, -2)) | (nfa_4f_sr000001_01 in(-1, -2) & nfa_4f_sr000002_01 >= 0)
  | (nfa_4f_sr000001_02 >= 0 & nfa_4f_sr000002_02 in(-1, -2)) | (nfa_4f_sr000001_02 in(-1, -2) & nfa_4f_sr000002_02 >= 0)
  | (nfa_4f_sr000001_03 >= 0 & nfa_4f_sr000002_03 in(-1, -2)) | (nfa_4f_sr000001_03 in(-1, -2) & nfa_4f_sr000002_03 >= 0)
  | (nfa_4f_sr000001_04 >= 0 & nfa_4f_sr000002_04 in(-1, -2)) | (nfa_4f_sr000001_04 in(-1, -2) & nfa_4f_sr000002_04 >= 0)
  | (nfa_4f_sr000001_05 >= 0 & nfa_4f_sr000002_05 in(-1, -2)) | (nfa_4f_sr000001_05 in(-1, -2) & nfa_4f_sr000002_05 >= 0)
  | (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 in(-1, -2)) | (sc_12a_sr000001_01 in(-1, -2) & sc_12a_sr000002_01 >= 0)
  | (sc_12a_sr000001_02 >= 0 & sc_12a_sr000002_02 in(-1, -2)) | (sc_12a_sr000001_02 in(-1, -2) & sc_12a_sr000002_02 >= 0)
  | (nfa_4c_sr000001_01 >= 0 & nfa_4c_sr000002_01 in(-1, -2)) | (nfa_4c_sr000001_01 in(-1, -2) & nfa_4c_sr000002_01 >= 0)
  | (nfa_4c_sr000001_02 >= 0 & nfa_4c_sr000002_02 in(-1, -2)) | (nfa_4c_sr000001_02 in(-1, -2) & nfa_4c_sr000002_02 >= 0)
  | (nfa_4c_sr000001_03 >= 0 & nfa_4c_sr000002_03 in(-1, -2)) | (nfa_4c_sr000001_03 in(-1, -2) & nfa_4c_sr000002_03 >= 0)
  | (nfa_4c_sr000001_04 >= 0 & nfa_4c_sr000002_04 in(-1, -2)) | (nfa_4c_sr000001_04 in(-1, -2) & nfa_4c_sr000002_04 >= 0)
  | (nfa_4c_sr000001_05 >= 0 & nfa_4c_sr000002_05 in(-1, -2)) | (nfa_4c_sr000001_05 in(-1, -2) & nfa_4c_sr000002_05 >= 0)
  | (nfa_4c_sr000001_06 >= 0 & nfa_4c_sr000002_06 in(-1, -2)) | (nfa_4c_sr000001_06 in(-1, -2) & nfa_4c_sr000002_06 >= 0)
  | (nfa_4c_sr000001_11 >= 0 & nfa_4c_sr000002_11 in(-1, -2)) | (nfa_4c_sr000001_11 in(-1, -2) & nfa_4c_sr000002_11 >= 0)
  | (nfa_4c_sr000001_12 >= 0 & nfa_4c_sr000002_12 in(-1, -2)) | (nfa_4c_sr000001_12 in(-1, -2) & nfa_4c_sr000002_12 >= 0)
  | (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 in(-1, -2)) | (nfa_5c_sr000001 in(-1, -2) & nfa_5c_sr000002 >= 0)
  | (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 in(-1, -2)) | (nfa_6e_sr000001 in(-1, -2) & nfa_6e_sr000002 >= 0)
  | (debt_1a_sr000001 >= 0 & debt_1a_sr000002 in(-1, -2)) | (debt_1a_sr000001 in(-1, -2) & debt_1a_sr000002 >= 0)))
 then tnfw_trunc = -3;
end;

2012 TNFW_TRUNC variable creation


/***************************************************/
/* Compute dollar amt for dollars & cents vars     */
/***************************************************/

nfa_7d_truncc = nfa_7d_trunc;
if (nfa_7d_trunc > 0) then nfa_7d_truncc = (nfa_7d_trunc/100);

/***************************************************/
/* Compute dynamic QUARTILE VALUES for estimates   */
/***************************************************/

array quartileqs (i) quartile1 quartile2 quartile3 quartile4;

do i = 1 to 4;
 quartileqs = 0;
end;

if (symbol_entry_othhh = 7200) then do;
  quartile1 = (5000/2);
  quartile2 = (5000 + ((7200-5000)/2));
  quartile3 = (7200 + ((30000-7200)/2));
  quartile4 = 30000; /* Note: Use median of actual values > 30000 where possible.  Otherwise set to 30000 */
end;
else if (symbol_entry_othhh = 13000) then do;
  quartile1 = (5000/2);
  quartile2 = (5000 + ((13000-5000)/2));
  quartile3 = (13000 + ((30000-13000)/2));
  quartile4 = 30000; /* Note: Use median of actual values > 30000 where possible.  Otherwise set to 30000 */
end;

/***************************************************/
/* BEGIN COMPUTATIONS FOR NET WEALTH COMPONENTS    */
/***************************************************/

array assetsc (i)      homec mortc pdebtc cashc irac a401kc cdsc stockc trustc bizc 
                       bdebtc cdebtc carc posesc odebtc tnfw_trunc
                       collections items ccdebt studentloan childstudentloan owebusiness otherdebt
                       solebiz farm_1_value1 farm_2_value1 business_1_value1 business_2_value1
                       business_3_value1 business_4_value1 business_5_value1 realestate_1_value1 
                       realestate_2_value1 realestate_3_value1 realestate_4_value1
                       farm_1_value farm_2_value business_1_value business_2_value
                       business_3_value business_4_value business_5_value realestate_1_value 
                       realestate_2_value realestate_3_value realestate_4_value
                       debtbiz farm_1_debt1 farm_2_debt1 business_1_debt1 business_2_debt1
                       business_3_debt1 business_4_debt1 business_5_debt1 realestate_1_debt1 
                       realestate_2_debt1 realestate_3_debt1 realestate_4_debt1
                       farm_1_debt farm_2_debt business_1_debt business_2_debt
                       business_3_debt business_4_debt business_5_debt realestate_1_debt
                       govbonds mutual lifeinsure shares corpbond moneyowedtor
                       home1 secondhome mort1 secondmort pdebt1 secondpdebt
                       ira1 ira2 ira3 ira4 ira5 ira6 ira7 r_401k sp_401k
                       amtowe_assetpoorcars1 amtowe_assetpoorcars2 amtowe_assetpoorcars3
                       amountowe_vehicles1 amountowe_vehicles2 amountowe_vehicles3 amountowe_vehicles4
                       amountowe_vehicles5 amountowe_vehicles6 amountowe_vehicles9 amtowe_othervehicles
                       mktval_assetpoorcars1 mktval_assetpoorcars2 mktval_assetpoorcars3
                       marketvalue_vehicles1 marketvalue_vehicles2 marketvalue_vehicles3 marketvalue_vehicles4
                       marketvalue_vehicles5 marketvalue_vehicles6 marketvalue_vehicles7 marketvalue_vehicles8
                       marketvalue_vehicles9 marketvalue_vehicles10 marketvalue_vehicles11 marketvalue_vehicles12 
                       marketvalue_vehicles13 marketvalue_vehicles14 marketvalue_vehicles15 marketvalue_vehicles16 
                       marketvalue_vehicles17 mktval_othervehicles;

do i = 1 to 119;
 if (sampweight = 0) then assetsc = -5;
  else if (sampweight > 0) then assetsc = 0;
end;

/****************************/
/* Compute POSES            */
/****************************/
/*************************************************/
/* POSES Component - collections                 */
/*************************************************/

if (nfa_6a = 1 & nfa_6e_trunc >= 0) then collections = (collections + nfa_6e_trunc);
 else if (nfa_6a = 1 & nfa_6e_ref_1 = 1 & nfa_6e_sr000001 < 0 & nfa_6e_sr000002 < 0 
 & nfa_6e_uab_a < 0 & nfa_6e_uab_b < 0 & nfa_6e_uab_c < 0) then collections = -1;
  else if (nfa_6a = 1 & nfa_6e_trunc in(-1, -2) & nfa_6e_sr000001 < 0 & nfa_6e_sr000002 < 0 
  & nfa_6e_uab_a < 0 & nfa_6e_uab_b < 0 & nfa_6e_uab_c < 0) then collections = nfa_6e_trunc;
    else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 >= 0 & nfa_6e_sr000002 = nfa_6e_sr000001) then 
    collections = (collections + nfa_6e_sr000001);
     else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 >= 0 & nfa_6e_sr000002 > nfa_6e_sr000001) then 
     collections = (collections + (((nfa_6e_sr000002 - nfa_6e_sr000001)/2) + nfa_6e_sr000001));
      else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 >= 0 & nfa_6e_sr000002 < nfa_6e_sr000001) then 
      collections = (collections + (((nfa_6e_sr000001 - nfa_6e_sr000002)/2) + nfa_6e_sr000002));
       else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_b = 0) then collections = (collections + quartile1);
        else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_b = 1) then collections = (collections + quartile2);
         else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_c = 0) then collections = (collections + quartile3);
          else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_c = 1) then collections = (collections + 66000);
           else if (nfa_6e_uab_a in(-1, -2) | nfa_6e_uab_b in(-1, -2) | nfa_6e_uab_c in(-1, -2)) then collections = -3;
 
/*************************************************/
/* POSES Component - items                       */
/*************************************************/

if (nfa_7 = 1 & nfa_7d_truncc >= 0) then items = (items + nfa_7d_truncc);
 else if (nfa_7 = 1 & nfa_7d_ref_1 = 1 & nfa_7d_uab_a < 0 & nfa_7d_uab_b < 0 & nfa_7d_uab_c < 0) then items = -1;
  else if (nfa_7 = 1 & nfa_7d_truncc in(-1, -2) & nfa_7d_uab_a < 0 & nfa_7d_uab_b < 0 & nfa_7d_uab_c < 0) then items = nfa_7d_truncc;
   else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_b = 0) then items = (items + quartile1);
    else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_b = 1) then items = (items + quartile2);
     else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_c = 0) then items = (items + quartile3);
      else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_c = 1) then items = (items + 50000);
       else if (nfa_7d_uab_a in(-1, -2) | nfa_7d_uab_b in(-1, -2) | nfa_7d_uab_c in(-1, -2)) then items = -3;

/*******************************/
/* Add components POSES        */
/*******************************/

if (collections >= 0) then posesc = (posesc + collections); 
if (items >= 0) then posesc = (posesc + items);
if (collections in(-1, -2, -3)) then posesc = -3;
else if (items in(-1, -2, -3)) then posesc = -3;


/****************************/
/* Compute ODEBT            */
/****************************/

/*************************************************/
/* ODEBT Component - ccdebt                      */
/*************************************************/

if (debt_1 = 1 & debt_1a_trunc >= 0) then ccdebt = (ccdebt + debt_1a_trunc);
 else if (debt_1 = 1 & debt_1a_ref_1 = 1 & debt_1a_sr000001 < 0 & debt_1a_sr000002 < 0 
 & debt_1a_uab_a < 0 & debt_1a_uab_b < 0 & debt_1a_uab_c < 0) then ccdebt = -1;
  else if (debt_1 = 1 & debt_1a_trunc in(-1, -2) & debt_1a_sr000001 < 0 & debt_1a_sr000002 < 0 
  & debt_1a_uab_a < 0 & debt_1a_uab_b < 0 & debt_1a_uab_c < 0) then ccdebt = debt_1a_trunc;
    else if (debt_1a_sr000001 >= 0 & debt_1a_sr000002 >= 0 & debt_1a_sr000002 = debt_1a_sr000001) then 
    ccdebt = (ccdebt + debt_1a_sr000001);
     else if (debt_1a_sr000001 >= 0 & debt_1a_sr000002 >= 0 & debt_1a_sr000002 > debt_1a_sr000001) then 
     ccdebt = (ccdebt + (((debt_1a_sr000002 - debt_1a_sr000001)/2) + debt_1a_sr000001));
      else if (debt_1a_sr000001 >= 0 & debt_1a_sr000002 >= 0 & debt_1a_sr000002 < debt_1a_sr000001) then 
      ccdebt = (ccdebt + (((debt_1a_sr000001 - debt_1a_sr000002)/2) + debt_1a_sr000002));
       else if (debt_1a_trunc in(-1, -2, -4) & debt_1a_uab_b = 0) then ccdebt = (ccdebt + quartile1);
        else if (debt_1a_trunc in(-1, -2, -4) & debt_1a_uab_b = 1) then ccdebt = (ccdebt + quartile2);
         else if (debt_1a_trunc in(-1, -2, -4) & debt_1a_uab_c = 0) then ccdebt = (ccdebt + quartile3);
          else if (debt_1a_trunc in(-1, -2, -4) & debt_1a_uab_c = 1) then ccdebt = (ccdebt + 45000);
           else if (debt_1a_uab_a in(-1, -2) | debt_1a_uab_b in(-1, -2) | debt_1a_uab_c in(-1, -2)) then ccdebt = -3;
 
/*************************************************/
/* ODEBT Component - studentloan                 */
/*************************************************/

if (debt_2 = 1 & debt_2a_trunc >= 0) then studentloan = (studentloan + debt_2a_trunc);
 else if (debt_2 = 1 & debt_2a_ref_1 = 1 & debt_2a_uab_a < 0 & debt_2a_uab_b < 0 
 & debt_2a_uab_c < 0) then studentloan = -1;
  else if (debt_2 = 1 & debt_2a_trunc in(-1, -2) & debt_2a_uab_a < 0 & debt_2a_uab_b < 0 
  & debt_2a_uab_c < 0) then studentloan = debt_2a_trunc;
   else if (debt_2a_trunc in(-1, -2, -4) & debt_2a_uab_b = 0) then studentloan = (studentloan + quartile1);
    else if (debt_2a_trunc in(-1, -2, -4) & debt_2a_uab_b = 1) then studentloan = (studentloan + quartile2);
     else if (debt_2a_trunc in(-1, -2, -4) & debt_2a_uab_c = 0) then studentloan = (studentloan + quartile3);
      else if (debt_2a_trunc in(-1, -2, -4) & debt_2a_uab_c = 1) then studentloan = (studentloan + 52500);
       else if (debt_2a_uab_a in(-1, -2) | debt_2a_uab_b in(-1, -2) | debt_2a_uab_c in(-1, -2)) then studentloan = -3;

/*************************************************/
/* ODEBT Component - childstudentloan            */
/*************************************************/

if (debt_2c = 1 & debt_2d_trunc >= 0) then childstudentloan = (childstudentloan + debt_2d_trunc);
 else if (debt_2c = 1 & debt_2d_ref_1 = 1 & debt_2d_uab_a < 0 & debt_2d_uab_b < 0 
 & debt_2d_uab_c < 0) then childstudentloan = -1;
  else if (debt_2c = 1 & debt_2d_trunc in(-1, -2) & debt_2d_uab_a < 0 & debt_2d_uab_b < 0 
  & debt_2d_uab_c < 0) then childstudentloan = debt_2d_trunc;
   else if (debt_2d_trunc in(-1, -2, -4) & debt_2d_uab_b = 0) then childstudentloan = (childstudentloan + quartile1);
    else if (debt_2d_trunc in(-1, -2, -4) & debt_2d_uab_b = 1) then childstudentloan = (childstudentloan + quartile2);
     else if (debt_2d_trunc in(-1, -2, -4) & debt_2d_uab_c = 0) then childstudentloan = (childstudentloan + quartile3);
      else if (debt_2d_trunc in(-1, -2, -4) & debt_2d_uab_c = 1) then childstudentloan = (childstudentloan + 50000);
       else if (debt_2d_uab_a in(-1, -2) | debt_2d_uab_b in(-1, -2) | debt_2d_uab_c in(-1, -2)) then childstudentloan = -3;

/*************************************************/
/* ODEBT Component - owebusiness                 */
/*************************************************/

if (debt_3 = 1 & debt_3a_trunc >= 0) then owebusiness = (owebusiness + debt_3a_trunc);
 else if (debt_3 = 1 & debt_3a_ref_1 = 1 & debt_3a_uab_a < 0 & debt_3a_uab_b < 0 
 & debt_3a_uab_c < 0) then owebusiness = -1;
  else if (debt_3 = 1 & debt_3a_trunc in(-1, -2) & debt_3a_uab_a < 0 & debt_3a_uab_b < 0 
  & debt_3a_uab_c < 0) then owebusiness = debt_3a_trunc;
   else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_b = 0) then owebusiness = (owebusiness + quartile1);
    else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_b = 1) then owebusiness = (owebusiness + quartile2);
     else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_c = 0) then owebusiness = (owebusiness + quartile3);
      else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_c = 1) then owebusiness = (owebusiness + 68000);
       else if (debt_3a_uab_a in(-1, -2) | debt_3a_uab_b in(-1, -2) | debt_3a_uab_c in(-1, -2)) then owebusiness = -3;

/*************************************************/
/* ODEBT Component - otherdebt                   */
/*************************************************/

if (debt_4 = 1 & debt_4a_trunc >= 0) then otherdebt = (otherdebt + debt_4a_trunc);
 else if (debt_4 = 1 & debt_4a_ref_1 = 1 & debt_4a_uab_a < 0 & debt_4a_uab_b < 0 
 & debt_4a_uab_c < 0) then otherdebt = -1;
  else if (debt_4 = 1 & debt_4a_trunc in(-1, -2) & debt_4a_uab_a < 0 & debt_4a_uab_b < 0 
  & debt_4a_uab_c < 0) then otherdebt = debt_4a_trunc;
   else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_b = 0) then otherdebt = (otherdebt + quartile1);
    else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_b = 1) then otherdebt = (otherdebt + quartile2);
     else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_c = 0) then otherdebt = (otherdebt + quartile3);
      else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_c = 1) then otherdebt = (otherdebt + 55500);
       else if (debt_4a_uab_a in(-1, -2) | debt_4a_uab_b in(-1, -2) | debt_4a_uab_c in(-1, -2)) then otherdebt = -3;

/*******************************/
/* Add components ODEBT        */
/*******************************/

if (ccdebt >= 0) then odebtc = (odebtc + ccdebt); 
if (studentloan >= 0) then odebtc = (odebtc + studentloan);
if (childstudentloan >= 0) then odebtc = (odebtc + childstudentloan);
if (owebusiness >= 0) then odebtc = (odebtc + owebusiness);
if (otherdebt >= 0) then odebtc = (odebtc + otherdebt);
if (ccdebt in(-1, -2, -3)) then odebtc = -3;
else if (studentloan in(-1, -2, -3)) then odebtc = -3;
else if (childstudentloan in(-1, -2, -3)) then odebtc = -3;
else if (owebusiness in(-1, -2, -3)) then odebtc = -3;
else if (otherdebt in(-1, -2, -3)) then odebtc = -3;

/****************************/
/* Compute BIZ              */
/****************************/

/*************************************************/
/* BIZ Component - solebiz                       */
/*************************************************/

if (q13_131_trunc >= 0) then solebiz = (solebiz + q13_131_trunc);
 else if (q13_131_ref_1 = 1 & q13_131_sr000001 < 0 & q13_131_sr000002_trunc < 0 
 & q13_131_uab_a < 0 & q13_131_uab_c < 0) then solebiz = -1;
  else if (q13_131_trunc in(-1, -2) & q13_131_sr000001 < 0 & q13_131_sr000002_trunc < 0 
  & q13_131_uab_a < 0 & q13_131_uab_c < 0) then solebiz = q13_131_trunc;
    else if (q13_131_sr000001 >= 0 & q13_131_sr000002_trunc >= 0 & q13_131_sr000002_trunc = q13_131_sr000001) then 
    solebiz = (solebiz + q13_131_sr000001);
     else if (q13_131_sr000001 >= 0 & q13_131_sr000002_trunc >= 0 & q13_131_sr000002_trunc > q13_131_sr000001) then 
     solebiz = (solebiz + (((q13_131_sr000002_trunc - q13_131_sr000001)/2) + q13_131_sr000001));
      else if (q13_131_sr000001 >= 0 & q13_131_sr000002_trunc >= 0 & q13_131_sr000002_trunc < q13_131_sr000001) then 
      solebiz = (solebiz + (((q13_131_sr000001 - q13_131_sr000002_trunc)/2) + q13_131_sr000002_trunc));
       else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_c = 0) then solebiz = (solebiz + quartile3);
        else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_c = 1) then solebiz = (solebiz + 250000);
         else if (q13_131_uab_a in(-1, -2) | q13_131_uab_c in(-1, -2)) then solebiz = -3;
 /********************************************************************************************************/
/* BIZ Components - farm_#_value, business_#_value, realestate_#_value & percentage ownership           */
/********************************************************************************************************/

if (q13_fjt_11_trunc_01 > -4) then farm_1_value1 = q13_fjt_11_trunc_01;
if (q13_fjt_11_trunc_02 > -4) then farm_2_value1 = q13_fjt_11_trunc_02;
if (q13_bppjt_11_trunc_01 > -4) then business_1_value1 = q13_bppjt_11_trunc_01;
if (q13_bppjt_11_trunc_02 > -4) then business_2_value1 = q13_bppjt_11_trunc_02;
if (q13_bppjt_11_trunc_03 > -4) then business_3_value1 = q13_bppjt_11_trunc_03;
if (q13_bppjt_11_trunc_04 > -4) then business_4_value1 = q13_bppjt_11_trunc_04;
if (q13_bppjt_11_trunc_05 > -4) then business_5_value1 = q13_bppjt_11_trunc_05;
if (q13_rejt_11_trunc_01 > -4) then realestate_1_value1 = q13_rejt_11_trunc_01;
if (q13_rejt_11_trunc_02 > -4) then realestate_2_value1 = q13_rejt_11_trunc_02;
if (q13_rejt_11_trunc_03 > -4) then realestate_3_value1 = q13_rejt_11_trunc_03;
if (q13_rejt_11_trunc_04 > -4) then realestate_4_value1 = q13_rejt_11_trunc_04;

if (q13_fjt_12b_01 > -4) then farm_1_pcntshare = q13_fjt_12b_01;
if (q13_fjt_12b_02 > -4) then farm_2_pcntshare = q13_fjt_12b_02;
if (q13_bppjt_12b_01 > -4) then business_1_pcntshare = q13_bppjt_12b_01;
if (q13_bppjt_12b_02 > -4) then business_2_pcntshare = q13_bppjt_12b_02;
if (q13_bppjt_12b_03 > -4) then business_3_pcntshare = q13_bppjt_12b_03;
if (q13_rejt_12b_01 > -4) then realestate_1_pcntshare = q13_rejt_12b_01;
if (q13_rejt_12b_02 > -4) then realestate_2_pcntshare = q13_rejt_12b_02;
if (q13_rejt_12b_03 > -4) then realestate_3_pcntshare = q13_rejt_12b_03;
if (q13_rejt_12b_04 > -4) then realestate_4_pcntshare = q13_rejt_12b_04;

if (farm_1_pcntshare > 0) then farm_1_pcntshare = (farm_1_pcntshare / 100);
if (farm_2_pcntshare > 0) then farm_2_pcntshare = (farm_2_pcntshare / 100);
if (business_1_pcntshare > 0) then business_1_pcntshare = (business_1_pcntshare / 100);
if (business_2_pcntshare > 0) then business_2_pcntshare = (business_2_pcntshare / 100);
if (business_3_pcntshare > 0) then business_3_pcntshare = (business_3_pcntshare / 100);
if (realestate_1_pcntshare > 0) then realestate_1_pcntshare = (realestate_1_pcntshare / 100);
if (realestate_2_pcntshare > 0) then realestate_2_pcntshare = (realestate_2_pcntshare / 100);
if (realestate_3_pcntshare > 0) then realestate_3_pcntshare = (realestate_3_pcntshare / 100);
if (realestate_4_pcntshare > 0) then realestate_4_pcntshare = (realestate_4_pcntshare / 100);

if (farm_1_value1 >= 0 & farm_1_pcntshare >= 0) then farm_1_value = (farm_1_value1 * farm_1_pcntshare);
if (farm_2_value1 >= 0 & farm_2_pcntshare >= 0) then farm_2_value = (farm_2_value1 * farm_2_pcntshare);
if (business_1_value1 >= 0 & business_1_pcntshare >= 0) then business_1_value = (business_1_value1 * business_1_pcntshare);
if (business_2_value1 >= 0 & business_2_pcntshare >= 0) then business_2_value = (business_2_value1 * business_2_pcntshare);
if (business_3_value1 >= 0 & business_3_pcntshare >= 0) then business_3_value = (business_3_value1 * business_3_pcntshare);
if (realestate_1_value1 >= 0 & realestate_1_pcntshare >= 0) then realestate_1_value = (realestate_1_value1 * realestate_1_pcntshare);
if (realestate_2_value1 >= 0 & realestate_2_pcntshare >= 0) then realestate_2_value = (realestate_2_value1 * realestate_2_pcntshare);
if (realestate_3_value1 >= 0 & realestate_3_pcntshare >= 0) then realestate_3_value = (realestate_3_value1 * realestate_3_pcntshare);
if (realestate_4_value1 >= 0 & realestate_4_pcntshare >= 0) then realestate_4_value = (realestate_4_value1 * realestate_4_pcntshare);

/*******************************/
/* Add components BIZ          */
/*******************************/

if (solebiz >= 0) then bizc = (bizc + solebiz); 
if (farm_1_value >= 0) then bizc = (bizc + farm_1_value);
if (farm_2_value >= 0) then bizc = (bizc + farm_2_value);
if (business_1_value >= 0) then bizc = (bizc + business_1_value);
if (business_2_value >= 0) then bizc = (bizc + business_2_value);
if (business_3_value >= 0) then bizc = (bizc + business_3_value);
if (business_4_value >= 0) then bizc = (bizc + business_4_value);
if (business_5_value >= 0) then bizc = (bizc + business_5_value);
if (realestate_1_value >= 0) then bizc = (bizc + realestate_1_value);
if (realestate_2_value >= 0) then bizc = (bizc + realestate_2_value);
if (realestate_3_value >= 0) then bizc = (bizc + realestate_3_value);
if (realestate_4_value >= 0) then bizc = (bizc + realestate_4_value);

if (solebiz in(-1, -2, -3)) then bizc = -3;
if (farm_1_value in(-1, -2, -3) | farm_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (farm_2_value in(-1, -2, -3) | farm_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_1_value in(-1, -2, -3) | business_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_2_value in(-1, -2, -3) | business_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_3_value in(-1, -2, -3) | business_3_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_4_value in(-1, -2, -3)) then bizc = -3;
if (business_5_value in(-1, -2, -3)) then bizc = -3;
if (realestate_1_value in(-1, -2, -3) | realestate_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_2_value in(-1, -2, -3) | realestate_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_3_value in(-1, -2, -3) | realestate_3_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_4_value in(-1, -2, -3) | realestate_4_pcntshare in(-1, -2, -3)) then bizc = -3;

/****************************/
/* Compute BDEBT       */
/****************************/

/*************************************************/
/* BDEBT Component - debtbiz                     */
/*************************************************/

if (q13_132_trunc >= 0) then debtbiz = (debtbiz + q13_132_trunc);
 else if (q13_132_trunc = 1 & q13_132_ref_1 = 1 & q13_132_sr000001 < 0 & q13_132_sr000002 < 0 
 & q13_132_uab_a < 0 & q13_132_uab_c < 0) then debtbiz = -1;
  else if (q13_132_trunc in(-1, -2) & q13_132_sr000001 < 0 & q13_132_sr000002 < 0 
  & q13_132_uab_a < 0 & q13_132_uab_c < 0) then debtbiz = q13_132_trunc;
    else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 = q13_132_sr000001) then 
    debtbiz = (debtbiz + q13_132_sr000001);
     else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 > q13_132_sr000001) then 
     debtbiz = (debtbiz + (((q13_132_sr000002 - q13_132_sr000001)/2) + q13_132_sr000001));
      else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 < q13_132_sr000001) then 
      debtbiz = (debtbiz + (((q13_132_sr000001 - q13_132_sr000002)/2) + q13_132_sr000002));
       else if (q13_132_trunc in(-1, -2, -4) & q13_132_uab_c = 0) then debtbiz = (debtbiz + quartile3);
        else if (q13_132_trunc in(-1, -2, -4) & q13_132_uab_c = 1) then debtbiz = (debtbiz + 200000);
         else if (q13_132_uab_a in(-1, -2) | q13_132_uab_c in(-1, -2)) then debtbiz = -3;
 
/********************************************************************************************************/
/* BDEBT Components - farm_#_debt, business_#_debt, realestate_#_debt                                   */
/*       (use ownership percentage computed above for bizc)                                             */
/********************************************************************************************************/

if (q13_fjt_12_trunc_01 > -4) then farm_1_debt1 = q13_fjt_12_trunc_01;
if (q13_fjt_12_trunc_02 > -4) then farm_2_debt1 = q13_fjt_12_trunc_02;
if (q13_bppjt_12_trunc_01 > -4) then business_1_debt1 = q13_bppjt_12_trunc_01;
if (q13_bppjt_12_trunc_02 > -4) then business_2_debt1 = q13_bppjt_12_trunc_02;
if (q13_bppjt_12_trunc_03 > -4) then business_3_debt1 = q13_bppjt_12_trunc_03;
if (q13_bppjt_12_trunc_04 > -4) then business_4_debt1 = q13_bppjt_12_trunc_04;
if (q13_bppjt_12_trunc_05 > -4) then business_5_debt1 = q13_bppjt_12_trunc_05;
if (q13_rejt_12_trunc > -4) then realestate_1_debt1 = q13_rejt_12_trunc;

if (farm_1_debt1 >= 0 & farm_1_pcntshare >= 0) then farm_1_debt = (farm_1_debt1 * farm_1_pcntshare);
if (farm_2_debt1 >= 0 & farm_2_pcntshare >= 0) then farm_2_debt = (farm_2_debt1 * farm_2_pcntshare);
if (business_1_debt1 >= 0 & business_1_pcntshare >= 0) then business_1_debt = (business_1_debt1 * business_1_pcntshare);
if (business_2_debt1 >= 0 & business_2_pcntshare >= 0) then business_2_debt = (business_2_debt1 * business_2_pcntshare);
if (business_3_debt1 >= 0 & business_3_pcntshare >= 0) then business_3_debt = (business_3_debt1 * business_3_pcntshare);
if (business_4_debt1 >= 0) then business_4_debt = (business_4_debt1);
if (business_5_debt1 >= 0) then business_5_debt = (business_5_debt1);
if (realestate_1_debt1 >= 0 & realestate_1_pcntshare >= 0) then realestate_1_debt = (realestate_1_debt1 * realestate_1_pcntshare);

/*******************************/
/* Add components BDEBT        */
/*******************************/

if (debtbiz >= 0) then bdebtc = (bdebtc + debtbiz); 
if (farm_1_debt >= 0) then bdebtc = (bdebtc + farm_1_debt);
if (farm_2_debt >= 0) then bdebtc = (bdebtc + farm_2_debt);
if (business_1_debt >= 0) then bdebtc = (bdebtc + business_1_debt);
if (business_2_debt >= 0) then bdebtc = (bdebtc + business_2_debt);
if (business_3_debt >= 0) then bdebtc = (bdebtc + business_3_debt);
if (business_4_debt >= 0) then bdebtc = (bdebtc + business_4_debt);
if (business_5_debt >= 0) then bdebtc = (bdebtc + business_5_debt);
if (realestate_1_debt >= 0) then bdebtc = (bdebtc + realestate_1_debt);

if (debtbiz in(-1, -2, -3)) then bdebtc = -3; 
if (farm_1_debt in(-1, -2, -3) | farm_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (farm_2_debt in(-1, -2, -3) | farm_2_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_1_debt in(-1, -2, -3) | business_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_2_debt in(-1, -2, -3) | business_2_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_3_debt in(-1, -2, -3) | business_3_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_4_debt in(-1, -2, -3)) then bdebtc = -3;
if (business_5_debt in(-1, -2, -3)) then bdebtc = -3;
if (realestate_1_debt in(-1, -2, -3) | realestate_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;


/****************************/
/* Compute CASH             */
/****************************/

/*************************************************/
/* CASH Component - cash                         */
/*************************************************/

if (fa_1 = 1 & fa_1a_trunc >= 0) then cashc = (cashc + fa_1a_trunc);
 else if (fa_1 = 1 & fa_1_ref_1 = 1 & fa_1a_sr000001_trunc < 0 & fa_1a_sr000002_trunc < 0 
 & fa_1a_uab_a < 0 & fa_1a_uab_b < 0 & fa_1a_uab_c < 0) then cashc = -1;
  else if (fa_1 = 1 & fa_1a_trunc in(-1, -2) & fa_1a_sr000001_trunc < 0 & fa_1a_sr000002_trunc < 0 
  & fa_1a_uab_a < 0 & fa_1a_uab_b < 0 & fa_1a_uab_c < 0) then cashc = fa_1a_trunc;
    else if (fa_1a_sr000001_trunc >= 0 & fa_1a_sr000002_trunc >= 0 & fa_1a_sr000002_trunc = fa_1a_sr000001_trunc) then 
    cashc = (cashc + fa_1a_sr000001_trunc);
     else if (fa_1a_sr000001_trunc >= 0 & fa_1a_sr000002_trunc >= 0 & fa_1a_sr000002_trunc > fa_1a_sr000001_trunc) then 
     cashc = (cashc + (((fa_1a_sr000002_trunc - fa_1a_sr000001_trunc)/2) + fa_1a_sr000001_trunc));
      else if (fa_1a_sr000001_trunc >= 0 & fa_1a_sr000002_trunc >= 0 & fa_1a_sr000002_trunc < fa_1a_sr000001_trunc) then 
      cashc = (cashc + (((fa_1a_sr000001_trunc - fa_1a_sr000002_trunc)/2) + fa_1a_sr000002_trunc));
       else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_b = 0) then cashc = (cashc + quartile1);
        else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_b = 1) then cashc = (cashc + quartile2);
         else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_c = 0) then cashc = (cashc + quartile3);
          else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_c = 1) then cashc = (cashc + 80000);
           else if (fa_1a_uab_a in(-1, -2) | fa_1a_uab_b in(-1, -2) | fa_1a_uab_c in(-1, -2)) then cashc = -3;

/*************************************************************/
/* No need to add components for CASHC - set -3 missing      */
/*************************************************************/

if (cashc in(-1, -2, -3)) then cashc = -3;

/****************************/
/* Compute CDS              */
/****************************/

/*************************************************/
/* CDS Component - cds                           */
/*************************************************/

if (fa_2 = 1 & fa_2a_trunc >= 0) then cdsc = (cdsc + fa_2a_trunc);
 else if (fa_2 = 1 & fa_2_ref_1 = 1 & fa_2a_sr000001 < 0 & fa_2a_sr000002_trunc < 0 
 & fa_2a_uab_a < 0 & fa_2a_uab_b < 0 & fa_2a_uab_c < 0) then cdsc = -1;
  else if (fa_2 = 1 & fa_2a_trunc in(-1, -2) & fa_2a_sr000001 < 0 & fa_2a_sr000002_trunc < 0 
  & fa_2a_uab_a < 0 & fa_2a_uab_b < 0 & fa_2a_uab_c < 0) then cdsc = fa_2a_trunc;
    else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002_trunc >= 0 & fa_2a_sr000002_trunc = fa_2a_sr000001) then 
    cdsc = (cdsc + fa_2a_sr000001);
     else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002_trunc >= 0 & fa_2a_sr000002_trunc > fa_2a_sr000001) then 
     cdsc = (cdsc + (((fa_2a_sr000002_trunc - fa_2a_sr000001)/2) + fa_2a_sr000001));
      else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002_trunc >= 0 & fa_2a_sr000002_trunc < fa_2a_sr000001) then 
      cdsc = (cdsc + (((fa_2a_sr000001 - fa_2a_sr000002_trunc)/2) + fa_2a_sr000002_trunc));
       else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_b = 0) then cdsc = (cdsc + quartile1);
        else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_b = 1) then cdsc = (cdsc + quartile2);
         else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_c = 0) then cdsc = (cdsc + quartile3);
          else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_c = 1) then cdsc = (cdsc + 70000);
           else if (fa_2a_uab_a in(-1, -2) | fa_2a_uab_b in(-1, -2) | fa_2a_uab_c in(-1, -2)) then cdsc = -3;
 
/*************************************************************/
/* No need to add components for CDSC - set -3 missing       */
/*************************************************************/

if (cdsc in(-1, -2, -3)) then cdsc = -3;

/****************************/
/* Compute STOCK            */
/****************************/

/*************************************************/
/* STOCK Component - govbonds                    */
/*************************************************/

if (fa_3 = 1 & fa_3a >= 0) then govbonds = (govbonds + fa_3a);
 else if (fa_3 = 1 & fa_3_ref_1 = 1 & fa_3a_sr000001 < 0 & fa_3a_sr000002 < 0 
 & fa_3a_uab_a < 0 & fa_3a_uab_b < 0 & fa_3a_uab_c < 0) then govbonds = -1;
  else if (fa_3 = 1 & fa_3a in(-1, -2) & fa_3a_sr000001 < 0 & fa_3a_sr000002 < 0 
  & fa_3a_uab_a < 0 & fa_3a_uab_b < 0 & fa_3a_uab_c < 0) then govbonds = fa_3a;
    else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 = fa_3a_sr000001) then 
    govbonds = (govbonds + fa_3a_sr000001);
     else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 > fa_3a_sr000001) then 
     govbonds = (govbonds + (((fa_3a_sr000002 - fa_3a_sr000001)/2) + fa_3a_sr000001));
      else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 < fa_3a_sr000001) then 
      govbonds = (govbonds + (((fa_3a_sr000001 - fa_3a_sr000002)/2) + fa_3a_sr000002));
       else if (fa_3a in(-1, -2, -4) & fa_3a_uab_b = 0) then govbonds = (govbonds + quartile1);
        else if (fa_3a in(-1, -2, -4) & fa_3a_uab_b = 1) then govbonds = (govbonds + quartile2);
         else if (fa_3a in(-1, -2, -4) & fa_3a_uab_c = 0) then govbonds = (govbonds + quartile3);
          else if (fa_3a in(-1, -2, -4) & fa_3a_uab_c = 1) then govbonds = (govbonds + 50000);
           else if (fa_3a_uab_a in(-1, -2) | fa_3a_uab_b in(-1, -2) | fa_3a_uab_c in(-1, -2)) then govbonds = -3;

/*************************************************/
/* STOCK Component - mutual                      */
/*************************************************/

if (fa_4 = 1 & fa_4a_trunc >= 0) then mutual = (mutual + fa_4a_trunc);
 else if (fa_4 = 1 & fa_4_ref_1 = 1 & fa_4a_sr000001 < 0 & fa_4a_sr000002 < 0 
 & fa_4a_uab_a < 0 & fa_4a_uab_b < 0 & fa_4a_uab_c < 0) then mutual = -1;
  else if (fa_4 = 1 & fa_4a_trunc in(-1, -2) & fa_4a_sr000001 < 0 & fa_4a_sr000002 < 0 
  & fa_4a_uab_a < 0 & fa_4a_uab_b < 0 & fa_4a_uab_c < 0) then mutual = fa_4a_trunc;
    else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 = fa_4a_sr000001) then 
    mutual = (mutual + fa_4a_sr000001);
     else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 > fa_4a_sr000001) then 
     mutual = (mutual + (((fa_4a_sr000002 - fa_4a_sr000001)/2) + fa_4a_sr000001));
      else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 < fa_4a_sr000001) then 
      mutual = (mutual + (((fa_4a_sr000001 - fa_4a_sr000002)/2) + fa_4a_sr000002));
       else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_b = 0) then mutual = (mutual + quartile1);
        else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_b = 1) then mutual = (mutual + quartile2);
         else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_c = 0) then mutual = (mutual + quartile3);
          else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_c = 1) then mutual = (mutual + 115000);
           else if (fa_4a_uab_a in(-1, -2) | fa_4a_uab_b in(-1, -2) | fa_4a_uab_c in(-1, -2)) then mutual = -3;

/*************************************************/
/* STOCK Component - lifeinsure                  */
/*************************************************/

if (fa_5 = 1 & fa_5a_trunc >= 0) then lifeinsure = (lifeinsure + fa_5a_trunc);
 else if (fa_5 = 1 & fa_5_ref_1 = 1 & fa_5a_sr000001 < 0 & fa_5a_sr000002_trunc < 0 
 & fa_5a_uab_a < 0 & fa_5a_uab_b < 0 & fa_5a_uab_c < 0) then lifeinsure = -1;
  else if (fa_5 = 1 & fa_5a_trunc in(-1, -2) & fa_5a_sr000001 < 0 & fa_5a_sr000002_trunc < 0 
  & fa_5a_uab_a < 0 & fa_5a_uab_b < 0 & fa_5a_uab_c < 0) then lifeinsure = fa_5a_trunc;
    else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002_trunc >= 0 & fa_5a_sr000002_trunc = fa_5a_sr000001) then 
    lifeinsure = (lifeinsure + fa_5a_sr000001);
     else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002_trunc >= 0 & fa_5a_sr000002_trunc > fa_5a_sr000001) then 
     lifeinsure = (lifeinsure + (((fa_5a_sr000002_trunc - fa_5a_sr000001)/2) + fa_5a_sr000001));
      else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002_trunc >= 0 & fa_5a_sr000002_trunc < fa_5a_sr000001) then 
      lifeinsure = (lifeinsure + (((fa_5a_sr000001 - fa_5a_sr000002_trunc)/2) + fa_5a_sr000002_trunc));
       else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_b = 0) then lifeinsure = (lifeinsure + quartile1);
        else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_b = 1) then lifeinsure = (lifeinsure + quartile2);
         else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_c = 0) then lifeinsure = (lifeinsure + quartile3);
          else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_c = 1) then lifeinsure = (lifeinsure + 100000);
           else if (fa_5a_uab_a in(-1, -2) | fa_5a_uab_b in(-1, -2) | fa_5a_uab_c in(-1, -2)) then lifeinsure = -3;

/*************************************************/
/* STOCK Component - shares                      */
/*************************************************/

if (fa_9 = 1 & fa_9a_trunc >= 0) then shares = (shares + fa_9a_trunc);
 else if (fa_9 = 1 & fa_9_ref_1 = 1 & fa_9a_sr000001 < 0 & fa_9a_sr000002_trunc < 0 
 & fa_9a_uab_a < 0 & fa_9a_uab_b < 0 & fa_9a_uab_c < 0) then shares = -1;
  else if (fa_9 = 1 & fa_9a_trunc in(-1, -2) & fa_9a_sr000001 < 0 & fa_9a_sr000002_trunc < 0 
  & fa_9a_uab_a < 0 & fa_9a_uab_b < 0 & fa_9a_uab_c < 0) then shares = fa_9a_trunc;
    else if (fa_9a_sr000001 >= 0 & fa_9a_sr000002_trunc >= 0 & fa_9a_sr000002_trunc = fa_9a_sr000001) then 
    shares = (shares + fa_9a_sr000001);
     else if (fa_9a_sr000001 >= 0 & fa_9a_sr000002_trunc >= 0 & fa_9a_sr000002_trunc > fa_9a_sr000001) then 
     shares = (shares + (((fa_9a_sr000002_trunc - fa_9a_sr000001)/2) + fa_9a_sr000001));
      else if (fa_9a_sr000001 >= 0 & fa_9a_sr000002_trunc >= 0 & fa_9a_sr000002_trunc < fa_9a_sr000001) then 
      shares = (shares + (((fa_9a_sr000001 - fa_9a_sr000002_trunc)/2) + fa_9a_sr000002_trunc));
       else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_b = 0) then shares = (shares + quartile1);
        else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_b = 1) then shares = (shares + quartile2);
         else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_c = 0) then shares = (shares + quartile3);
          else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_c = 1) then shares = (shares + 125000);
           else if (fa_9a_uab_a in(-1, -2) | fa_9a_uab_b in(-1, -2) | fa_9a_uab_c in(-1, -2)) then shares = -3;

/*************************************************/
/* STOCK Component - corpbond                    */
/*************************************************/

if (fa_10 = 1 & fa_10a_trunc >= 0) then corpbond = (corpbond + fa_10a_trunc);
 else if (fa_10 = 1 & fa_10_ref_1 = 1 & fa_10a_sr000001 < 0 & fa_10a_sr000002 < 0 
 & fa_10a_uab_a < 0 & fa_10a_uab_b < 0 & fa_10a_uab_c < 0) then corpbond = -1;
  else if (fa_10 = 1 & fa_10a_trunc in(-1, -2) & fa_10a_sr000001 < 0 & fa_10a_sr000002 < 0 
  & fa_10a_uab_a < 0 & fa_10a_uab_b < 0 & fa_10a_uab_c < 0) then corpbond = fa_10a_trunc;
    else if (fa_10a_sr000001 >= 0 & fa_10a_sr000002 >= 0 & fa_10a_sr000002 = fa_10a_sr000001) then 
    corpbond = (corpbond + fa_10a_sr000001);
     else if (fa_10a_sr000001 >= 0 & fa_10a_sr000002 >= 0 & fa_10a_sr000002 > fa_10a_sr000001) then 
     corpbond = (corpbond + (((fa_10a_sr000002 - fa_10a_sr000001)/2) + fa_10a_sr000001));
      else if (fa_10a_sr000001 >= 0 & fa_10a_sr000002 >= 0 & fa_10a_sr000002 < fa_10a_sr000001) then 
      corpbond = (corpbond + (((fa_10a_sr000001 - fa_10a_sr000002)/2) + fa_10a_sr000002));
       else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_b = 0) then corpbond = (corpbond + quartile1);
        else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_b = 1) then corpbond = (corpbond + quartile2);
         else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_c = 0) then corpbond = (corpbond + quartile3);
          else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_c = 1) then corpbond = (corpbond + 100000);
           else if (fa_10a_uab_a in(-1, -2) | fa_10a_uab_b in(-1, -2) | fa_10a_uab_c in(-1, -2)) then corpbond = -3;

/*************************************************/
/* STOCK Component - moneyowedtor                */
/*************************************************/

if (fa_11 = 1 & fa_11a >= 0) then moneyowedtor = (moneyowedtor + fa_11a);
 else if (fa_11 = 1 & fa_11_ref_1 = 1 & fa_11a_sr000001_trunc < 0 & fa_11a_sr000002_trunc < 0 
 & fa_11a_uab_a < 0 & fa_11a_uab_b < 0 & fa_11a_uab_c < 0) then moneyowedtor = -1;
  else if (fa_11 = 1 & fa_11a in(-1, -2) & fa_11a_sr000001_trunc < 0 & fa_11a_sr000002_trunc < 0 
  & fa_11a_uab_a < 0 & fa_11a_uab_b < 0 & fa_11a_uab_c < 0) then moneyowedtor = fa_11a;
    else if (fa_11a_sr000001_trunc >= 0 & fa_11a_sr000002_trunc >= 0 & fa_11a_sr000002_trunc = fa_11a_sr000001_trunc) then 
    moneyowedtor = (moneyowedtor + fa_11a_sr000001_trunc);
     else if (fa_11a_sr000001_trunc >= 0 & fa_11a_sr000002_trunc >= 0 & fa_11a_sr000002_trunc > fa_11a_sr000001_trunc) then 
     moneyowedtor = (moneyowedtor + (((fa_11a_sr000002_trunc - fa_11a_sr000001_trunc)/2) + fa_11a_sr000001_trunc));
      else if (fa_11a_sr000001_trunc >= 0 & fa_11a_sr000002_trunc >= 0 & fa_11a_sr000002_trunc < fa_11a_sr000001_trunc) then 
      moneyowedtor = (moneyowedtor + (((fa_11a_sr000001_trunc - fa_11a_sr000002_trunc)/2) + fa_11a_sr000002_trunc));
       else if (fa_11a in(-1, -2, -4) & fa_11a_uab_b = 0) then moneyowedtor = (moneyowedtor + quartile1);
        else if (fa_11a in(-1, -2, -4) & fa_11a_uab_b = 1) then moneyowedtor = (moneyowedtor + quartile2);
         else if (fa_11a in(-1, -2, -4) & fa_11a_uab_c = 0) then moneyowedtor = (moneyowedtor + quartile3);
          else if (fa_11a in(-1, -2, -4) & fa_11a_uab_c = 1) then moneyowedtor = (moneyowedtor + 67500);
           else if (fa_11a_uab_a in(-1, -2) | fa_11a_uab_b in(-1, -2) | fa_11a_uab_c in(-1, -2)) then moneyowedtor = -3;

/*******************************/
/* Add components STOCK        */
/*******************************/

if (govbonds >= 0) then stockc = (stockc + govbonds); 
if (mutual >= 0) then stockc = (stockc + mutual);
if (lifeinsure >= 0) then stockc = (stockc + lifeinsure);
if (shares >= 0) then stockc = (stockc + shares);
if (corpbond >= 0) then stockc = (stockc + corpbond);
if (moneyowedtor >= 0) then stockc = (stockc + moneyowedtor);
if (govbonds in(-1, -2, -3)) then stockc = -3;
else if (mutual in(-1, -2, -3)) then stockc = -3;
else if (lifeinsure in(-1, -2, -3)) then stockc = -3;
else if (shares in(-1, -2, -3)) then stockc = -3;
else if (corpbond in(-1, -2, -3)) then stockc = -3;
else if (moneyowedtor in(-1, -2, -3)) then stockc = -3;

/****************************/
/* Compute HOME             */
/****************************/

/*************************************************/
/* HOME Component - home1                        */
/*************************************************/

if (nfa_1 = 1 & nfa_1a_trunc >= 0) then home1 = (home1 + nfa_1a_trunc);
 else if (nfa_1 = 1 & nfa_1_ref_1 = 1 & nfa_1a_sr000001_trunc < 0 & nfa_1a_sr000002_trunc < 0 
 & nfa_1a_uab_a < 0 & nfa_1a_uab_b < 0 & nfa_1a_uab_c < 0) then home1 = -1;
  else if (nfa_1 = 1 & nfa_1a_trunc in(-1, -2) & nfa_1a_sr000001_trunc < 0 & nfa_1a_sr000002_trunc < 0 
  & nfa_1a_uab_a < 0 & nfa_1a_uab_b < 0 & nfa_1a_uab_c < 0) then home1 = nfa_1a_trunc;
    else if (nfa_1a_sr000001_trunc >= 0 & nfa_1a_sr000002_trunc >= 0 & nfa_1a_sr000002_trunc = nfa_1a_sr000001_trunc) then 
    home1 = (home1 + nfa_1a_sr000001_trunc);
     else if (nfa_1a_sr000001_trunc >= 0 & nfa_1a_sr000002_trunc >= 0 & nfa_1a_sr000002_trunc > nfa_1a_sr000001_trunc) then 
     home1 = (home1 + (((nfa_1a_sr000002_trunc - nfa_1a_sr000001_trunc)/2) + nfa_1a_sr000001_trunc));
      else if (nfa_1a_sr000001_trunc >= 0 & nfa_1a_sr000002_trunc >= 0 & nfa_1a_sr000002_trunc < nfa_1a_sr000001_trunc) then 
      home1 = (home1 + (((nfa_1a_sr000001_trunc - nfa_1a_sr000002_trunc)/2) + nfa_1a_sr000002_trunc));
       else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_b = 0) then home1 = (home1 + quartile1);
        else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_b = 1) then home1 = (home1 + quartile2);
         else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_c = 0) then home1 = (home1 + quartile3);
          else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_c = 1) then home1 = (home1 + 175000);
           else if (nfa_1a_uab_a in(-1, -2) | nfa_1a_uab_b in(-1, -2) | nfa_1a_uab_c in(-1, -2)) then home1 = -3;

/*************************************************/
/* HOME Component - secondhome                   */
/*************************************************/

if (nfa_2 = 1 & nfa_2a_trunc >= 0) then secondhome = (secondhome + nfa_2a_trunc);
 else if (nfa_2 = 1 & nfa_2_ref_1 = 1 & nfa_2a_sr000001 < 0 & nfa_2a_sr000002 < 0 
 & nfa_2a_uab_a < 0 & nfa_2a_uab_b < 0 & nfa_2a_uab_c < 0) then secondhome = -1;
  else if (nfa_2 = 1 & nfa_2a_trunc in(-1, -2) & nfa_2a_sr000001 < 0 & nfa_2a_sr000002 < 0 
  & nfa_2a_uab_a < 0 & nfa_2a_uab_b < 0 & nfa_2a_uab_c < 0) then secondhome = nfa_2a_trunc;
    else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 = nfa_2a_sr000001) then 
    secondhome = (secondhome + nfa_2a_sr000001);
     else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 > nfa_2a_sr000001) then 
     secondhome = (secondhome + (((nfa_2a_sr000002 - nfa_2a_sr000001)/2) + nfa_2a_sr000001));
      else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 < nfa_2a_sr000001) then 
      secondhome = (secondhome + (((nfa_2a_sr000001 - nfa_2a_sr000002)/2) + nfa_2a_sr000002));
       else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_b = 0) then secondhome = (secondhome + quartile1);
        else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_b = 1) then secondhome = (secondhome + quartile2);
         else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_c = 0) then secondhome = (secondhome + quartile3);
          else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_c = 1) then secondhome = (secondhome + 150000);
           else if (nfa_2a_uab_a in(-1, -2) | nfa_2a_uab_b in(-1, -2) | nfa_2a_uab_c in(-1, -2)) then secondhome = -3;

/*******************************/
/* Add components HOME         */
/*******************************/

if (home1 >= 0) then homec = (homec + home1); 
if (secondhome >= 0) then homec = (homec + secondhome);
if (home1 in(-1, -2, -3)) then homec = -3;
else if (secondhome in(-1, -2, -3)) then homec = -3;

/****************************/
/* Compute MORT             */
/****************************/

/*************************************************/
/* MORT Component - mort1                        */
/*************************************************/

if (nfa_1b_trunc >= 0) then mort1 = (mort1 + nfa_1b_trunc);
 else if (nfa_1b_ref_1 = 1 & nfa_1b_sr000001 < 0 & nfa_1b_sr000002 < 0 
 & nfa_1b_uab_a < 0 & nfa_1b_uab_b < 0 & nfa_1b_uab_c < 0) then mort1 = -1;
  else if (nfa_1b_trunc in(-1, -2) & nfa_1b_sr000001 < 0 & nfa_1b_sr000002 < 0 
  & nfa_1b_uab_a < 0 & nfa_1b_uab_b < 0 & nfa_1b_uab_c < 0) then mort1 = nfa_1b_trunc;
    else if (nfa_1b_sr000001 >= 0 & nfa_1b_sr000002 >= 0 & nfa_1b_sr000002 = nfa_1b_sr000001) then 
    mort1 = (mort1 + nfa_1b_sr000001);
     else if (nfa_1b_sr000001 >= 0 & nfa_1b_sr000002 >= 0 & nfa_1b_sr000002 > nfa_1b_sr000001) then 
     mort1 = (mort1 + (((nfa_1b_sr000002 - nfa_1b_sr000001)/2) + nfa_1b_sr000001));
      else if (nfa_1b_sr000001 >= 0 & nfa_1b_sr000002 >= 0 & nfa_1b_sr000002 < nfa_1b_sr000001) then 
      mort1 = (mort1 + (((nfa_1b_sr000001 - nfa_1b_sr000002)/2) + nfa_1b_sr000002));
       else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_b = 0) then mort1 = (mort1 + quartile1);
        else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_b = 1) then mort1 = (mort1 + quartile2);
         else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_c = 0) then mort1 = (mort1 + quartile3);
          else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_c = 1) then mort1 = (mort1 + 120000);
           else if (nfa_1b_uab_a in(-1, -2) | nfa_1b_uab_b in(-1, -2) | nfa_1b_uab_c in(-1, -2)) then mort1 = -3;

/*************************************************/
/* MORT Component - secondmort                   */
/*************************************************/

if (nfa_2b_trunc >= 0) then secondmort = (secondmort + nfa_2b_trunc);
 else if (nfa_2b_ref_1 = 1 & nfa_2b_sr000001 < 0 & nfa_2b_sr000002 < 0 
 & nfa_2b_uab_a < 0 & nfa_2b_uab_b < 0 & nfa_2b_uab_c < 0) then secondmort = -1;
  else if (nfa_2b_trunc in(-1, -2) & nfa_2b_sr000001 < 0 & nfa_2b_sr000002 < 0 
  & nfa_2b_uab_a < 0 & nfa_2b_uab_b < 0 & nfa_2b_uab_c < 0) then secondmort = nfa_2b_trunc;
    else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 = nfa_2b_sr000001) then 
    secondmort = (secondmort + nfa_2b_sr000001);
     else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 > nfa_2b_sr000001) then 
     secondmort = (secondmort + (((nfa_2b_sr000002 - nfa_2b_sr000001)/2) + nfa_2b_sr000001));
      else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 < nfa_2b_sr000001) then 
      secondmort = (secondmort + (((nfa_2b_sr000001 - nfa_2b_sr000002)/2) + nfa_2b_sr000002));
       else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_b = 0) then secondmort = (secondmort + quartile1);
        else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_b = 1) then secondmort = (secondmort + quartile2);
         else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_c = 0) then secondmort = (secondmort + quartile3);
          else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_c = 1) then secondmort = (secondmort + 120000);
           else if (nfa_2b_uab_a in(-1, -2) | nfa_2b_uab_b in(-1, -2) | nfa_2b_uab_c in(-1, -2)) then secondmort = -3;

/*******************************/
/* Add components MORT         */
/*******************************/

if (mort1 >= 0) then mortc = (mortc + mort1); 
if (secondmort >= 0) then mortc = (mortc + secondmort);
if (mort1 in(-1, -2, -3)) then mortc = -3;
else if (secondmort in(-1, -2, -3)) then mortc = -3;

/****************************/
/* Compute PDEBT            */
/****************************/

/*************************************************/
/* PDEBT Component - pdebt1                      */
/*************************************************/

if (nfa_1c >= 0) then pdebt1 = (pdebt1 + nfa_1c);
 else if (nfa_1c_ref_1 = 1 & nfa_1c_sr000001 < 0 & nfa_1c_sr000002 < 0 
 & nfa_1c_uab_a < 0 & nfa_1c_uab_b < 0 & nfa_1c_uab_c < 0) then pdebt1 = -1;
  else if (nfa_1c in(-1, -2) & nfa_1c_sr000001 < 0 & nfa_1c_sr000002 < 0 
  & nfa_1c_uab_a < 0 & nfa_1c_uab_b < 0 & nfa_1c_uab_c < 0) then pdebt1 = nfa_1c;
    else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 = nfa_1c_sr000001) then 
    pdebt1 = (pdebt1 + nfa_1c_sr000001);
     else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 > nfa_1c_sr000001) then 
     pdebt1 = (pdebt1 + (((nfa_1c_sr000002 - nfa_1c_sr000001)/2) + nfa_1c_sr000001));
      else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 < nfa_1c_sr000001) then 
      pdebt1 = (pdebt1 + (((nfa_1c_sr000001 - nfa_1c_sr000002)/2) + nfa_1c_sr000002));
       else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_b = 0) then pdebt1 = (pdebt1 + quartile1);
        else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_b = 1) then pdebt1 = (pdebt1 + quartile2);
         else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_c = 0) then pdebt1 = (pdebt1 + quartile3);
          else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_c = 1) then pdebt1 = (pdebt1 + 45000);
           else if (nfa_1c_uab_a in(-1, -2) | nfa_1c_uab_b in(-1, -2) | nfa_1c_uab_c in(-1, -2)) then pdebt1 = -3;

/*************************************************/
/* PDEBT Component - secondpdebt                 */
/*************************************************/

if (nfa_2c >= 0) then secondpdebt = (secondpdebt + nfa_2c);
 else if (nfa_2c_ref_1 = 1 & nfa_2c_sr000001 < 0 & nfa_2c_sr000002 < 0 
 & nfa_2c_uab_a < 0 & nfa_2c_uab_b < 0 & nfa_2c_uab_c < 0) then secondpdebt = -1;
  else if (nfa_2c in(-1, -2) & nfa_2c_sr000001 < 0 & nfa_2c_sr000002 < 0 
  & nfa_2c_uab_a < 0 & nfa_2c_uab_b < 0 & nfa_2c_uab_c < 0) then secondpdebt = nfa_2c;
    else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 = nfa_2c_sr000001) then 
    secondpdebt = (secondpdebt + nfa_2c_sr000001);
     else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 > nfa_2c_sr000001) then 
     secondpdebt = (secondpdebt + (((nfa_2c_sr000002 - nfa_2c_sr000001)/2) + nfa_2c_sr000001));
      else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 < nfa_2c_sr000001) then 
      secondpdebt = (secondpdebt + (((nfa_2c_sr000001 - nfa_2c_sr000002)/2) + nfa_2c_sr000002));
       else if (nfa_2c in(-1, -2, -4) & nfa_2c_uab_b = 0) then secondpdebt = (secondpdebt + quartile1);
        else if (nfa_2c in(-1, -2, -4) & nfa_2c_uab_b = 1) then secondpdebt = (secondpdebt + quartile2);
         else if (nfa_2c in(-1, -2, -4) & nfa_2c_uab_c = 0) then secondpdebt = (secondpdebt + quartile3);
          else if (nfa_2c in(-1, -2, -4) & nfa_2c_uab_c = 1) then secondpdebt = (secondpdebt + 45000);
           else if (nfa_2c_uab_a in(-1, -2)) then secondpdebt = -3;

/*******************************/
/* Add components PDEBT        */
/*******************************/

if (pdebt1 >= 0) then pdebtc = (pdebtc + pdebt1); 
if (secondpdebt >= 0) then pdebtc = (pdebtc + secondpdebt);
if (pdebt1 in(-1, -2, -3)) then pdebtc = -3;
else if (secondpdebt in(-1, -2, -3)) then pdebtc = -3;

/****************************/
/* Compute IRA              */
/****************************/

/*************************************************/
/* IRA Component - ira1                          */
/*************************************************/

if (fa_8 = 1 & fa_8d_trunc_01 >= 0) then ira1 = (ira1 + fa_8d_trunc_01);
  else if (fa_8 = 1 & fa_8d_trunc_01 in(-1, -2) & fa_8d_sr000001_01 < 0 & fa_8d_sr000002_01 < 0 
  & fa_8d_uab_a_01 < 0 & fa_8d_uab_b_01 < 0 & fa_8d_uab_c_01 < 0) then ira1 = fa_8d_trunc_01;
    else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 >= 0 & fa_8d_sr000002_01 = fa_8d_sr000001_01) then 
    ira1 = (ira1 + fa_8d_sr000001_01);
     else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 >= 0 & fa_8d_sr000002_01 > fa_8d_sr000001_01) then 
     ira1 = (ira1 + (((fa_8d_sr000002_01 - fa_8d_sr000001_01)/2) + fa_8d_sr000001_01));
      else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 >= 0 & fa_8d_sr000002_01 < fa_8d_sr000001_01) then 
      ira1 = (ira1 + (((fa_8d_sr000001_01 - fa_8d_sr000002_01)/2) + fa_8d_sr000002_01));
       else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_b_01 = 0) then ira1 = (ira1 + quartile1);
        else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_b_01 = 1) then ira1 = (ira1 + quartile2);
         else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_c_01 = 0) then ira1 = (ira1 + quartile3);
          else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_c_01 = 1) then ira1 = (ira1 + 100000);
           else if (fa_8d_uab_a_01 in(-1, -2) | fa_8d_uab_b_01 in(-1, -2) | fa_8d_uab_c_01 in(-1, -2)) then ira1 = -3;

/*************************************************/
/* IRA Component - ira2                          */
/*************************************************/

if (fa_8 = 1 & fa_8d_trunc_02 >= 0) then ira2 = (ira2 + fa_8d_trunc_02);
  else if (fa_8 = 1 & fa_8d_trunc_02 in(-1, -2) & fa_8d_sr000001_02 < 0 & fa_8d_sr000002_02 < 0 
  & fa_8d_uab_a_02 < 0 & fa_8d_uab_b_02 < 0 & fa_8d_uab_c_02 < 0) then ira2 = fa_8d_trunc_02;
    else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 >= 0 & fa_8d_sr000002_02 = fa_8d_sr000001_02) then 
    ira2 = (ira2 + fa_8d_sr000001_02);
     else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 >= 0 & fa_8d_sr000002_02 > fa_8d_sr000001_02) then 
     ira2 = (ira2 + (((fa_8d_sr000002_02 - fa_8d_sr000001_02)/2) + fa_8d_sr000001_02));
      else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 >= 0 & fa_8d_sr000002_02 < fa_8d_sr000001_02) then 
      ira2 = (ira2 + (((fa_8d_sr000001_02 - fa_8d_sr000002_02)/2) + fa_8d_sr000002_02));
       else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_b_02 = 0) then ira2 = (ira2 + quartile1);
        else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_b_02 = 1) then ira2 = (ira2 + quartile2);
         else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_c_02 = 0) then ira2 = (ira2 + quartile3);
          else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_c_02 = 1) then ira2 = (ira2 + 54000);
           else if (fa_8d_uab_a_02 in(-1, -2) | fa_8d_uab_b_02 in(-1, -2) | fa_8d_uab_c_02 in(-1, -2)) then ira2 = -3;

/*************************************************/
/* IRA Component - ira3                          */
/*************************************************/

if (fa_8 = 1 & fa_8d_trunc_03 >= 0) then ira3 = (ira3 + fa_8d_trunc_03);
  else if (fa_8 = 1 & fa_8d_trunc_03 in(-1, -2) & fa_8d_sr000001_03 < 0 & fa_8d_sr000002_03 < 0 
  & fa_8d_uab_a_03 < 0 & fa_8d_uab_c_03 < 0) then ira3 = fa_8d_trunc_03;
    else if (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_03 >= 0 & fa_8d_sr000002_03 = fa_8d_sr000001_03) then 
    ira3 = (ira3 + fa_8d_sr000001_03);
     else if (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_03 >= 0 & fa_8d_sr000002_03 > fa_8d_sr000001_03) then 
     ira3 = (ira3 + (((fa_8d_sr000002_03 - fa_8d_sr000001_03)/2) + fa_8d_sr000001_03));
      else if (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_03 >= 0 & fa_8d_sr000002_03 < fa_8d_sr000001_03) then 
      ira3 = (ira3 + (((fa_8d_sr000001_03 - fa_8d_sr000002_03)/2) + fa_8d_sr000002_03));
       else if (fa_8d_trunc_03 in(-1, -2, -4) & fa_8d_uab_c_03 = 0) then ira3 = (ira3 + quartile3);
        else if (fa_8d_trunc_03 in(-1, -2, -4) & fa_8d_uab_c_03 = 1) then ira3 = (ira3 + 80000);
         else if (fa_8d_uab_a_03 in(-1, -2) | fa_8d_uab_c_03 in(-1, -2)) then ira3 = -3;

/*************************************************/
/* IRA Component - ira4                          */
/*************************************************/

if (fa_8 = 1 & fa_8d_trunc_04 >= 0) then ira4 = (ira4 + fa_8d_trunc_04);
  else if (fa_8 = 1 & fa_8d_trunc_04 in(-1, -2) & fa_8d_sr000001_04 < 0 & fa_8d_sr000002_04 < 0) 
  then ira4 = fa_8d_trunc_04;
    else if (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_04 >= 0 & fa_8d_sr000002_04 = fa_8d_sr000001_04) then 
    ira4 = (ira4 + fa_8d_sr000001_04);
     else if (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_04 >= 0 & fa_8d_sr000002_04 > fa_8d_sr000001_04) then 
     ira4 = (ira4 + (((fa_8d_sr000002_04 - fa_8d_sr000001_04)/2) + fa_8d_sr000001_04));
      else if (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_04 >= 0 & fa_8d_sr000002_04 < fa_8d_sr000001_04) then 
      ira4 = (ira4 + (((fa_8d_sr000001_04 - fa_8d_sr000002_04)/2) + fa_8d_sr000002_04));

/*************************************************/
/* IRA Component - ira5                          */
/*************************************************/

if (fa_8 = 1 & fa_8d_trunc_05 >= 0) then ira5 = (ira5 + fa_8d_trunc_05);
  else if (fa_8 = 1 & fa_8d_trunc_05 in(-1, -2) & fa_8d_sr000001_05 < 0 & fa_8d_sr000002_05 < 0 
  & fa_8d_uab_a_05 < 0 & fa_8d_uab_c_05 < 0) then ira5 = fa_8d_trunc_05;
    else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 >= 0 & fa_8d_sr000002_05 = fa_8d_sr000001_05) then 
    ira5 = (ira5 + fa_8d_sr000001_05);
     else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 >= 0 & fa_8d_sr000002_05 > fa_8d_sr000001_05) then 
     ira5 = (ira5 + (((fa_8d_sr000002_05 - fa_8d_sr000001_05)/2) + fa_8d_sr000001_05));
      else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 >= 0 & fa_8d_sr000002_05 < fa_8d_sr000001_05) then 
      ira5 = (ira5 + (((fa_8d_sr000001_05 - fa_8d_sr000002_05)/2) + fa_8d_sr000002_05));
       else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_c_05 = 0) then ira5 = (ira5 + quartile3);
        else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_c_05 = 1) then ira5 = (ira5 + 84000);
         else if (fa_8d_uab_a_05 in(-1, -2) | fa_8d_uab_c_05 in(-1, -2)) then ira5 = -3;
 
/*************************************************/
/* IRA Component - ira6                          */
/*************************************************/

if (fa_8 = 1 & fa_8d_trunc_06 >= 0) then ira6 = (ira6 + fa_8d_trunc_06);
  else if (fa_8 = 1 & fa_8d_trunc_06 in(-1, -2) & fa_8d_sr000001_06 < 0 & fa_8d_sr000002_06 < 0 
  & fa_8d_uab_a_06 < 0 & fa_8d_uab_b_06 < 0 & fa_8d_uab_c_06 < 0) then ira6 = fa_8d_trunc_06;
    else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 >= 0 & fa_8d_sr000002_06 = fa_8d_sr000001_06) then 
    ira6 = (ira6 + fa_8d_sr000001_06);
     else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 >= 0 & fa_8d_sr000002_06 > fa_8d_sr000001_06) then 
     ira6 = (ira6 + (((fa_8d_sr000002_06 - fa_8d_sr000001_06)/2) + fa_8d_sr000001_06));
      else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 >= 0 & fa_8d_sr000002_06 < fa_8d_sr000001_06) then 
      ira6 = (ira6 + (((fa_8d_sr000001_06 - fa_8d_sr000002_06)/2) + fa_8d_sr000002_06));
       else if (fa_8d_trunc_06 in(-1, -2, -4) & fa_8d_uab_b_06 = 0) then ira6 = (ira6 + quartile1);
        else if (fa_8d_trunc_06 in(-1, -2, -4) & fa_8d_uab_b_06 = 1) then ira6 = (ira6 + quartile2);
         else if (fa_8d_trunc_06 in(-1, -2, -4) & fa_8d_uab_c_06 = 0) then ira6 = (ira6 + quartile3);
          else if (fa_8d_trunc_06 in(-1, -2, -4) & fa_8d_uab_c_06 = 1) then ira6 = (ira6 + 60000);
           else if (fa_8d_uab_a_06 in(-1, -2) | fa_8d_uab_b_06 in(-1, -2) | fa_8d_uab_c_06 in(-1, -2)) then ira6 = -3;
 
/*************************************************/
/* IRA Component - ira7                          */
/*************************************************/

if (fa_8 = 1 & fa_8d_trunc_07 >= 0) then ira7 = (ira7 + fa_8d_trunc_07);
  else if (fa_8 = 1 & fa_8d_trunc_07 in(-1, -2) & fa_8d_sr000001_07 < 0 & fa_8d_sr000002_07 < 0 
  & fa_8d_uab_a_07 < 0 & fa_8d_uab_c_07 < 0) then ira7 = fa_8d_trunc_07;
    else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 >= 0 & fa_8d_sr000002_07 = fa_8d_sr000001_07) then 
    ira7 = (ira7 + fa_8d_sr000001_07);
     else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 >= 0 & fa_8d_sr000002_07 > fa_8d_sr000001_07) then 
     ira7 = (ira7 + (((fa_8d_sr000002_07 - fa_8d_sr000001_07)/2) + fa_8d_sr000001_07));
      else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 >= 0 & fa_8d_sr000002_07 < fa_8d_sr000001_07) then 
      ira7 = (ira7 + (((fa_8d_sr000001_07 - fa_8d_sr000002_07)/2) + fa_8d_sr000002_07));
       else if (fa_8d_trunc_07 in(-1, -2, -4) & fa_8d_uab_c_07 = 0) then ira7 = (ira7 + quartile3);
        else if (fa_8d_trunc_07 in(-1, -2, -4) & fa_8d_uab_c_07 = 1) then ira7 = (ira7 + 130000);
         else if (fa_8d_uab_a_07 in(-1, -2) | fa_8d_uab_c_07 in(-1, -2)) then ira7 = -3;
 
/*******************************/
/* Add components IRA          */
/*******************************/

if (ira1 >= 0) then irac = (irac + ira1); 
if (ira2 >= 0) then irac = (irac + ira2); 
if (ira3 >= 0) then irac = (irac + ira3); 
if (ira4 >= 0) then irac = (irac + ira4); 
if (ira5 >= 0) then irac = (irac + ira5); 
if (ira6 >= 0) then irac = (irac + ira6); 
if (ira7 >= 0) then irac = (irac + ira7); 
if (ira1 in(-1, -2, -3)) then irac = -3;
else if (ira2 in(-1, -2, -3)) then irac = -3;
else if (ira3 in(-1, -2, -3)) then irac = -3;
else if (ira4 in(-1, -2, -3)) then irac = -3;
else if (ira5 in(-1, -2, -3)) then irac = -3;
else if (ira6 in(-1, -2, -3)) then irac = -3;
else if (ira7 in(-1, -2, -3)) then irac = -3;

/****************************/
/* Compute A401K            */
/****************************/

/*************************************************/
/* A401K component - r_401k                 */
/*************************************************/

if (fa_6b = 1 & fa_6e_trunc >= 0) then r_401k = (r_401k + fa_6e_trunc);
 else if (fa_6b = 1 & fa_6e_ref_1 = 1 & fa_6e_sr000001 < 0 & fa_6e_sr000002 < 0 
 & fa_6e_uab_a < 0 & fa_6e_uab_b < 0 & fa_6e_uab_c < 0) then r_401k = -1;
  else if (fa_6b = 1 & fa_6e_trunc in(-1, -2) & fa_6e_sr000001 < 0 & fa_6e_sr000002 < 0 
  & fa_6e_uab_a < 0 & fa_6e_uab_b < 0 & fa_6e_uab_c < 0) then r_401k = fa_6e_trunc;
   else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 = fa_6e_sr000001) then 
    r_401k = (r_401k + fa_6e_sr000001);
     else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 > fa_6e_sr000001) then 
     r_401k = (r_401k + (((fa_6e_sr000002 - fa_6e_sr000001)/2) + fa_6e_sr000001));
      else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 < fa_6e_sr000001) then 
      r_401k = (r_401k + (((fa_6e_sr000001 - fa_6e_sr000002)/2) + fa_6e_sr000002));
       else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_b = 0) then r_401k = (r_401k + quartile1);
        else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_b = 1) then r_401k = (r_401k + quartile2);
         else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_c = 0) then r_401k = (r_401k + quartile3);
          else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_c = 1) then r_401k = (r_401k + 100000);
           else if (fa_6e_uab_a in(-1, -2) | fa_6e_uab_b in(-1, -2) | fa_6e_uab_c in(-1, -2)) then r_401k = -3;


/*************************************************/
/* A401K component - sp_401k                     */
/*************************************************/

if (fa_7 = 1 & fa_7c_trunc >= 0) then sp_401k = (sp_401k + fa_7c_trunc);
 else if (fa_7 = 1 & fa_7c_ref_1 = 1 & fa_7c_sr000001 < 0 & fa_7c_sr000002 < 0 
 & fa_7c_uab_a < 0 & fa_7c_uab_b < 0 & fa_7c_uab_c < 0) then sp_401k = -1;
  else if (fa_7 = 1 & fa_7c_trunc in(-1, -2) & fa_7c_sr000001 < 0 & fa_7c_sr000002 < 0 
  & fa_7c_uab_a < 0 & fa_7c_uab_b < 0 & fa_7c_uab_c < 0) then sp_401k = fa_7c_trunc;
    else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002 >= 0 & fa_7c_sr000002 = fa_7c_sr000001) then 
    sp_401k = (sp_401k + fa_7c_sr000001);
     else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002 >= 0 & fa_7c_sr000002 > fa_7c_sr000001) then 
     sp_401k = (sp_401k + (((fa_7c_sr000002 - fa_7c_sr000001)/2) + fa_7c_sr000001));
      else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002 >= 0 & fa_7c_sr000002 < fa_7c_sr000001) then 
      sp_401k = (sp_401k + (((fa_7c_sr000001 - fa_7c_sr000002)/2) + fa_7c_sr000002));
       else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_b = 0) then sp_401k = (sp_401k + quartile1);
        else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_b = 1) then sp_401k = (sp_401k + quartile2);
         else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_c = 0) then sp_401k = (sp_401k + quartile3);
          else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_c = 1) then sp_401k = (sp_401k + 100000);
           else if (fa_7c_uab_a in(-1, -2) | fa_7c_uab_b in(-1, -2) | fa_7c_uab_c in(-1, -2)) then sp_401k = -3;

/*******************************/
/* Add components A401K        */
/*******************************/

if (r_401k >= 0) then a401kc = (a401kc + r_401k); 
if (sp_401k >= 0) then a401kc = (a401kc + sp_401k); 
if (r_401k in(-1, -2, -3)) then a401kc = -3;
else if (sp_401k in(-1, -2, -3)) then a401kc = -3;

/****************************/
/* Compute CDEBT            */
/****************************/
/*************************************************/
/* CDEBT Component - amtowe_assetpoorcars1       */
/*************************************************/

if (sc_12b_01 >= 0) then amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + sc_12b_01);
  else if (sc_12b_01 in(-1, -2) & sc_12b_sr000001_01 < 0 & sc_12b_sr000002_01 < 0 
  & sc_12b_uab_a_01 < 0) then amtowe_assetpoorcars1 = sc_12b_01;
   else if (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 >= 0 & sc_12b_sr000002_01 = sc_12b_sr000001_01) then 
   amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + sc_12b_sr000001_01);
    else if (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 >= 0 & sc_12b_sr000002_01 > sc_12b_sr000001_01) then 
    amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + (((sc_12b_sr000002_01 - sc_12b_sr000001_01)/2) + sc_12b_sr000001_01));
     else if (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 >= 0 & sc_12b_sr000002_01 < sc_12b_sr000001_01) then 
     amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + (((sc_12b_sr000001_01 - sc_12b_sr000002_01)/2) + sc_12b_sr000002_01));

/*************************************************/
/* CDEBT Component - amtowe_assetpoorcars2       */
/*************************************************/

if (sc_12b_02 >= 0) then amtowe_assetpoorcars2 = (amtowe_assetpoorcars2 + sc_12b_02);
  else if (sc_12b_02 in(-1, -2) /* & sc_12b_sr000001_02 < 0 & sc_12b_sr000002_02 < 0 
  & sc_12b_uab_a_02 < 0 & sc_12b_uab_b_02 < 0 & sc_12b_uab_c_02 < 0*/) then amtowe_assetpoorcars2 = sc_12b_02;

/*************************************************/
/* CDEBT Component - amtowe_assetpoorcars3       */
/*************************************************/

if (sc_12b_03 >= 0) then amtowe_assetpoorcars3 = (amtowe_assetpoorcars3 + sc_12b_03);
  else if (sc_12b_03 in(-1, -2) & sc_12b_sr000001_03 < 0 & sc_12b_sr000002_03 < 0 
  & sc_12b_uab_a_03 < 0) then amtowe_assetpoorcars3 = sc_12b_03;
   else if (sc_12b_sr000001_03 >= 0 & sc_12b_sr000002_03 >= 0 & sc_12b_sr000002_03 = sc_12b_sr000001_03) then 
   amtowe_assetpoorcars3 = (amtowe_assetpoorcars3 + sc_12b_sr000001_03);
    else if (sc_12b_sr000001_03 >= 0 & sc_12b_sr000002_03 >= 0 & sc_12b_sr000002_03 > sc_12b_sr000001_03) then 
    amtowe_assetpoorcars3 = (amtowe_assetpoorcars3 + (((sc_12b_sr000002_03 - sc_12b_sr000001_03)/2) + sc_12b_sr000001_03));
     else if (sc_12b_sr000001_03 >= 0 & sc_12b_sr000002_03 >= 0 & sc_12b_sr000002_03 < sc_12b_sr000001_03) then 
     amtowe_assetpoorcars3 = (amtowe_assetpoorcars3 + (((sc_12b_sr000001_03 - sc_12b_sr000002_03)/2) + sc_12b_sr000002_03));
 
/*************************************************/
/* CDEBT Component - amountowe_vehicles1         */
/*************************************************/

if (nfa_4f_trunc_01 >= 0) then amountowe_vehicles1 = (amountowe_vehicles1 + nfa_4f_trunc_01);
 else if (nfa_4f_trunc_01 in(-1, -2) & nfa_4f_sr000001_trunc_01 < 0 & nfa_4f_sr000002_trunc_01 < 0 
 & nfa_4f_uab_a_01 < 0 & nfa_4f_uab_b_01 < 0 & nfa_4f_uab_c_01 < 0) then amountowe_vehicles1 = nfa_4f_trunc_01;
   else if (nfa_4f_sr000001_trunc_01 >= 0 & nfa_4f_sr000002_trunc_01 >= 0 & nfa_4f_sr000002_trunc_01 = nfa_4f_sr000001_trunc_01) then 
   amountowe_vehicles1 = (amountowe_vehicles1 + nfa_4f_sr000001_trunc_01);
    else if (nfa_4f_sr000001_trunc_01 >= 0 & nfa_4f_sr000002_trunc_01 >= 0 & nfa_4f_sr000002_trunc_01 > nfa_4f_sr000001_trunc_01) then 
    amountowe_vehicles1 = (amountowe_vehicles1 + (((nfa_4f_sr000002_trunc_01 - nfa_4f_sr000001_trunc_01)/2) + nfa_4f_sr000001_trunc_01));
     else if (nfa_4f_sr000001_trunc_01 >= 0 & nfa_4f_sr000002_trunc_01 >= 0 & nfa_4f_sr000002_trunc_01 < nfa_4f_sr000001_trunc_01) then 
     amountowe_vehicles1 = (amountowe_vehicles1 + (((nfa_4f_sr000001_trunc_01 - nfa_4f_sr000002_trunc_01)/2) + nfa_4f_sr000002_trunc_01));
      else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_b_01 = 0) then amountowe_vehicles1 = (amountowe_vehicles1 + quartile1);
       else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_b_01 = 1) then amountowe_vehicles1 = (amountowe_vehicles1 + quartile2);
        else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_c_01 = 0) then amountowe_vehicles1 = (amountowe_vehicles1 + quartile3);
         else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_c_01 = 1) then amountowe_vehicles1 = (amountowe_vehicles1 + 37000);
          else if (nfa_4f_uab_a_01 in(-1, -2) | nfa_4f_uab_b_01 in(-1, -2) | nfa_4f_uab_c_01 in(-1, -2)) then amtowe_vehicles1 = -3;
 
/*************************************************/
/* CDEBT Component - amountowe_vehicles2         */
/*************************************************/

if (nfa_4f_trunc_02 >= 0) then amountowe_vehicles2 = (amountowe_vehicles2 + nfa_4f_trunc_02);
 else if (nfa_4f_trunc_02 in(-1, -2) & nfa_4f_sr000001_trunc_02 < 0 & nfa_4f_sr000002_trunc_02 < 0 
 & nfa_4f_uab_a_02 < 0 & nfa_4f_uab_b_02 < 0 & nfa_4f_uab_c_02 < 0) then amountowe_vehicles2 = nfa_4f_trunc_02;
   else if (nfa_4f_sr000001_trunc_02 >= 0 & nfa_4f_sr000002_trunc_02 >= 0 & nfa_4f_sr000002_trunc_02 = nfa_4f_sr000001_trunc_02) then 
   amountowe_vehicles2 = (amountowe_vehicles2 + nfa_4f_sr000001_trunc_02);
    else if (nfa_4f_sr000001_trunc_02 >= 0 & nfa_4f_sr000002_trunc_02 >= 0 & nfa_4f_sr000002_trunc_02 > nfa_4f_sr000001_trunc_02) then 
    amountowe_vehicles2 = (amountowe_vehicles2 + (((nfa_4f_sr000002_trunc_02 - nfa_4f_sr000001_trunc_02)/2) + nfa_4f_sr000001_trunc_02));
     else if (nfa_4f_sr000001_trunc_02 >= 0 & nfa_4f_sr000002_trunc_02 >= 0 & nfa_4f_sr000002_trunc_02 < nfa_4f_sr000001_trunc_02) then 
     amountowe_vehicles2 = (amountowe_vehicles2 + (((nfa_4f_sr000001_trunc_02 - nfa_4f_sr000002_trunc_02)/2) + nfa_4f_sr000002_trunc_02));
      else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_b_02 = 0) then amountowe_vehicles2 = (amountowe_vehicles2 + quartile1);
       else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_b_02 = 1) then amountowe_vehicles2 = (amountowe_vehicles2 + quartile2);
        else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_c_02 = 0) then amountowe_vehicles2 = (amountowe_vehicles2 + quartile3);
         else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_c_02 = 1) then amountowe_vehicles2 = (amountowe_vehicles2 + 35000);
          else if (nfa_4f_uab_a_02 in(-1, -2) | nfa_4f_uab_b_02 in(-1, -2) | nfa_4f_uab_c_02 in(-1, -2)) then amtowe_vehicles2 = -3;

/*************************************************/
/* CDEBT Component - amountowe_vehicles3         */
/*************************************************/

if (nfa_4f_trunc_03 >= 0) then amountowe_vehicles3 = (amountowe_vehicles3 + nfa_4f_trunc_03);
 else if (nfa_4f_trunc_03 in(-1, -2) & nfa_4f_sr000001_trunc_03 < 0 & nfa_4f_sr000002_trunc_03 < 0 
 & nfa_4f_uab_a_03 < 0 & nfa_4f_uab_b_03 < 0 & nfa_4f_uab_c_03 < 0) then amountowe_vehicles3 = nfa_4f_trunc_03;
   else if (nfa_4f_sr000001_trunc_03 >= 0 & nfa_4f_sr000002_trunc_03 >= 0 & nfa_4f_sr000002_trunc_03 = nfa_4f_sr000001_trunc_03) then 
   amountowe_vehicles3 = (amountowe_vehicles3 + nfa_4f_sr000001_trunc_03);
    else if (nfa_4f_sr000001_trunc_03 >= 0 & nfa_4f_sr000002_trunc_03 >= 0 & nfa_4f_sr000002_trunc_03 > nfa_4f_sr000001_trunc_03) then 
    amountowe_vehicles3 = (amountowe_vehicles3 + (((nfa_4f_sr000002_trunc_03 - nfa_4f_sr000001_trunc_03)/2) + nfa_4f_sr000001_trunc_03));
     else if (nfa_4f_sr000001_trunc_03 >= 0 & nfa_4f_sr000002_trunc_03 >= 0 & nfa_4f_sr000002_trunc_03 < nfa_4f_sr000001_trunc_03) then 
     amountowe_vehicles3 = (amountowe_vehicles3 + (((nfa_4f_sr000001_trunc_03 - nfa_4f_sr000002_trunc_03)/2) + nfa_4f_sr000002_trunc_03));
      else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_b_03 = 0) then amountowe_vehicles3 = (amountowe_vehicles3 + quartile1);
       else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_b_03 = 1) then amountowe_vehicles3 = (amountowe_vehicles3 + quartile2);
        else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_c_03 = 0) then amountowe_vehicles3 = (amountowe_vehicles3 + quartile3);
         else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_c_03 = 1) then amountowe_vehicles3 = (amountowe_vehicles3 + 38000);
          else if (nfa_4f_uab_a_03 in(-1, -2) | nfa_4f_uab_b_03 in(-1, -2) | nfa_4f_uab_c_03 in(-1, -2)) then amtowe_vehicles3 = -3;

/*************************************************/
/* CDEBT Component - amountowe_vehicles4         */
/*************************************************/

if (nfa_4f_trunc_04 >= 0) then amountowe_vehicles4 = (amountowe_vehicles4 + nfa_4f_trunc_04);
 else if (nfa_4f_trunc_04 in(-1, -2)) then amountowe_vehicles4 = nfa_4f_trunc_04;

/*************************************************/
/* CDEBT Component - amountowe_vehicles5         */
/*************************************************/

if (nfa_4f_trunc_05 >= 0) then amountowe_vehicles5 = (amountowe_vehicles5 + nfa_4f_trunc_05);
 else if (nfa_4f_trunc_05 in(-1, -2)) then amountowe_vehicles5 = nfa_4f_trunc_05;

/*************************************************/
/* CDEBT Component - amountowe_vehicles6         */
/*************************************************/

if (nfa_4f_trunc_06 >= 0) then amountowe_vehicles6 = (amountowe_vehicles6 + nfa_4f_trunc_06);
 else if (nfa_4f_trunc_06 in(-1, -2) & nfa_4f_sr000001_trunc_06 < 0 & nfa_4f_sr000002_trunc_06 < 0 
 & nfa_4f_uab_a_06 < 0) then amountowe_vehicles6 = nfa_4f_trunc_06;
   else if (nfa_4f_sr000001_trunc_06 >= 0 & nfa_4f_sr000002_trunc_06 >= 0 & nfa_4f_sr000002_trunc_06 = nfa_4f_sr000001_trunc_06) then 
   amountowe_vehicles6 = (amountowe_vehicles6 + nfa_4f_sr000001_trunc_06);
    else if (nfa_4f_sr000001_trunc_06 >= 0 & nfa_4f_sr000002_trunc_06 >= 0 & nfa_4f_sr000002_trunc_06 > nfa_4f_sr000001_trunc_06) then 
    amountowe_vehicles6 = (amountowe_vehicles6 + (((nfa_4f_sr000002_trunc_06 - nfa_4f_sr000001_trunc_06)/2) + nfa_4f_sr000001_trunc_06));
     else if (nfa_4f_sr000001_trunc_06 >= 0 & nfa_4f_sr000002_trunc_06 >= 0 & nfa_4f_sr000002_trunc_06 < nfa_4f_sr000001_trunc_06) then 
     amountowe_vehicles6 = (amountowe_vehicles6 + (((nfa_4f_sr000001_trunc_06 - nfa_4f_sr000002_trunc_06)/2) + nfa_4f_sr000002_trunc_06));
      else if (nfa_4f_uab_a_06 in(-1, -2)) then amtowe_vehicles6 = -3;

/*************************************************/
/* CDEBT Component - amountowe_vehicles9         */
/*************************************************/

if (nfa_4f_trunc_09 >= 0) then amountowe_vehicles9 = (amountowe_vehicles9 + nfa_4f_trunc_09);
 else if (nfa_4f_trunc_09 in(-1, -2)) then amountowe_vehicles9 = nfa_4f_trunc_09;

/*************************************************/
/* CDEBT Component - amtowe_othervehicles        */
/*************************************************/

if (nfa_5 = 1 & nfa_5b_trunc >= 0) then amtowe_othervehicles = (amtowe_othervehicles + nfa_5b_trunc);
 else if (nfa_5 = 1 & nfa_5b_trunc in(-1, -2) & nfa_5b_sr000001 < 0 & nfa_5b_sr000002 < 0
 & nfa_5b_uab_a < 0 & nfa_5b_uab_c < 0) then amtowe_othervehicles = nfa_5b_trunc;
   else if (nfa_5b_sr000001 >= 0 & nfa_5b_sr000002 >= 0 & nfa_5b_sr000002 = nfa_5b_sr000001) then 
   amtowe_othervehicles = (amtowe_othervehicles + nfa_5b_sr000001);
    else if (nfa_5b_sr000001 >= 0 & nfa_5b_sr000002 >= 0 & nfa_5b_sr000002 > nfa_5b_sr000001) then 
    amtowe_othervehicles = (amtowe_othervehicles + (((nfa_5b_sr000002 - nfa_5b_sr000001)/2) + nfa_5b_sr000001));
     else if (nfa_5b_sr000001 >= 0 & nfa_5b_sr000002 >= 0 & nfa_5b_sr000002 < nfa_5b_sr000001) then 
     amtowe_othervehicles = (amtowe_othervehicles + (((nfa_5b_sr000001 - nfa_5b_sr000002)/2) + nfa_5b_sr000002));
      else if (nfa_5b_trunc in(-1, -2, -4) & nfa_5b_uab_c = 0) then amtowe_othervehicles = (amtowe_othervehicles + quartile3);
       else if (nfa_5b_trunc in(-1, -2, -4) & nfa_5b_uab_c = 1) then amtowe_othervehicles = (amtowe_othervehicles + 50500);
        else if (nfa_5b_uab_a in(-1, -2) | nfa_5b_uab_c in(-1, -2)) then amtowe_othervehicles = -3;

/*******************************/
/* Add components CDEBT        */
/*******************************/

if (amtowe_assetpoorcars1 >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars1); 
if (amtowe_assetpoorcars2 >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars2); 
if (amtowe_assetpoorcars3 >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars3); 
if (amountowe_vehicles1 >= 0) then cdebtc = (cdebtc + amountowe_vehicles1); 
if (amountowe_vehicles2 >= 0) then cdebtc = (cdebtc + amountowe_vehicles2); 
if (amountowe_vehicles3 >= 0) then cdebtc = (cdebtc + amountowe_vehicles3); 
if (amountowe_vehicles4 >= 0) then cdebtc = (cdebtc + amountowe_vehicles4); 
if (amountowe_vehicles5 >= 0) then cdebtc = (cdebtc + amountowe_vehicles5); 
if (amountowe_vehicles6 >= 0) then cdebtc = (cdebtc + amountowe_vehicles6); 
if (amountowe_vehicles9 >= 0) then cdebtc = (cdebtc + amountowe_vehicles9);
if (amtowe_othervehicles >= 0) then cdebtc = (cdebtc + amtowe_othervehicles);

if (amtowe_assetpoorcars1 in(-1, -2, -3)) then cdebtc = -3; 
else if (amtowe_assetpoorcars2 in(-1, -2, -3)) then cdebtc = -3; 
else if (amtowe_assetpoorcars3 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles1 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles2 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles3 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles4 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles5 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles6 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles9 in(-1, -2, -3)) then cdebtc = -3; 
else if (amtowe_othervehicles in(-1, -2, -3)) then cdebtc = -3;

/****************************/
/* Compute CAR              */
/****************************/
/*************************************************/
/* CAR Component - mktval_assetpoorcars1         */
/*************************************************/

if (sc_12a_01 >= 0) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + sc_12a_01);
   else if (sc_12a_01 in(-1, -2) & sc_12a_sr000001_01 < 0 & sc_12a_sr000002_01 < 0 
  & sc_12a_uab_a_01 < 0 & sc_12a_uab_b_01 < 0 & sc_12a_uab_c_01 < 0) then mktval_assetpoorcars1 = sc_12a_01;
    else if (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 >= 0 & sc_12a_sr000002_01 = sc_12a_sr000001_01) then 
    mktval_assetpoorcars1 = (mktval_assetpoorcars1 + sc_12a_sr000001_01);
     else if (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 >= 0 & sc_12a_sr000002_01 > sc_12a_sr000001_01) then 
     mktval_assetpoorcars1 = (mktval_assetpoorcars1 + (((sc_12a_sr000002_01 - sc_12a_sr000001_01)/2) + sc_12a_sr000001_01));
      else if (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 >= 0 & sc_12a_sr000002_01 < sc_12a_sr000001_01) then 
      mktval_assetpoorcars1 = (mktval_assetpoorcars1 + (((sc_12a_sr000001_01 - sc_12a_sr000002_01)/2) + sc_12a_sr000001_02));
       else if (sc_12a_01 in(-1, -2, -4) & sc_12a_uab_b_01 = 0) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + quartile1);
        else if (sc_12a_01 in(-1, -2, -4) & sc_12a_uab_b_01 = 1) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + quartile2);
         else if (sc_12a_01 in(-1, -2, -4) & sc_12a_uab_c_01 = 0) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + quartile3);
          else if (sc_12a_01 in(-1, -2, -4) & sc_12a_uab_c_01 = 1) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + 40000);
           else if (sc_12a_uab_a_01 in(-1, -2) | sc_12a_uab_b_01 in(-1, -2) | sc_12a_uab_c_01 in(-1, -2)) then mktval_assetpoorcars1 = -3;

/*************************************************/
/* CAR Component - mktval_assetpoorcars2         */
/*************************************************/

if (sc_12a_02 >= 0) then mktval_assetpoorcars2 = (mktval_assetpoorcars2 + sc_12a_02);
  else if (sc_12a_02 in(-1, -2) & sc_12a_sr000001_02 < 0 & sc_12a_sr000002_02 < 0 
  & sc_12a_uab_a_02 < 0) then mktval_assetpoorcars2 = sc_12a_02;
   else if (sc_12a_sr000001_02 >= 0 & sc_12a_sr000002_02 >= 0 & sc_12a_sr000002_02 = sc_12a_sr000001_02) then 
   mktval_assetpoorcars2 = (mktval_assetpoorcars2 + sc_12a_sr000001_02);
    else if (sc_12a_sr000001_02 >= 0 & sc_12a_sr000002_02 >= 0 & sc_12a_sr000002_02 > sc_12a_sr000001_02) then 
    mktval_assetpoorcars2 = (mktval_assetpoorcars2 + (((sc_12a_sr000002_02 - sc_12a_sr000001_02)/2) + sc_12a_sr000001_02));
     else if (sc_12a_sr000001_02 >= 0 & sc_12a_sr000002_02 >= 0 & sc_12a_sr000002_02 < sc_12a_sr000001_02) then 
     mktval_assetpoorcars2 = (mktval_assetpoorcars2 + (((sc_12a_sr000001_02 - sc_12a_sr000002_02)/2) + sc_12a_sr000002_02));
      else if (sc_12a_uab_a_02 in(-1, -2)) then mktval_assetpoorcars2 = -3;

/*************************************************/
/* CAR Component - mktval_assetpoorcars3         */
/*************************************************/

if (sc_12a_03 >= 0) then mktval_assetpoorcars3 = (mktval_assetpoorcars3 + sc_12a_03);
  else if (sc_12a_03 in(-1, -2)) then mktval_assetpoorcars3 = sc_12a_03;

/*************************************************/
/* CAR Component - marketvalue_vehicles1         */
/*************************************************/

if (nfa_4c_trunc_01 >= 0) then marketvalue_vehicles1 = (marketvalue_vehicles1 + nfa_4c_trunc_01);
 else if (nfa_4c_trunc_01 in(-1, -2) & nfa_4c_sr000001_trunc_01 < 0 & nfa_4c_sr000002_trunc_01 < 0 
 & nfa_4c_uab_a_01 < 0 & nfa_4c_uab_b_01 < 0 & nfa_4c_uab_c_01 < 0) then marketvalue_vehicles1 = nfa_4c_trunc_01;
   else if (nfa_4c_sr000001_trunc_01 >= 0 & nfa_4c_sr000002_trunc_01 >= 0 & nfa_4c_sr000002_trunc_01 = nfa_4c_sr000001_trunc_01) then 
   marketvalue_vehicles1 = (marketvalue_vehicles1 + nfa_4c_sr000001_trunc_01);
    else if (nfa_4c_sr000001_trunc_01 >= 0 & nfa_4c_sr000002_trunc_01 >= 0 & nfa_4c_sr000002_trunc_01 > nfa_4c_sr000001_trunc_01) then 
    marketvalue_vehicles1 = (marketvalue_vehicles1 + (((nfa_4c_sr000002_trunc_01 - nfa_4c_sr000001_trunc_01)/2) + nfa_4c_sr000001_trunc_01));
     else if (nfa_4c_sr000001_trunc_01 >= 0 & nfa_4c_sr000002_trunc_01 >= 0 & nfa_4c_sr000002_trunc_01 < nfa_4c_sr000001_trunc_01) then 
     marketvalue_vehicles1 = (marketvalue_vehicles1 + (((nfa_4c_sr000001_trunc_01 - nfa_4c_sr000002_trunc_01)/2) + nfa_4c_sr000002_trunc_01));
      else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_b_01 = 0) then marketvalue_vehicles1 = (marketvalue_vehicles1 + quartile1);
       else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_b_01 = 1) then marketvalue_vehicles1 = (marketvalue_vehicles1 + quartile2);
        else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_c_01 = 0) then marketvalue_vehicles1 = (marketvalue_vehicles1 + quartile3);
         else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_c_01 = 1) then marketvalue_vehicles1 = (marketvalue_vehicles1 + 40000);
          else if (nfa_4c_uab_a_01 in(-1, -2) | nfa_4c_uab_b_01 in(-1, -2) | nfa_4c_uab_c_01 in(-1, -2)) then marketvalue_vehicles1 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles2         */
/*************************************************/

if (nfa_4c_trunc_02 >= 0) then marketvalue_vehicles2 = (marketvalue_vehicles2 + nfa_4c_trunc_02);
 else if (nfa_4c_trunc_02 in(-1, -2) & nfa_4c_sr000001_trunc_02 < 0 & nfa_4c_sr000002_trunc_02 < 0 
 & nfa_4c_uab_a_02 < 0 & nfa_4c_uab_b_02 < 0 & nfa_4c_uab_c_02 < 0) then marketvalue_vehicles2 = nfa_4c_trunc_02;
   else if (nfa_4c_sr000001_trunc_02 >= 0 & nfa_4c_sr000002_trunc_02 >= 0 & nfa_4c_sr000002_trunc_02 = nfa_4c_sr000001_trunc_02) then 
   marketvalue_vehicles2 = (marketvalue_vehicles2 + nfa_4c_sr000001_trunc_02);
    else if (nfa_4c_sr000001_trunc_02 >= 0 & nfa_4c_sr000002_trunc_02 >= 0 & nfa_4c_sr000002_trunc_02 > nfa_4c_sr000001_trunc_02) then 
    marketvalue_vehicles2 = (marketvalue_vehicles2 + (((nfa_4c_sr000002_trunc_02 - nfa_4c_sr000001_trunc_02)/2) + nfa_4c_sr000001_trunc_02));
     else if (nfa_4c_sr000001_trunc_02 >= 0 & nfa_4c_sr000002_trunc_02 >= 0 & nfa_4c_sr000002_trunc_02 < nfa_4c_sr000001_trunc_02) then 
     marketvalue_vehicles2 = (marketvalue_vehicles2 + (((nfa_4c_sr000001_trunc_02 - nfa_4c_sr000002_trunc_02)/2) + nfa_4c_sr000002_trunc_02));
      else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_b_02 = 0) then marketvalue_vehicles2 = (marketvalue_vehicles2 + quartile1);
       else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_b_02 = 1) then marketvalue_vehicles2 = (marketvalue_vehicles2 + quartile2);
        else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_c_02 = 0) then marketvalue_vehicles2 = (marketvalue_vehicles2 + quartile3);
         else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_c_02 = 1) then marketvalue_vehicles2 = (marketvalue_vehicles2 + 38000);
          else if (nfa_4c_uab_a_02 in(-1, -2) | nfa_4c_uab_b_02 in(-1, -2) | nfa_4c_uab_c_02 in(-1, -2)) then marketvalue_vehicles2 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles3         */
/*************************************************/

if (nfa_4c_trunc_03 >= 0) then marketvalue_vehicles3 = (marketvalue_vehicles3 + nfa_4c_trunc_03);
 else if (nfa_4c_trunc_03 in(-1, -2) & nfa_4c_sr000001_trunc_03 < 0 & nfa_4c_sr000002_trunc_03 < 0 
 & nfa_4c_uab_a_03 < 0 & nfa_4c_uab_b_03 < 0 & nfa_4c_uab_c_03 < 0) then marketvalue_vehicles3 = nfa_4c_trunc_03;
   else if (nfa_4c_sr000001_trunc_03 >= 0 & nfa_4c_sr000002_trunc_03 >= 0 & nfa_4c_sr000002_trunc_03 = nfa_4c_sr000001_trunc_03) then 
   marketvalue_vehicles3 = (marketvalue_vehicles3 + nfa_4c_sr000001_trunc_03);
    else if (nfa_4c_sr000001_trunc_03 >= 0 & nfa_4c_sr000002_trunc_03 >= 0 & nfa_4c_sr000002_trunc_03 > nfa_4c_sr000001_trunc_03) then 
    marketvalue_vehicles3 = (marketvalue_vehicles3 + (((nfa_4c_sr000002_trunc_03 - nfa_4c_sr000001_trunc_03)/2) + nfa_4c_sr000001_trunc_03));
     else if (nfa_4c_sr000001_trunc_03 >= 0 & nfa_4c_sr000002_trunc_03 >= 0 & nfa_4c_sr000002_trunc_03 < nfa_4c_sr000001_trunc_03) then 
     marketvalue_vehicles3 = (marketvalue_vehicles3 + (((nfa_4c_sr000001_trunc_03 - nfa_4c_sr000002_trunc_03)/2) + nfa_4c_sr000002_trunc_03));
      else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_b_03 = 0) then marketvalue_vehicles3 = (marketvalue_vehicles3 + quartile1);
       else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_b_03 = 1) then marketvalue_vehicles3 = (marketvalue_vehicles3 + quartile2);
        else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_c_03 = 0) then marketvalue_vehicles3 = (marketvalue_vehicles3 + quartile3);
         else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_c_03 = 1) then marketvalue_vehicles3 = (marketvalue_vehicles3 + 35000);
          else if (nfa_4c_uab_a_03 in(-1, -2) | nfa_4c_uab_b_03 in(-1, -2) | nfa_4c_uab_c_03 in(-1, -2)) then marketvalue_vehicles3 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles4         */
/*************************************************/

if (nfa_4c_trunc_04 >= 0) then marketvalue_vehicles4 = (marketvalue_vehicles4 + nfa_4c_trunc_04);
 else if (nfa_4c_trunc_04 in(-1, -2) & nfa_4c_sr000001_trunc_04 < 0 & nfa_4c_sr000002_trunc_04 < 0 
 & nfa_4c_uab_a_04 < 0 & nfa_4c_uab_b_04 < 0 & nfa_4c_uab_c_04 < 0) then marketvalue_vehicles4 = nfa_4c_trunc_04;
   else if (nfa_4c_sr000001_trunc_04 >= 0 & nfa_4c_sr000002_trunc_04 >= 0 & nfa_4c_sr000002_trunc_04 = nfa_4c_sr000001_trunc_04) then 
   marketvalue_vehicles4 = (marketvalue_vehicles4 + nfa_4c_sr000001_trunc_04);
    else if (nfa_4c_sr000001_trunc_04 >= 0 & nfa_4c_sr000002_trunc_04 >= 0 & nfa_4c_sr000002_trunc_04 > nfa_4c_sr000001_trunc_04) then 
    marketvalue_vehicles4 = (marketvalue_vehicles4 + (((nfa_4c_sr000002_trunc_04 - nfa_4c_sr000001_trunc_04)/2) + nfa_4c_sr000001_trunc_04));
     else if (nfa_4c_sr000001_trunc_04 >= 0 & nfa_4c_sr000002_trunc_04 >= 0 & nfa_4c_sr000002_trunc_04 < nfa_4c_sr000001_trunc_04) then 
     marketvalue_vehicles4 = (marketvalue_vehicles4 + (((nfa_4c_sr000001_trunc_04 - nfa_4c_sr000002_trunc_04)/2) + nfa_4c_sr000002_trunc_04));
      else if (nfa_4c_trunc_04 in(-1, -2, -4) & nfa_4c_uab_b_04 = 0) then marketvalue_vehicles4 = (marketvalue_vehicles4 + quartile1);
       else if (nfa_4c_trunc_04 in(-1, -2, -4) & nfa_4c_uab_b_04 = 1) then marketvalue_vehicles4 = (marketvalue_vehicles4 + quartile2);
        else if (nfa_4c_trunc_04 in(-1, -2, -4) & nfa_4c_uab_c_04 = 0) then marketvalue_vehicles4 = (marketvalue_vehicles4 + quartile3);
         else if (nfa_4c_trunc_04 in(-1, -2, -4) & nfa_4c_uab_c_04 = 1) then marketvalue_vehicles4 = (marketvalue_vehicles4 + 40000);
          else if (nfa_4c_uab_a_04 in(-1, -2) | nfa_4c_uab_b_04 in(-1, -2) | nfa_4c_uab_c_04 in(-1, -2)) then marketvalue_vehicles4 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles5         */
/*************************************************/

if (nfa_4c_trunc_05 >= 0) then marketvalue_vehicles5 = (marketvalue_vehicles5 + nfa_4c_trunc_05);
 else if (nfa_4c_trunc_05 in(-1, -2) & nfa_4c_sr000001_trunc_05 < 0 & nfa_4c_sr000002_trunc_05 < 0 
 & nfa_4c_uab_a_05 < 0 & nfa_4c_uab_b_05 < 0 & nfa_4c_uab_c_05 < 0) then marketvalue_vehicles5 = nfa_4c_trunc_05;
   else if (nfa_4c_sr000001_trunc_05 >= 0 & nfa_4c_sr000002_trunc_05 >= 0 & nfa_4c_sr000002_trunc_05 = nfa_4c_sr000001_trunc_05) then 
   marketvalue_vehicles5 = (marketvalue_vehicles5 + nfa_4c_sr000001_trunc_05);
    else if (nfa_4c_sr000001_trunc_05 >= 0 & nfa_4c_sr000002_trunc_05 >= 0 & nfa_4c_sr000002_trunc_05 > nfa_4c_sr000001_trunc_05) then 
    marketvalue_vehicles5 = (marketvalue_vehicles5 + (((nfa_4c_sr000002_trunc_05 - nfa_4c_sr000001_trunc_05)/2) + nfa_4c_sr000001_trunc_05));
     else if (nfa_4c_sr000001_trunc_05 >= 0 & nfa_4c_sr000002_trunc_05 >= 0 & nfa_4c_sr000002_trunc_05 < nfa_4c_sr000001_trunc_05) then 
     marketvalue_vehicles5 = (marketvalue_vehicles5 + (((nfa_4c_sr000001_trunc_05 - nfa_4c_sr000002_trunc_05)/2) + nfa_4c_sr000002_trunc_05));
      else if (nfa_4c_trunc_05 in(-1, -2, -4) & nfa_4c_uab_b_05 = 0) then marketvalue_vehicles5 = (marketvalue_vehicles5 + quartile1);
       else if (nfa_4c_trunc_05 in(-1, -2, -4) & nfa_4c_uab_b_05 = 1) then marketvalue_vehicles5 = (marketvalue_vehicles5 + quartile2);
        else if (nfa_4c_trunc_05 in(-1, -2, -4) & nfa_4c_uab_c_05 = 0) then marketvalue_vehicles5 = (marketvalue_vehicles5 + quartile3);
         else if (nfa_4c_trunc_05 in(-1, -2, -4) & nfa_4c_uab_c_05 = 1) then marketvalue_vehicles5 = (marketvalue_vehicles5 + 50000);
          else if (nfa_4c_uab_a_05 in(-1, -2) | nfa_4c_uab_b_05 in(-1, -2) | nfa_4c_uab_c_05 in(-1, -2)) then marketvalue_vehicles5 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles6         */
/*************************************************/

if (nfa_4c_trunc_06 >= 0) then marketvalue_vehicles6 = (marketvalue_vehicles6 + nfa_4c_trunc_06);
 else if (nfa_4c_trunc_06 in(-1, -2) & nfa_4c_sr000001_trunc_06 < 0 & nfa_4c_sr000002_trunc_06 < 0 
 & nfa_4c_uab_a_06 < 0 & nfa_4c_uab_b_06 < 0 & nfa_4c_uab_c_06 < 0) then marketvalue_vehicles6 = nfa_4c_trunc_06;
   else if (nfa_4c_sr000001_trunc_06 >= 0 & nfa_4c_sr000002_trunc_06 >= 0 & nfa_4c_sr000002_trunc_06 = nfa_4c_sr000001_trunc_06) then 
   marketvalue_vehicles6 = (marketvalue_vehicles6 + nfa_4c_sr000001_trunc_06);
    else if (nfa_4c_sr000001_trunc_06 >= 0 & nfa_4c_sr000002_trunc_06 >= 0 & nfa_4c_sr000002_trunc_06 > nfa_4c_sr000001_trunc_06) then 
    marketvalue_vehicles6 = (marketvalue_vehicles6 + (((nfa_4c_sr000002_trunc_06 - nfa_4c_sr000001_trunc_06)/2) + nfa_4c_sr000001_trunc_06));
     else if (nfa_4c_sr000001_trunc_06 >= 0 & nfa_4c_sr000002_trunc_06 >= 0 & nfa_4c_sr000002_trunc_06 < nfa_4c_sr000001_trunc_06) then 
     marketvalue_vehicles6 = (marketvalue_vehicles6 + (((nfa_4c_sr000001_trunc_06 - nfa_4c_sr000002_trunc_06)/2) + nfa_4c_sr000002_trunc_06));
      else if (nfa_4c_trunc_06 in(-1, -2, -4) & nfa_4c_uab_b_06 = 0) then marketvalue_vehicles6 = (marketvalue_vehicles6 + quartile1);
       else if (nfa_4c_trunc_06 in(-1, -2, -4) & nfa_4c_uab_b_06 = 1) then marketvalue_vehicles6 = (marketvalue_vehicles6 + quartile2);
        else if (nfa_4c_trunc_06 in(-1, -2, -4) & nfa_4c_uab_c_06 = 0) then marketvalue_vehicles6 = (marketvalue_vehicles6 + quartile3);
         else if (nfa_4c_trunc_06 in(-1, -2, -4) & nfa_4c_uab_c_06 = 1) then marketvalue_vehicles6 = (marketvalue_vehicles6 + 35000);
          else if (nfa_4c_uab_a_06 in(-1, -2) | nfa_4c_uab_b_06 in(-1, -2) | nfa_4c_uab_c_06 in(-1, -2)) then marketvalue_vehicles6 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles7         */
/*************************************************/

if (nfa_4c_trunc_07 >= 0) then marketvalue_vehicles7 = (marketvalue_vehicles7 + nfa_4c_trunc_07);
 else if (nfa_4c_trunc_07 in(-1, -2) & nfa_4c_sr000001_trunc_07 < 0 & nfa_4c_sr000002_trunc_07 < 0 
 & nfa_4c_uab_a_07 < 0 & nfa_4c_uab_b_07 < 0) then marketvalue_vehicles7 = nfa_4c_trunc_07;
   else if (nfa_4c_sr000001_trunc_07 >= 0 & nfa_4c_sr000002_trunc_07 >= 0 & nfa_4c_sr000002_trunc_07 = nfa_4c_sr000001_trunc_07) then 
   marketvalue_vehicles7 = (marketvalue_vehicles7 + nfa_4c_sr000001_trunc_07);
    else if (nfa_4c_sr000001_trunc_07 >= 0 & nfa_4c_sr000002_trunc_07 >= 0 & nfa_4c_sr000002_trunc_07 > nfa_4c_sr000001_trunc_07) then 
    marketvalue_vehicles7 = (marketvalue_vehicles7 + (((nfa_4c_sr000002_trunc_07 - nfa_4c_sr000001_trunc_07)/2) + nfa_4c_sr000001_trunc_07));
     else if (nfa_4c_sr000001_trunc_07 >= 0 & nfa_4c_sr000002_trunc_07 >= 0 & nfa_4c_sr000002_trunc_07 < nfa_4c_sr000001_trunc_07) then 
     marketvalue_vehicles7 = (marketvalue_vehicles7 + (((nfa_4c_sr000001_trunc_07 - nfa_4c_sr000002_trunc_07)/2) + nfa_4c_sr000002_trunc_07));
      else if (nfa_4c_trunc_07 in(-1, -2, -4) & nfa_4c_uab_b_07 = 0) then marketvalue_vehicles7 = (marketvalue_vehicles7 + quartile1);
       else if (nfa_4c_trunc_07 in(-1, -2, -4) & nfa_4c_uab_b_07 = 1) then marketvalue_vehicles7 = (marketvalue_vehicles7 + quartile2);
        else if (nfa_4c_uab_a_07 in(-1, -2) | nfa_4c_uab_b_07 in(-1, -2)) then marketvalue_vehicles7 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles8         */
/*************************************************/

if (nfa_4c_trunc_08 >= 0) then marketvalue_vehicles8 = (marketvalue_vehicles8 + nfa_4c_trunc_08);
 else if (nfa_4c_trunc_08 in(-1, -2) & nfa_4c_sr000001_trunc_08 < 0 & nfa_4c_sr000002_trunc_08 < 0 
 & nfa_4c_uab_a_08 < 0 & nfa_4c_uab_b_08 < 0) then marketvalue_vehicles8 = nfa_4c_trunc_08;
   else if (nfa_4c_sr000001_trunc_08 >= 0 & nfa_4c_sr000002_trunc_08 >= 0 & nfa_4c_sr000002_trunc_08 = nfa_4c_sr000001_trunc_08) then 
   marketvalue_vehicles8 = (marketvalue_vehicles8 + nfa_4c_sr000001_trunc_08);
    else if (nfa_4c_sr000001_trunc_08 >= 0 & nfa_4c_sr000002_trunc_08 >= 0 & nfa_4c_sr000002_trunc_08 > nfa_4c_sr000001_trunc_08) then 
    marketvalue_vehicles8 = (marketvalue_vehicles8 + (((nfa_4c_sr000002_trunc_08 - nfa_4c_sr000001_trunc_08)/2) + nfa_4c_sr000001_trunc_08));
     else if (nfa_4c_sr000001_trunc_08 >= 0 & nfa_4c_sr000002_trunc_08 >= 0 & nfa_4c_sr000002_trunc_08 < nfa_4c_sr000001_trunc_08) then 
     marketvalue_vehicles8 = (marketvalue_vehicles8 + (((nfa_4c_sr000001_trunc_08 - nfa_4c_sr000002_trunc_08)/2) + nfa_4c_sr000002_trunc_08));
      else if (nfa_4c_trunc_08 in(-1, -2, -4) & nfa_4c_uab_b_08 = 0) then marketvalue_vehicles8 = (marketvalue_vehicles8 + quartile1);
       else if (nfa_4c_trunc_08 in(-1, -2, -4) & nfa_4c_uab_b_08 = 1) then marketvalue_vehicles8 = (marketvalue_vehicles8 + quartile2);
        else if (nfa_4c_uab_a_08 in(-1, -2) | nfa_4c_uab_b_08 in(-1, -2)) then marketvalue_vehicles8 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles9         */
/*************************************************/

if (nfa_4c_trunc_09 >= 0) then marketvalue_vehicles9 = (marketvalue_vehicles9 + nfa_4c_trunc_09);
 else if (nfa_4c_trunc_09 in(-1, -2) & nfa_4c_uab_a_09 < 0) then marketvalue_vehicles9 = nfa_4c_trunc_09;
  else if (nfa_4c_uab_a_09 in(-1, -2)) then marketvalue_vehicles9 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles10        */
/*************************************************/

if (nfa_4c_trunc_10 >= 0) then marketvalue_vehicles10 = (marketvalue_vehicles10 + nfa_4c_trunc_10);
 else if (nfa_4c_trunc_10 in(-1, -2) & nfa_4c_uab_a_10 < 0) then marketvalue_vehicles10 = nfa_4c_trunc_10;
  else if (nfa_4c_uab_a_10 in(-1, -2)) then marketvalue_vehicles10 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles11        */
/*************************************************/

if (nfa_4c_trunc_11 >= 0) then marketvalue_vehicles11 = (marketvalue_vehicles11 + nfa_4c_trunc_11);
 else if (nfa_4c_trunc_11 in(-1, -2) & nfa_4c_uab_a_11 < 0) then marketvalue_vehicles11 = nfa_4c_trunc_11;
  else if (nfa_4c_uab_a_11 in(-1, -2)) then marketvalue_vehicles11 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles12        */
/*************************************************/

if (nfa_4c_trunc_12 >= 0) then marketvalue_vehicles12 = (marketvalue_vehicles12 + nfa_4c_trunc_12);
 else if (nfa_4c_trunc_12 in(-1, -2) & nfa_4c_uab_a_12 < 0) then marketvalue_vehicles12 = nfa_4c_trunc_12;
  else if (nfa_4c_uab_a_12 in(-1, -2)) then marketvalue_vehicles12 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles13        */
/*************************************************/

if (nfa_4c_trunc_13 >= 0) then marketvalue_vehicles13 = (marketvalue_vehicles13 + nfa_4c_trunc_13);
 else if (nfa_4c_trunc_13 in(-1, -2) & nfa_4c_uab_a_13 < 0) then marketvalue_vehicles13 = nfa_4c_trunc_13;
  else if (nfa_4c_uab_a_13 in(-1, -2)) then marketvalue_vehicles13 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles14        */
/*************************************************/

if (nfa_4c_trunc_14 >= 0) then marketvalue_vehicles14 = (marketvalue_vehicles14 + nfa_4c_trunc_14);
 else if (nfa_4c_trunc_14 in(-1, -2) & nfa_4c_uab_a_14 < 0) then marketvalue_vehicles14 = nfa_4c_trunc_14;
  else if (nfa_4c_uab_a_14 in(-1, -2)) then marketvalue_vehicles14 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles15        */
/*************************************************/

if (nfa_4c_trunc_15 >= 0) then marketvalue_vehicles15 = (marketvalue_vehicles15 + nfa_4c_trunc_15);
 else if (nfa_4c_trunc_15 in(-1, -2) & nfa_4c_uab_a_15 < 0) then marketvalue_vehicles15 = nfa_4c_trunc_15;
  else if (nfa_4c_uab_a_15 in(-1, -2)) then marketvalue_vehicles15 = -3;

/*************************************************/
/* CAR Component - marketvalue_vehicles16        */
/*************************************************/

if (nfa_4c_trunc_16 >= 0) then marketvalue_vehicles16 = (marketvalue_vehicles16 + nfa_4c_trunc_16);
 else if (nfa_4c_trunc_16 in(-1, -2)) then marketvalue_vehicles16 = nfa_4c_trunc_16;

/*************************************************/
/* CAR Component - marketvalue_vehicles17        */
/*************************************************/

if (nfa_4c_trunc_17 >= 0) then marketvalue_vehicles17 = (marketvalue_vehicles17 + nfa_4c_trunc_17);
 else if (nfa_4c_trunc_17 in(-1, -2)) then marketvalue_vehicles17 = nfa_4c_trunc_17;

/*************************************************/
/* CAR Component - mktval_othervehicles          */
/*************************************************/

if (nfa_5 = 1 & nfa_5c_trunc >= 0) then mktval_othervehicles = (mktval_othervehicles + nfa_5c_trunc);
 else if (nfa_5 = 1 & nfa_5c_ref_1 = 1 & nfa_5c_sr000001 < 0 & nfa_5c_sr000002 < 0
 & nfa_5c_uab_a < 0 & nfa_5c_uab_b < 0 & nfa_5c_uab_c < 0) then mktval_othervehicles = -1;
  else if (nfa_5 = 1 & nfa_5c_trunc in(-1, -2) & nfa_5c_sr000001 < 0 & nfa_5c_sr000002 < 0
  & nfa_5c_uab_a < 0 & nfa_5c_uab_b < 0 & nfa_5c_uab_c < 0) then mktval_othervehicles = nfa_5c_trunc;
    else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 = nfa_5c_sr000001) then 
    mktval_othervehicles = (mktval_othervehicles + nfa_5c_sr000001);
     else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 > nfa_5c_sr000001) then 
     mktval_othervehicles = (mktval_othervehicles + (((nfa_5c_sr000002 - nfa_5c_sr000001)/2) + nfa_5c_sr000001));
      else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 < nfa_5c_sr000001) then 
      mktval_othervehicles = (mktval_othervehicles + (((nfa_5c_sr000001 - nfa_5c_sr000002)/2) + nfa_5c_sr000002));
       else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_b = 0) then mktval_othervehicles = (mktval_othervehicles + quartile1);
        else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_b = 1) then mktval_othervehicles = (mktval_othervehicles + quartile2);
         else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_c = 0) then mktval_othervehicles = (mktval_othervehicles + quartile3);
          else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_c = 1) then mktval_othervehicles = (mktval_othervehicles + 50000);
           else if (nfa_5c_uab_a in(-1, -2) | nfa_5c_uab_b in(-1, -2) | nfa_5c_uab_c in(-1, -2)) then mktval_othervehicles = -3;

/*******************************/
/* Add components CAR          */
/*******************************/

if (mktval_assetpoorcars1 >= 0) then carc = (carc + mktval_assetpoorcars1); 
if (mktval_assetpoorcars2 >= 0) then carc = (carc + mktval_assetpoorcars2); 
if (mktval_assetpoorcars3 >= 0) then carc = (carc + mktval_assetpoorcars3); 
if (marketvalue_vehicles1 >= 0) then carc = (carc + marketvalue_vehicles1); 
if (marketvalue_vehicles2 >= 0) then carc = (carc + marketvalue_vehicles2); 
if (marketvalue_vehicles3 >= 0) then carc = (carc + marketvalue_vehicles3); 
if (marketvalue_vehicles4 >= 0) then carc = (carc + marketvalue_vehicles4); 
if (marketvalue_vehicles5 >= 0) then carc = (carc + marketvalue_vehicles5); 
if (marketvalue_vehicles6 >= 0) then carc = (carc + marketvalue_vehicles6); 
if (marketvalue_vehicles7 >= 0) then carc = (carc + marketvalue_vehicles7); 
if (marketvalue_vehicles8 >= 0) then carc = (carc + marketvalue_vehicles8); 
if (marketvalue_vehicles9 >= 0) then carc = (carc + marketvalue_vehicles9); 
if (marketvalue_vehicles10 >= 0) then carc = (carc + marketvalue_vehicles10); 
if (marketvalue_vehicles11 >= 0) then carc = (carc + marketvalue_vehicles11); 
if (marketvalue_vehicles12 >= 0) then carc = (carc + marketvalue_vehicles12); 
if (marketvalue_vehicles13 >= 0) then carc = (carc + marketvalue_vehicles13); 
if (marketvalue_vehicles14 >= 0) then carc = (carc + marketvalue_vehicles14); 
if (marketvalue_vehicles15 >= 0) then carc = (carc + marketvalue_vehicles15); 
if (marketvalue_vehicles16 >= 0) then carc = (carc + marketvalue_vehicles16); 
if (marketvalue_vehicles17 >= 0) then carc = (carc + marketvalue_vehicles17); 
if (mktval_othervehicles >= 0) then carc = (carc + mktval_othervehicles); 

if (mktval_assetpoorcars1 in(-1, -2, -3)) then carc = -3; 
else if (mktval_assetpoorcars2 in(-1, -2, -3)) then carc = -3; 
else if (mktval_assetpoorcars3 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles1 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles2 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles3 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles4 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles5 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles6 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles7 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles8 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles9 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles10 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles11 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles12 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles13 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles14 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles15 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles16 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles17 in(-1, -2, -3)) then carc = -3; 
else if (mktval_othervehicles in(-1, -2, -3)) then carc = -3; 

/************************/
/* Compute TNFW_TRUNC   */
/************************/
/*******************************************************/
/* TNFW_TRUNC - add components created in above code   */
/*******************************************************/

if (homec  >= 0) then tnfw_trunc = (tnfw_trunc + homec );
if (mortc  >= 0) then tnfw_trunc = (tnfw_trunc - mortc );
if (pdebtc >= 0) then tnfw_trunc = (tnfw_trunc - pdebtc);
if (cashc  >= 0) then tnfw_trunc = (tnfw_trunc + cashc );
if (irac   >= 0) then tnfw_trunc = (tnfw_trunc + irac  );
if (a401kc >= 0) then tnfw_trunc = (tnfw_trunc + a401kc);
if (cdsc   >= 0) then tnfw_trunc = (tnfw_trunc + cdsc  );
if (stockc >= 0) then tnfw_trunc = (tnfw_trunc + stockc);
if (bizc   >= 0) then tnfw_trunc = (tnfw_trunc + bizc  );
if (bdebtc >= 0) then tnfw_trunc = (tnfw_trunc - bdebtc);
if (cdebtc >= 0) then tnfw_trunc = (tnfw_trunc - cdebtc);
if (carc   >= 0) then tnfw_trunc = (tnfw_trunc + carc  );
if (posesc >= 0) then tnfw_trunc = (tnfw_trunc + posesc);
if (odebtc >= 0) then tnfw_trunc = (tnfw_trunc - odebtc);

if (homec  in(-1, -2, -3)) then tnfw_trunc = -3;
if (mortc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (pdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cashc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (irac   in(-1, -2, -3)) then tnfw_trunc = -3;
if (a401kc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdsc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (stockc in(-1, -2, -3)) then tnfw_trunc = -3;
if (bizc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (bdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (carc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (posesc in(-1, -2, -3)) then tnfw_trunc = -3;
if (odebtc in(-1, -2, -3)) then tnfw_trunc = -3;

/****************************************/
/* APPLY TOPCODE TO TNFW_TRUNC FOR 2012 */
/****************************************/

if (tnfw_trunc >  2060328) then tnfw_trunc = 3749941;

tnfw_trunc = round(tnfw_trunc);

/***************************************************************/
/* TNFW_TRUNC - adjust for partially missing range estimates   */
/***************************************************************/

if (tnfw_trunc ~= -3 & 
    ((nfa_1a_sr000001 >= 0 & nfa_1a_sr000002 in(-1, -2)) | (nfa_1a_sr000001 in(-1, -2) & nfa_1a_sr000002 >= 0)
  | (nfa_1b_sr000001 >= 0 & nfa_1b_sr000002 in(-1, -2)) | (nfa_1b_sr000001 in(-1, -2) & nfa_1b_sr000002 >= 0) 
  | (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 in(-1, -2)) | (nfa_1c_sr000001 in(-1, -2) & nfa_1c_sr000002 >= 0)
  | (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 in(-1, -2)) | (nfa_2a_sr000001 in(-1, -2) & nfa_2a_sr000002 >= 0)
  | (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 in(-1, -2)) | (nfa_2b_sr000001 in(-1, -2) & nfa_2b_sr000002 >= 0) 
  | (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 in(-1, -2)) | (nfa_2c_sr000001 in(-1, -2) & nfa_2c_sr000002 >= 0) 
  | (fa_1a_sr000001 >= 0 & fa_1a_sr000002 in(-1, -2)) | (fa_1a_sr000001 in(-1, -2) & fa_1a_sr000002 >= 0)
  | (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 in(-1, -2)) | (fa_8d_sr000001_01 in(-1, -2) & fa_8d_sr000002_01 >= 0)
  | (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 in(-1, -2)) | (fa_8d_sr000001_02 in(-1, -2) & fa_8d_sr000002_02 >= 0)
  | (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_03 in(-1, -2)) | (fa_8d_sr000001_03 in(-1, -2) & fa_8d_sr000002_03 >= 0)
  | (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_04 in(-1, -2)) | (fa_8d_sr000001_04 in(-1, -2) & fa_8d_sr000002_04 >= 0)
  | (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 in(-1, -2)) | (fa_8d_sr000001_05 in(-1, -2) & fa_8d_sr000002_05 >= 0)
  | (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 in(-1, -2)) | (fa_8d_sr000001_06 in(-1, -2) & fa_8d_sr000002_06 >= 0)
  | (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 in(-1, -2)) | (fa_8d_sr000001_07 in(-1, -2) & fa_8d_sr000002_07 >= 0)
  | (fa_6e_sr000001 >= 0 & fa_6e_sr000002 in(-1, -2)) | (fa_6e_sr000001 in(-1, -2) & fa_6e_sr000002 >= 0)
  | (fa_7c_sr000001 >= 0 & fa_7c_sr000002 in(-1, -2)) | (fa_7c_sr000001 in(-1, -2) & fa_7c_sr000002 >= 0)
  | (fa_2a_sr000001 >= 0 & fa_2a_sr000002 in(-1, -2)) | (fa_2a_sr000001 in(-1, -2) & fa_2a_sr000002 >= 0)
  | (fa_3a_sr000001 >= 0 & fa_3a_sr000002 in(-1, -2)) | (fa_3a_sr000001 in(-1, -2) & fa_3a_sr000002 >= 0)
  | (fa_4a_sr000001 >= 0 & fa_4a_sr000002 in(-1, -2)) | (fa_4a_sr000001 in(-1, -2) & fa_4a_sr000002 >= 0)
  | (fa_5a_sr000001 >= 0 & fa_5a_sr000002 in(-1, -2)) | (fa_5a_sr000001 in(-1, -2) & fa_5a_sr000002 >= 0)
  | (fa_9a_sr000001 >= 0 & fa_9a_sr000002 in(-1, -2)) | (fa_9a_sr000001 in(-1, -2) & fa_9a_sr000002 >= 0)
  | (fa_10a_sr000001 >= 0 & fa_10a_sr000002 in(-1, -2)) | (fa_10a_sr000001 in(-1, -2) & fa_10a_sr000002 >= 0)
  | (fa_11a_sr000001 >= 0 & fa_11a_sr000002 in(-1, -2)) | (fa_11a_sr000001 in(-1, -2) & fa_11a_sr000002 >= 0)
  | (q13_131_sr000001 >= 0 & q13_131_sr000002 in(-1, -2)) | (q13_131_sr000001 in(-1, -2) & q13_131_sr000002 >= 0)
  | (q13_132_sr000001 >= 0 & q13_132_sr000002 in(-1, -2)) | (q13_132_sr000001 in(-1, -2) & q13_132_sr000002 >= 0)
  | (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 in(-1, -2)) | (sc_12b_sr000001_01 in(-1, -2) & sc_12b_sr000002_01 >= 0)
  | (nfa_4f_sr000001_01 >= 0 & nfa_4f_sr000002_01 in(-1, -2)) | (nfa_4f_sr000001_01 in(-1, -2) & nfa_4f_sr000002_01 >= 0)
  | (nfa_4f_sr000001_02 >= 0 & nfa_4f_sr000002_02 in(-1, -2)) | (nfa_4f_sr000001_02 in(-1, -2) & nfa_4f_sr000002_02 >= 0)
  | (nfa_4f_sr000001_03 >= 0 & nfa_4f_sr000002_03 in(-1, -2)) | (nfa_4f_sr000001_03 in(-1, -2) & nfa_4f_sr000002_03 >= 0)
  | (nfa_4f_sr000001_06 >= 0 & nfa_4f_sr000002_06 in(-1, -2)) | (nfa_4f_sr000001_06 in(-1, -2) & nfa_4f_sr000002_06 >= 0)
  | (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 in(-1, -2)) | (sc_12a_sr000001_01 in(-1, -2) & sc_12a_sr000002_01 >= 0)
  | (nfa_4c_sr000001_01 >= 0 & nfa_4c_sr000002_01 in(-1, -2)) | (nfa_4c_sr000001_01 in(-1, -2) & nfa_4c_sr000002_01 >= 0)
  | (nfa_4c_sr000001_02 >= 0 & nfa_4c_sr000002_02 in(-1, -2)) | (nfa_4c_sr000001_02 in(-1, -2) & nfa_4c_sr000002_02 >= 0)
  | (nfa_4c_sr000001_03 >= 0 & nfa_4c_sr000002_03 in(-1, -2)) | (nfa_4c_sr000001_03 in(-1, -2) & nfa_4c_sr000002_03 >= 0)
  | (nfa_4c_sr000001_04 >= 0 & nfa_4c_sr000002_04 in(-1, -2)) | (nfa_4c_sr000001_04 in(-1, -2) & nfa_4c_sr000002_04 >= 0)
  | (nfa_4c_sr000001_05 >= 0 & nfa_4c_sr000002_05 in(-1, -2)) | (nfa_4c_sr000001_05 in(-1, -2) & nfa_4c_sr000002_05 >= 0)
  | (nfa_4c_sr000001_06 >= 0 & nfa_4c_sr000002_06 in(-1, -2)) | (nfa_4c_sr000001_06 in(-1, -2) & nfa_4c_sr000002_06 >= 0)
  | (nfa_4c_sr000001_07 >= 0 & nfa_4c_sr000002_07 in(-1, -2)) | (nfa_4c_sr000001_07 in(-1, -2) & nfa_4c_sr000002_07 >= 0)
  | (nfa_4c_sr000001_08 >= 0 & nfa_4c_sr000002_08 in(-1, -2)) | (nfa_4c_sr000001_08 in(-1, -2) & nfa_4c_sr000002_08 >= 0)
  | (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 in(-1, -2)) | (nfa_5c_sr000001 in(-1, -2) & nfa_5c_sr000002 >= 0)
  | (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 in(-1, -2)) | (nfa_6e_sr000001 in(-1, -2) & nfa_6e_sr000002 >= 0)))
  then tnfw_trunc = -3;
end;

2016 TNFW_TRUNC variable creation



/***************************************************/
/* Compute dollar amt for dollars & cents vars     */
/***************************************************/

nfa_7d_truncc = nfa_7d_trunc;
if (nfa_7d_trunc > 0) then nfa_7d_truncc = (nfa_7d_trunc/100);

/***************************************************/
/* Compute dynamic QUARTILE VALUES for estimates   */
/***************************************************/

array quartileqs (i) quartile1 quartile2 quartile3 quartile4;

do i = 1 to 4;
 quartileqs = 0;
end;

if (symbol_entry_othhh = 7200) then do;
  quartile1 = (5000/2);
  quartile2 = (5000 + ((7200-5000)/2));
  quartile3 = (7200 + ((30000-7200)/2));
  quartile4 = 30000; /* Note: Use median of actual values > 30000 where possible.  Otherwise set to 30000 */
end;
else if (symbol_entry_othhh = 13000) then do;
  quartile1 = (5000/2);
  quartile2 = (5000 + ((13000-5000)/2));
  quartile3 = (13000 + ((30000-13000)/2));
  quartile4 = 30000; /* Note: Use median of actual values > 30000 where possible.  Otherwise set to 30000 */
end;

/***************************************************/
/* BEGIN COMPUTATIONS FOR NET WEALTH COMPONENTS    */
/***************************************************/

array assetsc (i)      homec mortc pdebtc cashc irac a401kc cdsc stockc trustc bizc 
                       bdebtc cdebtc carc posesc odebtc tnfw_trunc
                       collections items ccdebt studentloan childstudentloan owebusiness otherdebt
                       solebiz farm_1_value1 farm_2_value1 business_1_value1 business_2_value1
                       business_3_value1 business_4_value1 realestate_1_value1 
                       realestate_2_value1 realestate_3_value1 realestate_4_value1 realestate_5_value1 
                       farm_1_value farm_2_value business_1_value business_2_value
                       business_3_value business_4_value realestate_1_value 
                       realestate_2_value realestate_3_value realestate_4_value realestate_5_value 
                       debtbiz farm_1_debt1 farm_2_debt1 business_1_debt1 business_2_debt1
                       business_3_debt1 business_4_debt1 realestate_1_debt1 
                       realestate_2_debt1 realestate_3_debt1 realestate_4_debt1 realestate_5_debt1 
                       farm_1_debt farm_2_debt business_1_debt business_2_debt
                       business_3_debt business_4_debt realestate_1_debt
                       govbonds mutual lifeinsure shares corpbond moneyowedtor
                       home1 secondhome mort1 secondmort pdebt1 secondpdebt
                       ira1 ira2 ira3 ira4 ira5 ira6 ira7 r_401k sp_401k
                       amtowe_assetpoorcars1 amtowe_assetpoorcars2
                       amountowe_vehicles1 amountowe_vehicles2 amountowe_vehicles3 amountowe_vehicles4
                       amountowe_vehicles5 amountowe_vehicles6 amountowe_vehicles8 amountowe_vehicles9 amtowe_othervehicles
                       mktval_assetpoorcars1 mktval_assetpoorcars2
                       marketvalue_vehicles1 marketvalue_vehicles2 marketvalue_vehicles3 marketvalue_vehicles4
                       marketvalue_vehicles5 marketvalue_vehicles6 marketvalue_vehicles7 marketvalue_vehicles8
                       marketvalue_vehicles9 marketvalue_vehicles10 marketvalue_vehicles11 marketvalue_vehicles12 
                       marketvalue_vehicles13 marketvalue_vehicles14 marketvalue_vehicles15 marketvalue_vehicles16 
                       marketvalue_vehicles17 marketvalue_vehicles18 marketvalue_vehicles19 marketvalue_vehicles20 
                       mktval_othervehicles;
                   
                       
do i = 1 to 120;
 if (sampweight = 0) then assetsc = -5;
  else if (sampweight > 0) then assetsc = 0;
end;

/****************************/
/* Compute POSES            */
/****************************/
/************************************************/
/* POSES Component - collections                */
/************************************************/

if (nfa_6a = 1 & nfa_6e_trunc >= 0) then collections = (collections + nfa_6e_trunc);
 else if (nfa_6a = 1 & nfa_6e_ref_1 = 1 & nfa_6e_sr000001 < 0 & nfa_6e_sr000002 < 0 
 & nfa_6e_uab_a < 0 & nfa_6e_uab_b < 0 & nfa_6e_uab_c < 0) then collections = -1;
  else if (nfa_6a = 1 & nfa_6e_trunc in(-1, -2) & nfa_6e_sr000001 < 0 & nfa_6e_sr000002 < 0 
  & nfa_6e_uab_a < 0 & nfa_6e_uab_b < 0 & nfa_6e_uab_c < 0) then collections = nfa_6e_trunc;
    else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 >= 0 & nfa_6e_sr000002 = nfa_6e_sr000001) then 
    collections = (collections + nfa_6e_sr000001);
     else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 >= 0 & nfa_6e_sr000002 > nfa_6e_sr000001) then 
     collections = (collections + (((nfa_6e_sr000002 - nfa_6e_sr000001)/2) + nfa_6e_sr000001));
      else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 >= 0 & nfa_6e_sr000002 < nfa_6e_sr000001) then 
      collections = (collections + (((nfa_6e_sr000001 - nfa_6e_sr000002)/2) + nfa_6e_sr000002));
       else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_b = 0) then collections = (collections + quartile1);
        else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_b = 1) then collections = (collections + quartile2);
         else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_c = 0) then collections = (collections + quartile3);
          else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_c = 1) then collections = (collections + 75000);
           else if (nfa_6e_uab_a in(-1, -2) | nfa_6e_uab_b in(-1, -2) | nfa_6e_uab_c in(-1, -2)) then collections = -3;
          
/************************************************/
/* POSES Component - items                      */
/************************************************/

if (nfa_7 = 1 & nfa_7d_truncc >= 0) then items = (items + nfa_7d_truncc);
 else if (nfa_7 = 1 & nfa_7d_ref_1 = 1 & nfa_7d_uab_a < 0 & nfa_7d_uab_b < 0 & nfa_7d_uab_c < 0) then items = -1;
  else if (nfa_7 = 1 & nfa_7d_truncc in(-1, -2) & nfa_7d_uab_a < 0 & nfa_7d_uab_b < 0 & nfa_7d_uab_c < 0) then items = nfa_7d_truncc;
   else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_b = 0) then items = (items + quartile1);
    else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_b = 1) then items = (items + quartile2);
     else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_c = 0) then items = (items + quartile3);
      else if (nfa_7d_truncc in(-1, -2, -4) & nfa_7d_uab_c = 1) then items = (items + 55500);
       else if (nfa_7d_uab_a in(-1, -2) | nfa_7d_uab_b in(-1, -2) | nfa_7d_uab_c in(-1, -2)) then items = -3;

/*******************************/
/* Add components POSES        */
/*******************************/

if (collections >= 0) then posesc = (posesc + collections); 
if (items >= 0) then posesc = (posesc + items);
if (collections in(-1, -2, -3)) then posesc = -3;
else if (items in(-1, -2, -3)) then posesc = -3;

/****************************/
/* Compute ODEBT            */
/****************************/

/************************************************/
/* ODEBT Component - ccdebt                     */
/************************************************/

if (debt_1 = 1 & debt_1a >= 0) then ccdebt = (ccdebt + debt_1a);
 else if (debt_1 = 1 & debt_1a_ref_1 = 1 & debt_1a_sr000001 < 0 & debt_1a_sr000002 < 0 
 & debt_1a_uab_a < 0 & debt_1a_uab_b < 0 & debt_1a_uab_c < 0) then ccdebt = -1;
  else if (debt_1 = 1 & debt_1a in(-1, -2) & debt_1a_sr000001 < 0 & debt_1a_sr000002 < 0 
  & debt_1a_uab_a < 0 & debt_1a_uab_b < 0 & debt_1a_uab_c < 0) then ccdebt = debt_1a;
    else if (debt_1a_sr000001 >= 0 & debt_1a_sr000002 >= 0 & debt_1a_sr000002 = debt_1a_sr000001) then 
    ccdebt = (ccdebt + debt_1a_sr000001);
     else if (debt_1a_sr000001 >= 0 & debt_1a_sr000002 >= 0 & debt_1a_sr000002 > debt_1a_sr000001) then 
     ccdebt = (ccdebt + (((debt_1a_sr000002 - debt_1a_sr000001)/2) + debt_1a_sr000001));
      else if (debt_1a_sr000001 >= 0 & debt_1a_sr000002 >= 0 & debt_1a_sr000002 < debt_1a_sr000001) then 
      ccdebt = (ccdebt + (((debt_1a_sr000001 - debt_1a_sr000002)/2) + debt_1a_sr000002));
       else if (debt_1a in(-1, -2, -4) & debt_1a_uab_b = 0) then ccdebt = (ccdebt + quartile1);
        else if (debt_1a in(-1, -2, -4) & debt_1a_uab_b = 1) then ccdebt = (ccdebt + quartile2);
         else if (debt_1a in(-1, -2, -4) & debt_1a_uab_c = 0) then ccdebt = (ccdebt + quartile3);
          else if (debt_1a in(-1, -2, -4) & debt_1a_uab_c = 1) then ccdebt = (ccdebt + 41000);
           else if (debt_1a_uab_a in(-1, -2) | debt_1a_uab_b in(-1, -2) | debt_1a_uab_c in(-1, -2)) then ccdebt = -3;

/************************************************/
/* ODEBT Component - studentloan                */
/************************************************/

if (debt_2 = 1 & debt_2a >= 0) then studentloan = (studentloan + debt_2a);
 else if (debt_2 = 1 & debt_2a_ref_1 = 1 & debt_2a_uab_a < 0 & debt_2a_uab_b < 0 
 & debt_2a_uab_c < 0) then studentloan = -1;
  else if (debt_2 = 1 & debt_2a in(-1, -2) & debt_2a_uab_a < 0 & debt_2a_uab_b < 0 
  & debt_2a_uab_c < 0) then studentloan = debt_2a;
   else if (debt_2a in(-1, -2, -4) & debt_2a_uab_b = 0) then studentloan = (studentloan + quartile1);
    else if (debt_2a in(-1, -2, -4) & debt_2a_uab_b = 1) then studentloan = (studentloan + quartile2);
     else if (debt_2a in(-1, -2, -4) & debt_2a_uab_c = 0) then studentloan = (studentloan + quartile3);
      else if (debt_2a in(-1, -2, -4) & debt_2a_uab_c = 1) then studentloan = (studentloan + 60000);
       else if (debt_2a_uab_a in(-1, -2) | debt_2a_uab_b in(-1, -2) | debt_2a_uab_c in(-1, -2)) then studentloan = -3;

/************************************************/
/* ODEBT Component - childstudentloan           */
/************************************************/

if (debt_2c = 1 & debt_2d >= 0) then childstudentloan = (childstudentloan + debt_2d);
 else if (debt_2c = 1 & debt_2d_ref_1 = 1 & debt_2d_uab_a < 0 & debt_2d_uab_b < 0 
 & debt_2d_uab_c < 0) then childstudentloan = -1;
  else if (debt_2c = 1 & debt_2d in(-1, -2) & debt_2d_uab_a < 0 & debt_2d_uab_b < 0 
  & debt_2d_uab_c < 0) then childstudentloan = debt_2d;
   else if (debt_2d in(-1, -2, -4) & debt_2d_uab_b = 0) then childstudentloan = (childstudentloan + quartile1);
    else if (debt_2d in(-1, -2, -4) & debt_2d_uab_b = 1) then childstudentloan = (childstudentloan + quartile2);
     else if (debt_2d in(-1, -2, -4) & debt_2d_uab_c = 0) then childstudentloan = (childstudentloan + quartile3);
      else if (debt_2d in(-1, -2, -4) & debt_2d_uab_c = 1) then childstudentloan = (childstudentloan + 60000);
       else if (debt_2d_uab_a in(-1, -2) | debt_2d_uab_b in(-1, -2) | debt_2d_uab_c in(-1, -2)) then childstudentloan = -3;

/************************************************/
/* ODEBT Component - owebusiness                */
/************************************************/

if (debt_3 = 1 & debt_3a_trunc >= 0) then owebusiness = (owebusiness + debt_3a_trunc);
 else if (debt_3 = 1 & debt_3a_ref_1 = 1 & debt_3a_uab_a < 0 & debt_3a_uab_b < 0 
 & debt_3a_uab_c < 0) then owebusiness = -1;
  else if (debt_3 = 1 & debt_3a_trunc in(-1, -2) & debt_3a_uab_a < 0 & debt_3a_uab_b < 0 
  & debt_3a_uab_c < 0) then owebusiness = debt_3a_trunc;
   else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_b = 0) then owebusiness = (owebusiness + quartile1);
    else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_b = 1) then owebusiness = (owebusiness + quartile2);
     else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_c = 0) then owebusiness = (owebusiness + quartile3);
      else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_c = 1) then owebusiness = (owebusiness + 60000);
       else if (debt_3a_uab_a in(-1, -2) | debt_3a_uab_b in(-1, -2) | debt_3a_uab_c in(-1, -2)) then owebusiness = -3;

/************************************************/
/* ODEBT Component - otherdebt                  */
/************************************************/

if (debt_4 = 1 & debt_4a_trunc >= 0) then otherdebt = (otherdebt + debt_4a_trunc);
 else if (debt_4 = 1 & debt_4a_ref_1 = 1 & debt_4a_uab_a < 0 & debt_4a_uab_b < 0) then otherdebt = -1;
  else if (debt_4 = 1 & debt_4a_trunc in(-1, -2) & debt_4a_uab_a < 0 & debt_4a_uab_b < 0) then otherdebt = debt_4a_trunc;
   else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_b = 0) then otherdebt = (otherdebt + quartile1);
    else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_b = 1) then otherdebt = (otherdebt + quartile2);
      else if (debt_4a_uab_a in(-1, -2) | debt_4a_uab_b in(-1, -2)) then otherdebt = -3;

/*******************************/
/* Add components ODEBT        */
/*******************************/

if (ccdebt >= 0) then odebtc = (odebtc + ccdebt); 
if (studentloan >= 0) then odebtc = (odebtc + studentloan);
if (childstudentloan >= 0) then odebtc = (odebtc + childstudentloan);
if (owebusiness >= 0) then odebtc = (odebtc + owebusiness);
if (otherdebt >= 0) then odebtc = (odebtc + otherdebt);
if (ccdebt in(-1, -2, -3)) then odebtc = -3;
else if (studentloan in(-1, -2, -3)) then odebtc = -3;
else if (childstudentloan in(-1, -2, -3)) then odebtc = -3;
else if (owebusiness in(-1, -2, -3)) then odebtc = -3;
else if (otherdebt in(-1, -2, -3)) then odebtc = -3;

/****************************/
/* Compute BIZ              */
/****************************/

/************************************************/
/* BIZ Component - solebiz                      */
/************************************************/

if (q13_131_trunc >= 0) then solebiz = (solebiz + q13_131_trunc);
 else if (q13_131_trunc = 1 & q13_131_ref_1 = 1 & q13_131_sr000001 < 0 & q13_131_sr000002 < 0 
 & q13_131_uab_a < 0 & q13_131_uab_c < 0) then solebiz = -1;
  else if (q13_131_trunc in(-1, -2) & q13_131_sr000001 < 0 & q13_131_sr000002 < 0 
  & q13_131_uab_a < 0 & q13_131_uab_c < 0) then solebiz = q13_131_trunc;
    else if (q13_131_sr000001 >= 0 & q13_131_sr000002 >= 0 & q13_131_sr000002 = q13_131_sr000001) then 
    solebiz = (solebiz + q13_131_sr000001);
     else if (q13_131_sr000001 >= 0 & q13_131_sr000002 >= 0 & q13_131_sr000002 > q13_131_sr000001) then 
     solebiz = (solebiz + (((q13_131_sr000002 - q13_131_sr000001)/2) + q13_131_sr000001));
      else if (q13_131_sr000001 >= 0 & q13_131_sr000002 >= 0 & q13_131_sr000002 < q13_131_sr000001) then 
      solebiz = (solebiz + (((q13_131_sr000001 - q13_131_sr000002)/2) + q13_131_sr000002));
       else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_c = 0) then solebiz = (solebiz + quartile3);
        else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_c = 1) then solebiz = (solebiz + 350000);
         else if (q13_131_uab_a in(-1, -2) | q13_131_uab_c in(-1, -2)) then solebiz = -3;

/********************************************************************************************************/
/* BIZ Components - farm_#_value, business_#_value, realestate_#_value & percentage ownership           */
/********************************************************************************************************/

if (q13_fjt_11_trunc_01 > -4) then farm_1_value1 = q13_fjt_11_trunc_01;
if (q13_fjt_11_trunc_02 > -4) then farm_2_value1 = q13_fjt_11_trunc_02;
if (q13_bppjt_11_trunc_01 > -4) then business_1_value1 = q13_bppjt_11_trunc_01;
if (q13_bppjt_11_trunc_02 > -4) then business_2_value1 = q13_bppjt_11_trunc_02;
if (q13_bppjt_11_trunc_03 > -4) then business_3_value1 = q13_bppjt_11_trunc_03;
if (q13_bppjt_11_trunc_04 > -4) then business_4_value1 = q13_bppjt_11_trunc_04;
if (q13_rejt_11_trunc_01 > -4) then realestate_1_value1 = q13_rejt_11_trunc_01;
if (q13_rejt_11_trunc_02 > -4) then realestate_2_value1 = q13_rejt_11_trunc_02;
if (q13_rejt_11_trunc_03 > -4) then realestate_3_value1 = q13_rejt_11_trunc_03;
if (q13_rejt_11_trunc_04 > -4) then realestate_4_value1 = q13_rejt_11_trunc_04;
if (q13_rejt_11_trunc_05 > -4) then realestate_5_value1 = q13_rejt_11_trunc_05;

if (q13_fjt_12b_01 > -4) then farm_1_pcntshare = q13_fjt_12b_01;
if (q13_fjt_12b_02 > -4) then farm_2_pcntshare = q13_fjt_12b_02;
if (q13_bppjt_12b_01 > -4) then business_1_pcntshare = q13_bppjt_12b_01;
if (q13_bppjt_12b_02 > -4) then business_2_pcntshare = q13_bppjt_12b_02;
if (q13_bppjt_12b_03 > -4) then business_3_pcntshare = q13_bppjt_12b_03;
if (q13_bppjt_12b_04 > -4) then business_4_pcntshare = q13_bppjt_12b_04;
if (q13_rejt_12b_01 > -4) then realestate_1_pcntshare = q13_rejt_12b_01;
if (q13_rejt_12b_02 > -4) then realestate_2_pcntshare = q13_rejt_12b_02;
if (q13_rejt_12b_03 > -4) then realestate_3_pcntshare = q13_rejt_12b_03;
if (q13_rejt_12b_04 > -4) then realestate_4_pcntshare = q13_rejt_12b_04;
if (q13_rejt_12b_05 > -4) then realestate_5_pcntshare = q13_rejt_12b_05;

if (farm_1_pcntshare > 0) then farm_1_pcntshare = (farm_1_pcntshare / 100);
if (farm_2_pcntshare > 0) then farm_2_pcntshare = (farm_2_pcntshare / 100);
if (business_1_pcntshare > 0) then business_1_pcntshare = (business_1_pcntshare / 100);
if (business_2_pcntshare > 0) then business_2_pcntshare = (business_2_pcntshare / 100);
if (business_3_pcntshare > 0) then business_3_pcntshare = (business_3_pcntshare / 100);
if (business_4_pcntshare > 0) then business_4_pcntshare = (business_4_pcntshare / 100);
if (realestate_1_pcntshare > 0) then realestate_1_pcntshare = (realestate_1_pcntshare / 100);
if (realestate_2_pcntshare > 0) then realestate_2_pcntshare = (realestate_2_pcntshare / 100);
if (realestate_3_pcntshare > 0) then realestate_3_pcntshare = (realestate_3_pcntshare / 100);
if (realestate_4_pcntshare > 0) then realestate_4_pcntshare = (realestate_4_pcntshare / 100);
if (realestate_5_pcntshare > 0) then realestate_5_pcntshare = (realestate_5_pcntshare / 100);

if (farm_1_value1 >= 0 & farm_1_pcntshare >= 0) then farm_1_value = (farm_1_value1 * farm_1_pcntshare);
if (farm_2_value1 >= 0 & farm_2_pcntshare >= 0) then farm_2_value = (farm_2_value1 * farm_2_pcntshare);
if (business_1_value1 >= 0 & business_1_pcntshare >= 0) then business_1_value = (business_1_value1 * business_1_pcntshare);
if (business_2_value1 >= 0 & business_2_pcntshare >= 0) then business_2_value = (business_2_value1 * business_2_pcntshare);
if (business_3_value1 >= 0 & business_3_pcntshare >= 0) then business_3_value = (business_3_value1 * business_3_pcntshare);
if (business_4_value1 >= 0 & business_4_pcntshare >= 0) then business_4_value = (business_4_value1 * business_4_pcntshare);
if (realestate_1_value1 >= 0 & realestate_1_pcntshare >= 0) then realestate_1_value = (realestate_1_value1 * realestate_1_pcntshare);
if (realestate_2_value1 >= 0 & realestate_2_pcntshare >= 0) then realestate_2_value = (realestate_2_value1 * realestate_2_pcntshare);
if (realestate_3_value1 >= 0 & realestate_3_pcntshare >= 0) then realestate_3_value = (realestate_3_value1 * realestate_3_pcntshare);
if (realestate_4_value1 >= 0 & realestate_4_pcntshare >= 0) then realestate_4_value = (realestate_4_value1 * realestate_4_pcntshare);
if (realestate_5_value1 >= 0 & realestate_5_pcntshare >= 0) then realestate_5_value = (realestate_5_value1 * realestate_5_pcntshare);

/*******************************/
/* Add components BIZ          */
/*******************************/

if (solebiz >= 0) then bizc = (bizc + solebiz); 
if (farm_1_value >= 0) then bizc = (bizc + farm_1_value);
if (farm_2_value >= 0) then bizc = (bizc + farm_2_value);
if (business_1_value >= 0) then bizc = (bizc + business_1_value);
if (business_2_value >= 0) then bizc = (bizc + business_2_value);
if (business_3_value >= 0) then bizc = (bizc + business_3_value);
if (business_4_value >= 0) then bizc = (bizc + business_4_value);
if (realestate_1_value >= 0) then bizc = (bizc + realestate_1_value);
if (realestate_2_value >= 0) then bizc = (bizc + realestate_2_value);
if (realestate_3_value >= 0) then bizc = (bizc + realestate_3_value);
if (realestate_4_value >= 0) then bizc = (bizc + realestate_4_value);
if (realestate_5_value >= 0) then bizc = (bizc + realestate_5_value);

if (solebiz in(-1, -2, -3)) then bizc = -3;
if (farm_1_value in(-1, -2, -3) | farm_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (farm_2_value in(-1, -2, -3) | farm_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_1_value in(-1, -2, -3) | business_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_2_value in(-1, -2, -3) | business_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_3_value in(-1, -2, -3) | business_3_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_4_value in(-1, -2, -3) | business_4_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_1_value in(-1, -2, -3) | realestate_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_2_value in(-1, -2, -3) | realestate_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_3_value in(-1, -2, -3) | realestate_3_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_4_value in(-1, -2, -3) | realestate_4_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_5_value in(-1, -2, -3) | realestate_5_pcntshare in(-1, -2, -3)) then bizc = -3;

/****************************/
/* Compute BDEBT            */
/****************************/

/************************************************/
/* BDEBT Component - debtbiz                    */
/************************************************/

if (q13_132_trunc >= 0) then debtbiz = (debtbiz + q13_132_trunc);
 else if (q13_132_trunc = 1 & q13_132_ref_1 = 1 & q13_132_sr000001 < 0 & q13_132_sr000002 < 0 
 & q13_132_uab_a < 0 & q13_132_uab_c < 0) then debtbiz = -1;
  else if (q13_132_trunc in(-1, -2) & q13_132_sr000001 < 0 & q13_132_sr000002 < 0 
  & q13_132_uab_a < 0 & q13_132_uab_c < 0) then debtbiz = q13_132_trunc;
    else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 = q13_132_sr000001) then 
    debtbiz = (debtbiz + q13_132_sr000001);
     else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 > q13_132_sr000001) then 
     debtbiz = (debtbiz + (((q13_132_sr000002 - q13_132_sr000001)/2) + q13_132_sr000001));
      else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 < q13_132_sr000001) then 
      debtbiz = (debtbiz + (((q13_132_sr000001 - q13_132_sr000002)/2) + q13_132_sr000002));
       else if (q13_132_trunc in(-1, -2, -4) & q13_132_uab_c = 0) then debtbiz = (debtbiz + quartile3);
        else if (q13_132_trunc in(-1, -2, -4) & q13_132_uab_c = 1) then debtbiz = (debtbiz + 190000);
         else if (q13_132_uab_a in(-1, -2) | q13_132_uab_c in(-1, -2)) then debtbiz = -3;

/***************************************************************************/
/* BDEBT Components - farm_#_debt, business_#_debt, realestate_#_debt      */
/*       (use ownership percentage computed above for bizc)                */
/***************************************************************************/

if (q13_fjt_12_01 > -4) then farm_1_debt1 = q13_fjt_12_01;
if (q13_fjt_12_02 > -4) then farm_2_debt1 = q13_fjt_12_02;
if (q13_bppjt_12_trunc_01 > -4) then business_1_debt1 = q13_bppjt_12_trunc_01;
if (q13_bppjt_12_trunc_02 > -4) then business_2_debt1 = q13_bppjt_12_trunc_02;
if (q13_bppjt_12_trunc_03 > -4) then business_3_debt1 = q13_bppjt_12_trunc_03;
if (q13_bppjt_12_trunc_04 > -4) then business_4_debt1 = q13_bppjt_12_trunc_04;
if (q13_rejt_12_trunc > -4) then realestate_1_debt1 = q13_rejt_12_trunc;

if (farm_1_debt1 >= 0 & farm_1_pcntshare >= 0) then farm_1_debt = (farm_1_debt1 * farm_1_pcntshare);
if (farm_2_debt1 >= 0 & farm_2_pcntshare >= 0) then farm_2_debt = (farm_2_debt1 * farm_2_pcntshare);
if (business_1_debt1 >= 0 & business_1_pcntshare >= 0) then business_1_debt = (business_1_debt1 * business_1_pcntshare);
if (business_2_debt1 >= 0 & business_2_pcntshare >= 0) then business_2_debt = (business_2_debt1 * business_2_pcntshare);
if (business_3_debt1 >= 0 & business_3_pcntshare >= 0) then business_3_debt = (business_3_debt1 * business_3_pcntshare);
if (business_4_debt1 >= 0 & business_4_pcntshare >= 0) then business_4_debt = (business_4_debt1 * business_4_pcntshare);
if (realestate_1_debt1 >= 0 & realestate_1_pcntshare >= 0) then realestate_1_debt = (realestate_1_debt1 * realestate_1_pcntshare);

/*******************************/
/* Add components BDEBT        */
/*******************************/

if (debtbiz >= 0) then bdebtc = (bdebtc + debtbiz); 
if (farm_1_debt >= 0) then bdebtc = (bdebtc + farm_1_debt);
if (farm_2_debt >= 0) then bdebtc = (bdebtc + farm_2_debt);
if (business_1_debt >= 0) then bdebtc = (bdebtc + business_1_debt);
if (business_2_debt >= 0) then bdebtc = (bdebtc + business_2_debt);
if (business_3_debt >= 0) then bdebtc = (bdebtc + business_3_debt);
if (business_4_debt >= 0) then bdebtc = (bdebtc + business_4_debt);
if (realestate_1_debt >= 0) then bdebtc = (bdebtc + realestate_1_debt);

if (debtbiz in(-1, -2, -3)) then bdebtc = -3; 
if (farm_1_debt in(-1, -2, -3) | farm_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (farm_2_debt in(-1, -2, -3) | farm_2_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_1_debt in(-1, -2, -3) | business_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_2_debt in(-1, -2, -3) | business_2_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_3_debt in(-1, -2, -3) | business_3_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_4_debt in(-1, -2, -3) | business_4_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (realestate_1_debt in(-1, -2, -3) | realestate_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;

/****************************/
/* Compute CASH             */
/****************************/

/************************************************/
/* CASH Component - cash                        */
/************************************************/

if (fa_1 = 1 & fa_1a_trunc >= 0) then cashc = (cashc + fa_1a_trunc);
 else if (fa_1 = 1 & fa_1_ref_1 = 1 & fa_1a_sr000001 < 0 & fa_1a_sr000002 < 0 
 & fa_1a_uab_a < 0 & fa_1a_uab_b < 0 & fa_1a_uab_c < 0) then cashc = -1;
  else if (fa_1 = 1 & fa_1a_trunc in(-1, -2) & fa_1a_sr000001 < 0 & fa_1a_sr000002 < 0 
  & fa_1a_uab_a < 0 & fa_1a_uab_b < 0 & fa_1a_uab_c < 0) then cashc = fa_1a_trunc;
    else if (fa_1a_sr000001 >= 0 & fa_1a_sr000002 >= 0 & fa_1a_sr000002 = fa_1a_sr000001) then 
    cashc = (cashc + fa_1a_sr000001);
     else if (fa_1a_sr000001 >= 0 & fa_1a_sr000002 >= 0 & fa_1a_sr000002 > fa_1a_sr000001) then 
     cashc = (cashc + (((fa_1a_sr000002 - fa_1a_sr000001)/2) + fa_1a_sr000001));
      else if (fa_1a_sr000001 >= 0 & fa_1a_sr000002 >= 0 & fa_1a_sr000002 < fa_1a_sr000001) then 
      cashc = (cashc + (((fa_1a_sr000001 - fa_1a_sr000002)/2) + fa_1a_sr000002));
       else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_b = 0) then cashc = (cashc + quartile1);
        else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_b = 1) then cashc = (cashc + quartile2);
         else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_c = 0) then cashc = (cashc + quartile3);
          else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_c = 1) then cashc = (cashc + 90000);
           else if (fa_1a_uab_a in(-1, -2) | fa_1a_uab_b in(-1, -2) | fa_1a_uab_c in(-1, -2)) then cashc = -3;

/*************************************************************/
/* No need to add components for CASHC - set -3 missing      */
/*************************************************************/

if (cashc in(-1, -2, -3)) then cashc = -3;

/****************************/
/* Compute CDS              */
/****************************/

/************************************************/
/* CDS Component - cds                          */
/************************************************/

if (fa_2 = 1 & fa_2a_trunc >= 0) then cdsc = (cdsc + fa_2a_trunc);
 else if (fa_2 = 1 & fa_2_ref_1 = 1 & fa_2a_sr000001 < 0 & fa_2a_sr000002 < 0 
 & fa_2a_uab_a < 0 & fa_2a_uab_b < 0 & fa_2a_uab_c < 0) then cdsc = -1;
  else if (fa_2 = 1 & fa_2a_trunc in(-1, -2) & fa_2a_sr000001 < 0 & fa_2a_sr000002 < 0 
  & fa_2a_uab_a < 0 & fa_2a_uab_b < 0 & fa_2a_uab_c < 0) then cdsc = fa_2a_trunc;
    else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002 >= 0 & fa_2a_sr000002 = fa_2a_sr000001) then 
    cdsc = (cdsc + fa_2a_sr000001);
     else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002 >= 0 & fa_2a_sr000002 > fa_2a_sr000001) then 
     cdsc = (cdsc + (((fa_2a_sr000002 - fa_2a_sr000001)/2) + fa_2a_sr000001));
      else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002 >= 0 & fa_2a_sr000002 < fa_2a_sr000001) then 
      cdsc = (cdsc + (((fa_2a_sr000001 - fa_2a_sr000002)/2) + fa_2a_sr000002));
       else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_b = 0) then cdsc = (cdsc + quartile1);
        else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_b = 1) then cdsc = (cdsc + quartile2);
         else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_c = 0) then cdsc = (cdsc + quartile3);
          else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_c = 1) then cdsc = (cdsc + 92500);
           else if (fa_2a_uab_a in(-1, -2) | fa_2a_uab_b in(-1, -2) | fa_2a_uab_c in(-1, -2)) then cdsc = -3;

/*************************************************************/
/* No need to add components for CDSC - set -3 missing       */
/*************************************************************/

if (cdsc in(-1, -2, -3)) then cdsc = -3;

/****************************/
/* Compute STOCK            */
/****************************/

/************************************************/
/* STOCK Component - govbonds                   */
/************************************************/

if (fa_3 = 1 & fa_3a_trunc >= 0) then govbonds = (govbonds + fa_3a_trunc);
 else if (fa_3 = 1 & fa_3_ref_1 = 1 & fa_3a_sr000001 < 0 & fa_3a_sr000002 < 0 
 & fa_3a_uab_a < 0 & fa_3a_uab_b < 0 & fa_3a_uab_c < 0) then govbonds = -1;
  else if (fa_3 = 1 & fa_3a_trunc in(-1, -2) & fa_3a_sr000001 < 0 & fa_3a_sr000002 < 0 
  & fa_3a_uab_a < 0 & fa_3a_uab_b < 0 & fa_3a_uab_c < 0) then govbonds = fa_3a_trunc;
    else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 = fa_3a_sr000001) then 
    govbonds = (govbonds + fa_3a_sr000001);
     else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 > fa_3a_sr000001) then 
     govbonds = (govbonds + (((fa_3a_sr000002 - fa_3a_sr000001)/2) + fa_3a_sr000001));
      else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 < fa_3a_sr000001) then 
      govbonds = (govbonds + (((fa_3a_sr000001 - fa_3a_sr000002)/2) + fa_3a_sr000002));
       else if (fa_3a_trunc in(-1, -2, -4) & fa_3a_uab_b = 0) then govbonds = (govbonds + quartile1);
        else if (fa_3a_trunc in(-1, -2, -4) & fa_3a_uab_b = 1) then govbonds = (govbonds + quartile2);
         else if (fa_3a_trunc in(-1, -2, -4) & fa_3a_uab_c = 0) then govbonds = (govbonds + quartile3);
          else if (fa_3a_trunc in(-1, -2, -4) & fa_3a_uab_c = 1) then govbonds = (govbonds + 60000);
           else if (fa_3a_uab_a in(-1, -2) | fa_3a_uab_b in(-1, -2) | fa_3a_uab_c in(-1, -2)) then govbonds = -3;

/************************************************/
/* STOCK Component - mutual                     */
/************************************************/

if (fa_4 = 1 & fa_4a_trunc >= 0) then mutual = (mutual + fa_4a_trunc);
 else if (fa_4 = 1 & fa_4_ref_1 = 1 & fa_4a_sr000001 < 0 & fa_4a_sr000002 < 0 
 & fa_4a_uab_a < 0 & fa_4a_uab_b < 0 & fa_4a_uab_c < 0) then mutual = -1;
  else if (fa_4 = 1 & fa_4a_trunc in(-1, -2) & fa_4a_sr000001 < 0 & fa_4a_sr000002 < 0 
  & fa_4a_uab_a < 0 & fa_4a_uab_b < 0 & fa_4a_uab_c < 0) then mutual = fa_4a_trunc;
    else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 = fa_4a_sr000001) then 
    mutual = (mutual + fa_4a_sr000001);
     else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 > fa_4a_sr000001) then 
     mutual = (mutual + (((fa_4a_sr000002 - fa_4a_sr000001)/2) + fa_4a_sr000001));
      else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 < fa_4a_sr000001) then 
      mutual = (mutual + (((fa_4a_sr000001 - fa_4a_sr000002)/2) + fa_4a_sr000002));
       else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_b = 0) then mutual = (mutual + quartile1);
        else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_b = 1) then mutual = (mutual + quartile2);
         else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_c = 0) then mutual = (mutual + quartile3);
          else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_c = 1) then mutual = (mutual + 180000);
           else if (fa_4a_uab_a in(-1, -2) | fa_4a_uab_b in(-1, -2) | fa_4a_uab_c in(-1, -2)) then mutual = -3;

/************************************************/
/* STOCK Component - lifeinsure                 */
/************************************************/

if (fa_5 = 1 & fa_5a_trunc >= 0) then lifeinsure = (lifeinsure + fa_5a_trunc);
 else if (fa_5 = 1 & fa_5_ref_1 = 1 & fa_5a_sr000001 < 0 & fa_5a_sr000002 < 0 
 & fa_5a_uab_a < 0 & fa_5a_uab_b < 0 & fa_5a_uab_c < 0) then lifeinsure = -1;
  else if (fa_5 = 1 & fa_5a_trunc in(-1, -2) & fa_5a_sr000001 < 0 & fa_5a_sr000002 < 0 
  & fa_5a_uab_a < 0 & fa_5a_uab_b < 0 & fa_5a_uab_c < 0) then lifeinsure = fa_5a_trunc;
    else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002 >= 0 & fa_5a_sr000002 = fa_5a_sr000001) then 
    lifeinsure = (lifeinsure + fa_5a_sr000001);
     else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002 >= 0 & fa_5a_sr000002 > fa_5a_sr000001) then 
     lifeinsure = (lifeinsure + (((fa_5a_sr000002 - fa_5a_sr000001)/2) + fa_5a_sr000001));
      else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002 >= 0 & fa_5a_sr000002 < fa_5a_sr000001) then 
      lifeinsure = (lifeinsure + (((fa_5a_sr000001 - fa_5a_sr000002)/2) + fa_5a_sr000002));
       else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_b = 0) then lifeinsure = (lifeinsure + quartile1);
        else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_b = 1) then lifeinsure = (lifeinsure + quartile2);
         else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_c = 0) then lifeinsure = (lifeinsure + quartile3);
          else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_c = 1) then lifeinsure = (lifeinsure + 100000);
           else if (fa_5a_uab_a in(-1, -2) | fa_5a_uab_b in(-1, -2) | fa_5a_uab_c in(-1, -2)) then lifeinsure = -3;

/************************************************/
/* STOCK Component - shares                     */
/************************************************/

if (fa_9 = 1 & fa_9a_trunc >= 0) then shares = (shares + fa_9a_trunc);
 else if (fa_9 = 1 & fa_9_ref_1 = 1 & fa_9a_sr000001_trunc < 0 & fa_9a_sr000002 < 0 
 & fa_9a_uab_a < 0 & fa_9a_uab_b < 0 & fa_9a_uab_c < 0) then shares = -1;
  else if (fa_9 = 1 & fa_9a_trunc in(-1, -2) & fa_9a_sr000001_trunc < 0 & fa_9a_sr000002 < 0 
  & fa_9a_uab_a < 0 & fa_9a_uab_b < 0 & fa_9a_uab_c < 0) then shares = fa_9a_trunc;
    else if (fa_9a_sr000001_trunc >= 0 & fa_9a_sr000002 >= 0 & fa_9a_sr000002 = fa_9a_sr000001_trunc) then 
    shares = (shares + fa_9a_sr000001_trunc);
     else if (fa_9a_sr000001_trunc >= 0 & fa_9a_sr000002 >= 0 & fa_9a_sr000002 > fa_9a_sr000001_trunc) then 
     shares = (shares + (((fa_9a_sr000002 - fa_9a_sr000001_trunc)/2) + fa_9a_sr000001_trunc));
      else if (fa_9a_sr000001_trunc >= 0 & fa_9a_sr000002 >= 0 & fa_9a_sr000002 < fa_9a_sr000001_trunc) then 
      shares = (shares + (((fa_9a_sr000001_trunc - fa_9a_sr000002)/2) + fa_9a_sr000002));
       else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_b = 0) then shares = (shares + quartile1);
        else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_b = 1) then shares = (shares + quartile2);
         else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_c = 0) then shares = (shares + quartile3);
          else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_c = 1) then shares = (shares + 150000);
           else if (fa_9a_uab_a in(-1, -2) | fa_9a_uab_b in(-1, -2) | fa_9a_uab_c in(-1, -2)) then shares = -3;

/************************************************/
/* STOCK Component - corpbond                   */
/************************************************/

if (fa_10 = 1 & fa_10a_trunc >= 0) then corpbond = (corpbond + fa_10a_trunc);
 else if (fa_10 = 1 & fa_10_ref_1 = 1 & fa_10a_sr000001 < 0 & fa_10a_sr000002 < 0 
 & fa_10a_uab_a < 0 & fa_10a_uab_b < 0 & fa_10a_uab_c < 0) then corpbond = -1;
  else if (fa_10 = 1 & fa_10a_trunc in(-1, -2) & fa_10a_sr000001 < 0 & fa_10a_sr000002 < 0 
  & fa_10a_uab_a < 0 & fa_10a_uab_b < 0 & fa_10a_uab_c < 0) then corpbond = fa_10a_trunc;
    else if (fa_10a_sr000001 >= 0 & fa_10a_sr000002 >= 0 & fa_10a_sr000002 = fa_10a_sr000001) then 
    corpbond = (corpbond + fa_10a_sr000001);
     else if (fa_10a_sr000001 >= 0 & fa_10a_sr000002 >= 0 & fa_10a_sr000002 > fa_10a_sr000001) then 
     corpbond = (corpbond + (((fa_10a_sr000002 - fa_10a_sr000001)/2) + fa_10a_sr000001));
      else if (fa_10a_sr000001 >= 0 & fa_10a_sr000002 >= 0 & fa_10a_sr000002 < fa_10a_sr000001) then 
      corpbond = (corpbond + (((fa_10a_sr000001 - fa_10a_sr000002)/2) + fa_10a_sr000002));
       else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_b = 0) then corpbond = (corpbond + quartile1);
        else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_b = 1) then corpbond = (corpbond + quartile2);
         else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_c = 0) then corpbond = (corpbond + quartile3);
          else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_c = 1) then corpbond = (corpbond + 175000);
           else if (fa_10a_uab_a in(-1, -2) | fa_10a_uab_b in(-1, -2) | fa_10a_uab_c in(-1, -2)) then corpbond = -3;

/************************************************/
/* STOCK Component - moneyowedtor               */
/************************************************/

if (fa_11 = 1 & fa_11a >= 0) then moneyowedtor = (moneyowedtor + fa_11a);
 else if (fa_11 = 1 & fa_11_ref_1 = 1 & fa_11a_sr000001 < 0 & fa_11a_sr000002 < 0 
 & fa_11a_uab_a < 0 & fa_11a_uab_b < 0 & fa_11a_uab_c < 0) then moneyowedtor = -1;
  else if (fa_11 = 1 & fa_11a in(-1, -2) & fa_11a_sr000001 < 0 & fa_11a_sr000002 < 0 
  & fa_11a_uab_a < 0 & fa_11a_uab_b < 0 & fa_11a_uab_c < 0) then moneyowedtor = fa_11a;
    else if (fa_11a_sr000001 >= 0 & fa_11a_sr000002 >= 0 & fa_11a_sr000002 = fa_11a_sr000001) then 
    moneyowedtor = (moneyowedtor + fa_11a_sr000001);
     else if (fa_11a_sr000001 >= 0 & fa_11a_sr000002 >= 0 & fa_11a_sr000002 > fa_11a_sr000001) then 
     moneyowedtor = (moneyowedtor + (((fa_11a_sr000002 - fa_11a_sr000001)/2) + fa_11a_sr000001));
      else if (fa_11a_sr000001 >= 0 & fa_11a_sr000002 >= 0 & fa_11a_sr000002 < fa_11a_sr000001) then 
      moneyowedtor = (moneyowedtor + (((fa_11a_sr000001 - fa_11a_sr000002)/2) + fa_11a_sr000002));
       else if (fa_11a in(-1, -2, -4) & fa_11a_uab_b = 0) then moneyowedtor = (moneyowedtor + quartile1);
        else if (fa_11a in(-1, -2, -4) & fa_11a_uab_b = 1) then moneyowedtor = (moneyowedtor + quartile2);
         else if (fa_11a in(-1, -2, -4) & fa_11a_uab_c = 0) then moneyowedtor = (moneyowedtor + quartile3);
          else if (fa_11a in(-1, -2, -4) & fa_11a_uab_c = 1) then moneyowedtor = (moneyowedtor + 67000);
           else if (fa_11a_uab_a in(-1, -2) | fa_11a_uab_b in(-1, -2) | fa_11a_uab_c in(-1, -2)) then moneyowedtor = -3;

/*******************************/
/* Add components STOCK        */
/*******************************/

if (govbonds >= 0) then stockc = (stockc + govbonds); 
if (mutual >= 0) then stockc = (stockc + mutual);
if (lifeinsure >= 0) then stockc = (stockc + lifeinsure);
if (shares >= 0) then stockc = (stockc + shares);
if (corpbond >= 0) then stockc = (stockc + corpbond);
if (moneyowedtor >= 0) then stockc = (stockc + moneyowedtor);
if (govbonds in(-1, -2, -3)) then stockc = -3;
else if (mutual in(-1, -2, -3)) then stockc = -3;
else if (lifeinsure in(-1, -2, -3)) then stockc = -3;
else if (shares in(-1, -2, -3)) then stockc = -3;
else if (corpbond in(-1, -2, -3)) then stockc = -3;
else if (moneyowedtor in(-1, -2, -3)) then stockc = -3;

/****************************/
/* Compute HOME             */
/****************************/

/************************************************/
/* HOME Component - home1                       */
/************************************************/

if (nfa_1 = 1 & nfa_1a_trunc >= 0) then home1 = (home1 + nfa_1a_trunc);
 else if (nfa_1 = 1 & nfa_1_ref_1 = 1 & nfa_1a_sr000001_trunc < 0 & nfa_1a_sr000002 < 0 
 & nfa_1a_uab_a < 0 & nfa_1a_uab_b < 0 & nfa_1a_uab_c < 0) then home1 = -1;
  else if (nfa_1 = 1 & nfa_1a_trunc in(-1, -2) & nfa_1a_sr000001_trunc < 0 & nfa_1a_sr000002 < 0 
  & nfa_1a_uab_a < 0 & nfa_1a_uab_b < 0 & nfa_1a_uab_c < 0) then home1 = nfa_1a_trunc;
    else if (nfa_1a_sr000001_trunc >= 0 & nfa_1a_sr000002 >= 0 & nfa_1a_sr000002 = nfa_1a_sr000001_trunc) then 
    home1 = (home1 + nfa_1a_sr000001_trunc);
     else if (nfa_1a_sr000001_trunc >= 0 & nfa_1a_sr000002 >= 0 & nfa_1a_sr000002 > nfa_1a_sr000001_trunc) then 
     home1 = (home1 + (((nfa_1a_sr000002 - nfa_1a_sr000001_trunc)/2) + nfa_1a_sr000001_trunc));
      else if (nfa_1a_sr000001_trunc >= 0 & nfa_1a_sr000002 >= 0 & nfa_1a_sr000002 < nfa_1a_sr000001_trunc) then 
      home1 = (home1 + (((nfa_1a_sr000001_trunc - nfa_1a_sr000002)/2) + nfa_1a_sr000002));
       else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_b = 0) then home1 = (home1 + quartile1);
        else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_b = 1) then home1 = (home1 + quartile2);
         else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_c = 0) then home1 = (home1 + quartile3);
          else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_c = 1) then home1 = (home1 + 200000);
           else if (nfa_1a_uab_a in(-1, -2) | nfa_1a_uab_b in(-1, -2) | nfa_1a_uab_c in(-1, -2)) then home1 = -3;

/************************************************/
/* HOME Component - secondhome                  */
/************************************************/

if (nfa_2 = 1 & nfa_2a_trunc >= 0) then secondhome = (secondhome + nfa_2a_trunc);
 else if (nfa_2 = 1 & nfa_2_ref_1 = 1 & nfa_2a_sr000001 < 0 & nfa_2a_sr000002 < 0 
 & nfa_2a_uab_a < 0 & nfa_2a_uab_b < 0 & nfa_2a_uab_c < 0) then secondhome = -1;
  else if (nfa_2 = 1 & nfa_2a_trunc in(-1, -2) & nfa_2a_sr000001 < 0 & nfa_2a_sr000002 < 0 
  & nfa_2a_uab_a < 0 & nfa_2a_uab_b < 0 & nfa_2a_uab_c < 0) then secondhome = nfa_2a_trunc;
    else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 = nfa_2a_sr000001) then 
    secondhome = (secondhome + nfa_2a_sr000001);
     else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 > nfa_2a_sr000001) then 
     secondhome = (secondhome + (((nfa_2a_sr000002 - nfa_2a_sr000001)/2) + nfa_2a_sr000001));
      else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 < nfa_2a_sr000001) then 
      secondhome = (secondhome + (((nfa_2a_sr000001 - nfa_2a_sr000002)/2) + nfa_2a_sr000002));
       else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_b = 0) then secondhome = (secondhome + quartile1);
        else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_b = 1) then secondhome = (secondhome + quartile2);
         else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_c = 0) then secondhome = (secondhome + quartile3);
          else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_c = 1) then secondhome = (secondhome + 175000);
           else if (nfa_2a_uab_a in(-1, -2) | nfa_2a_uab_b in(-1, -2) | nfa_2a_uab_c in(-1, -2)) then secondhome = -3;
 
/*******************************/
/* Add components HOME         */
/*******************************/

if (home1 >= 0) then homec = (homec + home1); 
if (secondhome >= 0) then homec = (homec + secondhome);
if (home1 in(-1, -2, -3)) then homec = -3;
else if (secondhome in(-1, -2, -3)) then homec = -3;

/****************************/
/* Compute MORT             */
/****************************/

/************************************************/
/* MORT Component - mort1                       */
/************************************************/

if (nfa_1b_trunc >= 0) then mort1 = (mort1 + nfa_1b_trunc);
 else if (nfa_1b_ref_1 = 1 & nfa_1b_sr000001 < 0 & nfa_1b_sr000002 < 0 
 & nfa_1b_uab_a < 0 & nfa_1b_uab_b < 0 & nfa_1b_uab_c < 0) then mort1 = -1;
  else if (nfa_1b_trunc in(-1, -2) & nfa_1b_sr000001 < 0 & nfa_1b_sr000002 < 0 
  & nfa_1b_uab_a < 0 & nfa_1b_uab_b < 0 & nfa_1b_uab_c < 0) then mort1 = nfa_1b_trunc;
    else if (nfa_1b_sr000001 >= 0 & nfa_1b_sr000002 >= 0 & nfa_1b_sr000002 = nfa_1b_sr000001) then 
    mort1 = (mort1 + nfa_1b_sr000001);
     else if (nfa_1b_sr000001 >= 0 & nfa_1b_sr000002 >= 0 & nfa_1b_sr000002 > nfa_1b_sr000001) then 
     mort1 = (mort1 + (((nfa_1b_sr000002 - nfa_1b_sr000001)/2) + nfa_1b_sr000001));
      else if (nfa_1b_sr000001 >= 0 & nfa_1b_sr000002 >= 0 & nfa_1b_sr000002 < nfa_1b_sr000001) then 
      mort1 = (mort1 + (((nfa_1b_sr000001 - nfa_1b_sr000002)/2) + nfa_1b_sr000002));
       else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_b = 0) then mort1 = (mort1 + quartile1);
        else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_b = 1) then mort1 = (mort1 + quartile2);
         else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_c = 0) then mort1 = (mort1 + quartile3);
          else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_c = 1) then mort1 = (mort1 + 115000);
           else if (nfa_1b_uab_a in(-1, -2) | nfa_1b_uab_b in(-1, -2) | nfa_1b_uab_c in(-1, -2)) then mort1 = -3;

/************************************************/
/* MORT Component - secondmort                  */
/************************************************/

if (nfa_2b_trunc >= 0) then secondmort = (secondmort + nfa_2b_trunc);
 else if (nfa_2b_ref_1 = 1 & nfa_2b_sr000001 < 0 & nfa_2b_sr000002 < 0 
 & nfa_2b_uab_a < 0 & nfa_2b_uab_b < 0 & nfa_2b_uab_c < 0) then secondmort = -1;
  else if (nfa_2b_trunc in(-1, -2) & nfa_2b_sr000001 < 0 & nfa_2b_sr000002 < 0 
  & nfa_2b_uab_a < 0 & nfa_2b_uab_b < 0 & nfa_2b_uab_c < 0) then secondmort = nfa_2b_trunc;
    else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 = nfa_2b_sr000001) then 
    secondmort = (secondmort + nfa_2b_sr000001);
     else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 > nfa_2b_sr000001) then 
     secondmort = (secondmort + (((nfa_2b_sr000002 - nfa_2b_sr000001)/2) + nfa_2b_sr000001));
      else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 < nfa_2b_sr000001) then 
      secondmort = (secondmort + (((nfa_2b_sr000001 - nfa_2b_sr000002)/2) + nfa_2b_sr000002));
       else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_b = 0) then secondmort = (secondmort + quartile1);
        else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_b = 1) then secondmort = (secondmort + quartile2);
         else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_c = 0) then secondmort = (secondmort + quartile3);
          else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_c = 1) then secondmort = (secondmort + 130000);
           else if (nfa_2b_uab_a in(-1, -2) | nfa_2b_uab_b in(-1, -2) | nfa_2b_uab_c in(-1, -2)) then secondmort = -3;

/*******************************/
/* Add components MORT         */
/*******************************/

if (mort1 >= 0) then mortc = (mortc + mort1); 
if (secondmort >= 0) then mortc = (mortc + secondmort);
if (mort1 in(-1, -2, -3)) then mortc = -3;
else if (secondmort in(-1, -2, -3)) then mortc = -3;

/****************************/
/* Compute PDEBT            */
/****************************/

/************************************************/
/* PDEBT Component - pdebt1                     */
/************************************************/

if (nfa_1c >= 0) then pdebt1 = (pdebt1 + nfa_1c);
 else if (nfa_1c_ref_1 = 1 & nfa_1c_sr000001 < 0 & nfa_1c_sr000002 < 0 
 & nfa_1c_uab_a < 0 & nfa_1c_uab_b < 0 & nfa_1c_uab_c < 0) then pdebt1 = -1;
  else if (nfa_1c in(-1, -2) & nfa_1c_sr000001 < 0 & nfa_1c_sr000002 < 0 
  & nfa_1c_uab_a < 0 & nfa_1c_uab_b < 0 & nfa_1c_uab_c < 0) then pdebt1 = nfa_1c;
    else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 = nfa_1c_sr000001) then 
    pdebt1 = (pdebt1 + nfa_1c_sr000001);
     else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 > nfa_1c_sr000001) then 
     pdebt1 = (pdebt1 + (((nfa_1c_sr000002 - nfa_1c_sr000001)/2) + nfa_1c_sr000001));
      else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 < nfa_1c_sr000001) then 
      pdebt1 = (pdebt1 + (((nfa_1c_sr000001 - nfa_1c_sr000002)/2) + nfa_1c_sr000002));
       else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_b = 0) then pdebt1 = (pdebt1 + quartile1);
        else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_b = 1) then pdebt1 = (pdebt1 + quartile2);
         else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_c = 0) then pdebt1 = (pdebt1 + quartile3);
          else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_c = 1) then pdebt1 = (pdebt1 + 51000);
           else if (nfa_1c_uab_a in(-1, -2) | nfa_1c_uab_b in(-1, -2) | nfa_1c_uab_c in(-1, -2)) then pdebt1 = -3;

/************************************************/
/* PDEBT Component - secondpdebt                */
/************************************************/

if (nfa_2c >= 0) then secondpdebt = (secondpdebt + nfa_2c);
 else if (nfa_2c_ref_1 = 1 & nfa_2c_sr000001 < 0 & nfa_2c_sr000002 < 0 & nfa_2c_uab_a < 0) then secondpdebt = -1;
  else if (nfa_2c in(-1, -2) & nfa_2c_sr000001 < 0 & nfa_2c_sr000002 < 0 & nfa_2c_uab_a < 0) then secondpdebt = nfa_2c;
    else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 = nfa_2c_sr000001) then 
    secondpdebt = (secondpdebt + nfa_2c_sr000001);
     else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 > nfa_2c_sr000001) then 
     secondpdebt = (secondpdebt + (((nfa_2c_sr000002 - nfa_2c_sr000001)/2) + nfa_2c_sr000001));
      else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 < nfa_2c_sr000001) then 
      secondpdebt = (secondpdebt + (((nfa_2c_sr000001 - nfa_2c_sr000002)/2) + nfa_2c_sr000002));
       else if (nfa_2c_uab_a in(-1, -2)) then secondpdebt = -3;

/*******************************/
/* Add components PDEBT        */
/*******************************/

if (pdebt1 >= 0) then pdebtc = (pdebtc + pdebt1); 
if (secondpdebt >= 0) then pdebtc = (pdebtc + secondpdebt);
if (pdebt1 in(-1, -2, -3)) then pdebtc = -3;
else if (secondpdebt in(-1, -2, -3)) then pdebtc = -3;

/****************************/
/* Compute IRA              */
/****************************/

/************************************************/
/* IRA Component - ira1                         */
/************************************************/

if (fa_8 = 1 & fa_8d_trunc_01 >= 0) then ira1 = (ira1 + fa_8d_trunc_01);
  else if (fa_8 = 1 & fa_8d_trunc_01 in(-1, -2) & fa_8d_sr000001_01 < 0 & fa_8d_sr000002_trunc_01 < 0 
  & fa_8d_uab_a_01 < 0 & fa_8d_uab_b_01 < 0 & fa_8d_uab_c_01 < 0) then ira1 = fa_8d_trunc_01;
    else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_trunc_01 >= 0 & fa_8d_sr000002_trunc_01 = fa_8d_sr000001_01) then 
    ira1 = (ira1 + fa_8d_sr000001_01);
     else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_trunc_01 >= 0 & fa_8d_sr000002_trunc_01 > fa_8d_sr000001_01) then 
     ira1 = (ira1 + (((fa_8d_sr000002_trunc_01 - fa_8d_sr000001_01)/2) + fa_8d_sr000001_01));
      else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_trunc_01 >= 0 & fa_8d_sr000002_trunc_01 < fa_8d_sr000001_01) then 
      ira1 = (ira1 + (((fa_8d_sr000001_01 - fa_8d_sr000002_trunc_01)/2) + fa_8d_sr000002_trunc_01));
       else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_b_01 = 0) then ira1 = (ira1 + quartile1);
        else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_b_01 = 1) then ira1 = (ira1 + quartile2);
         else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_c_01 = 0) then ira1 = (ira1 + quartile3);
          else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_c_01 = 1) then ira1 = (ira1 + 120000);
           else if (fa_8d_uab_a_01 in(-1, -2) | fa_8d_uab_b_01 in(-1, -2) | fa_8d_uab_c_01 in(-1, -2)) then ira1 = -3;


/************************************************/
/* IRA Component - ira2                         */
/************************************************/

if (fa_8 = 1 & fa_8d_trunc_02 >= 0) then ira2 = (ira2 + fa_8d_trunc_02);
  else if (fa_8 = 1 & fa_8d_trunc_02 in(-1, -2) & fa_8d_sr000001_02 < 0 & fa_8d_sr000002_trunc_02 < 0 
  & fa_8d_uab_a_02 < 0 & fa_8d_uab_c_02 < 0) then ira2 = fa_8d_trunc_02;
    else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_trunc_02 >= 0 & fa_8d_sr000002_trunc_02 = fa_8d_sr000001_02) then 
    ira2 = (ira2 + fa_8d_sr000001_02);
     else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_trunc_02 >= 0 & fa_8d_sr000002_trunc_02 > fa_8d_sr000001_02) then 
     ira2 = (ira2 + (((fa_8d_sr000002_trunc_02 - fa_8d_sr000001_02)/2) + fa_8d_sr000001_02));
      else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_trunc_02 >= 0 & fa_8d_sr000002_trunc_02 < fa_8d_sr000001_02) then 
      ira2 = (ira2 + (((fa_8d_sr000001_02 - fa_8d_sr000002_trunc_02)/2) + fa_8d_sr000002_trunc_02));
       else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_c_02 = 0) then ira2 = (ira2 + quartile3);
        else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_c_02 = 1) then ira2 = (ira2 + 96000);
         else if (fa_8d_uab_a_02 in(-1, -2) | fa_8d_uab_c_02 in(-1, -2)) then ira2 = -3;

/************************************************/
/* IRA Component - ira3                         */
/************************************************/

if (fa_8 = 1 & fa_8d_trunc_03 >= 0) then ira3 = (ira3 + fa_8d_trunc_03);
  else if (fa_8 = 1 & fa_8d_trunc_03 in(-1, -2) & fa_8d_sr000001_03 < 0 & fa_8d_sr000002_trunc_03 < 0 
  & fa_8d_uab_a_03 < 0 & fa_8d_uab_c_03 < 0) then ira3 = fa_8d_trunc_03;
    else if (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_trunc_03 >= 0 & fa_8d_sr000002_trunc_03 = fa_8d_sr000001_03) then 
    ira3 = (ira3 + fa_8d_sr000001_03);
     else if (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_trunc_03 >= 0 & fa_8d_sr000002_trunc_03 > fa_8d_sr000001_03) then 
     ira3 = (ira3 + (((fa_8d_sr000002_trunc_03 - fa_8d_sr000001_03)/2) + fa_8d_sr000001_03));
      else if (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_trunc_03 >= 0 & fa_8d_sr000002_trunc_03 < fa_8d_sr000001_03) then 
      ira3 = (ira3 + (((fa_8d_sr000001_03 - fa_8d_sr000002_trunc_03)/2) + fa_8d_sr000002_trunc_03));
       else if (fa_8d_trunc_03 in(-1, -2, -4) & fa_8d_uab_c_03 = 0) then ira3 = (ira3 + quartile3);
        else if (fa_8d_trunc_03 in(-1, -2, -4) & fa_8d_uab_c_03 = 1) then ira3 = (ira3 + 100000);
         else if (fa_8d_uab_a_03 in(-1, -2) | fa_8d_uab_c_03 in(-1, -2)) then ira3 = -3;

/************************************************/
/* IRA Component - ira4                         */
/************************************************/

if (fa_8 = 1 & fa_8d_trunc_04 >= 0) then ira4 = (ira4 + fa_8d_trunc_04);
  else if (fa_8 = 1 & fa_8d_trunc_04 in(-1, -2) & fa_8d_sr000001_04 < 0 & fa_8d_sr000002_trunc_04 < 0 
  & fa_8d_uab_a_04 < 0 & fa_8d_uab_c_04 < 0) then ira4 = fa_8d_trunc_04;
    else if (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_trunc_04 >= 0 & fa_8d_sr000002_trunc_04 = fa_8d_sr000001_04) then 
    ira4 = (ira4 + fa_8d_sr000001_04);
     else if (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_trunc_04 >= 0 & fa_8d_sr000002_trunc_04 > fa_8d_sr000001_04) then 
     ira4 = (ira4 + (((fa_8d_sr000002_trunc_04 - fa_8d_sr000001_04)/2) + fa_8d_sr000001_04));
      else if (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_trunc_04 >= 0 & fa_8d_sr000002_trunc_04 < fa_8d_sr000001_04) then 
      ira4 = (ira4 + (((fa_8d_sr000001_04 - fa_8d_sr000002_trunc_04)/2) + fa_8d_sr000002_trunc_04));
       else if (fa_8d_trunc_04 in(-1, -2, -4) & fa_8d_uab_c_04 = 0) then ira4 = (ira4 + quartile3);
        else if (fa_8d_trunc_04 in(-1, -2, -4) & fa_8d_uab_c_04 = 1) then ira4 = (ira4 + 100000);
         else if (fa_8d_uab_a_04 in(-1, -2) | fa_8d_uab_c_04 in(-1, -2)) then ira4 = -3;

/************************************************/
/* IRA Component - ira5                         */
/************************************************/

if (fa_8 = 1 & fa_8d_trunc_05 >= 0) then ira5 = (ira5 + fa_8d_trunc_05);
  else if (fa_8 = 1 & fa_8d_trunc_05 in(-1, -2) & fa_8d_sr000001_05 < 0 & fa_8d_sr000002_trunc_05 < 0 
  & fa_8d_uab_a_05 < 0 & fa_8d_uab_b_05 < 0 & fa_8d_uab_c_05 < 0) then ira5 = fa_8d_trunc_05;
    else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_trunc_05 >= 0 & fa_8d_sr000002_trunc_05 = fa_8d_sr000001_05) then 
    ira5 = (ira5 + fa_8d_sr000001_05);
     else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_trunc_05 >= 0 & fa_8d_sr000002_trunc_05 > fa_8d_sr000001_05) then 
     ira5 = (ira5 + (((fa_8d_sr000002_trunc_05 - fa_8d_sr000001_05)/2) + fa_8d_sr000001_05));
      else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_trunc_05 >= 0 & fa_8d_sr000002_trunc_05 < fa_8d_sr000001_05) then 
      ira5 = (ira5 + (((fa_8d_sr000001_05 - fa_8d_sr000002_trunc_05)/2) + fa_8d_sr000002_trunc_05));
       else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_b_05 = 0) then ira5 = (ira5 + quartile1);
        else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_b_05 = 1) then ira5 = (ira5 + quartile2);
         else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_c_05 = 0) then ira5 = (ira5 + quartile3);
          else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_c_05 = 1) then ira5 = (ira5 + 100000);
           else if (fa_8d_uab_a_05 in(-1, -2) | fa_8d_uab_b_05 in(-1, -2) | fa_8d_uab_c_05 in(-1, -2)) then ira5 = -3;

/************************************************/
/* IRA Component - ira6                         */
/************************************************/

if (fa_8 = 1 & fa_8d_trunc_06 >= 0) then ira6 = (ira6 + fa_8d_trunc_06);
  else if (fa_8 = 1 & fa_8d_trunc_06 in(-1, -2) & fa_8d_sr000001_06 < 0 & fa_8d_sr000002_trunc_06 < 0 
  & fa_8d_uab_a_06 < 0 & fa_8d_uab_c_06 < 0) then ira6 = fa_8d_trunc_06;
    else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_trunc_06 >= 0 & fa_8d_sr000002_trunc_06 = fa_8d_sr000001_06) then 
    ira6 = (ira6 + fa_8d_sr000001_06);
     else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_trunc_06 >= 0 & fa_8d_sr000002_trunc_06 > fa_8d_sr000001_06) then 
     ira6 = (ira6 + (((fa_8d_sr000002_trunc_06 - fa_8d_sr000001_06)/2) + fa_8d_sr000001_06));
      else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_trunc_06 >= 0 & fa_8d_sr000002_trunc_06 < fa_8d_sr000001_06) then 
      ira6 = (ira6 + (((fa_8d_sr000001_06 - fa_8d_sr000002_trunc_06)/2) + fa_8d_sr000002_trunc_06));
       else if (fa_8d_trunc_06 in(-1, -2, -4) & fa_8d_uab_c_06 = 0) then ira6 = (ira6 + quartile3);
        else if (fa_8d_trunc_06 in(-1, -2, -4) & fa_8d_uab_c_06 = 1) then ira6 = (ira6 + 100000);
         else if (fa_8d_uab_a_06 in(-1, -2) | fa_8d_uab_c_06 in(-1, -2)) then ira6 = -3;

/************************************************/
/* IRA Component - ira7                         */
/************************************************/

if (fa_8 = 1 & fa_8d_trunc_07 >= 0) then ira7 = (ira7 + fa_8d_trunc_07);
  else if (fa_8 = 1 & fa_8d_trunc_07 in(-1, -2) & fa_8d_sr000001_07 < 0 & fa_8d_sr000002_trunc_07 < 0 
  & fa_8d_uab_a_07 < 0 & fa_8d_uab_c_07 < 0) then ira7 = fa_8d_trunc_07;
    else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_trunc_07 >= 0 & fa_8d_sr000002_trunc_07 = fa_8d_sr000001_07) then 
    ira7 = (ira7 + fa_8d_sr000001_07);
     else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_trunc_07 >= 0 & fa_8d_sr000002_trunc_07 > fa_8d_sr000001_07) then 
     ira7 = (ira7 + (((fa_8d_sr000002_trunc_07 - fa_8d_sr000001_07)/2) + fa_8d_sr000001_07));
      else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_trunc_07 >= 0 & fa_8d_sr000002_trunc_07 < fa_8d_sr000001_07) then 
      ira7 = (ira7 + (((fa_8d_sr000001_07 - fa_8d_sr000002_trunc_07)/2) + fa_8d_sr000002_trunc_07));
       else if (fa_8d_trunc_07 in(-1, -2, -4) & fa_8d_uab_c_07 = 0) then ira7 = (ira7 + quartile3);
        else if (fa_8d_trunc_07 in(-1, -2, -4) & fa_8d_uab_c_07 = 1) then ira7 = (ira7 + 121000);
         else if (fa_8d_uab_a_07 in(-1, -2) | fa_8d_uab_c_07 in(-1, -2)) then ira7 = -3;

/*******************************/
/* Add components IRA          */
/*******************************/

if (ira1 >= 0) then irac = (irac + ira1); 
if (ira2 >= 0) then irac = (irac + ira2); 
if (ira3 >= 0) then irac = (irac + ira3); 
if (ira4 >= 0) then irac = (irac + ira4); 
if (ira5 >= 0) then irac = (irac + ira5); 
if (ira6 >= 0) then irac = (irac + ira6); 
if (ira7 >= 0) then irac = (irac + ira7); 
if (ira1 in(-1, -2, -3)) then irac = -3;
else if (ira2 in(-1, -2, -3)) then irac = -3;
else if (ira3 in(-1, -2, -3)) then irac = -3;
else if (ira4 in(-1, -2, -3)) then irac = -3;
else if (ira5 in(-1, -2, -3)) then irac = -3;
else if (ira6 in(-1, -2, -3)) then irac = -3;
else if (ira7 in(-1, -2, -3)) then irac = -3;

/****************************/
/* Compute A401K            */
/****************************/

/************************************************/
/* A401K component - r_401k                     */
/************************************************/

if (fa_6b = 1 & fa_6e_trunc >= 0) then r_401k = (r_401k + fa_6e_trunc);
 else if (fa_6b = 1 & fa_6e_ref_1 = 1 & fa_6e_sr000001 < 0 & fa_6e_sr000002 < 0 
 & fa_6e_uab_a < 0 & fa_6e_uab_b < 0 & fa_6e_uab_c < 0) then r_401k = -1;
  else if (fa_6e_trunc in(-1, -2) & fa_6e_sr000001 < 0 & fa_6e_sr000002 < 0 
  & fa_6e_uab_a < 0 & fa_6e_uab_b < 0 & fa_6e_uab_c < 0) then r_401k = fa_6e_trunc;
   else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 = fa_6e_sr000001) then 
    r_401k = (r_401k + fa_6e_sr000001);
     else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 > fa_6e_sr000001) then 
     r_401k = (r_401k + (((fa_6e_sr000002 - fa_6e_sr000001)/2) + fa_6e_sr000001));
      else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 < fa_6e_sr000001) then 
      r_401k = (r_401k + (((fa_6e_sr000001 - fa_6e_sr000002)/2) + fa_6e_sr000002));
       else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_b = 0) then r_401k = (r_401k + quartile1);
        else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_b = 1) then r_401k = (r_401k + quartile2);
         else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_c = 0) then r_401k = (r_401k + quartile3);
          else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_c = 1) then r_401k = (r_401k + 120000);
           else if (fa_6e_uab_a in(-1, -2) | fa_6e_uab_b in(-1, -2) | fa_6e_uab_c in(-1, -2)) then r_401k = -3;

/************************************************/
/* A401K component - sp_401k                    */
/************************************************/

if (fa_7 = 1 & fa_7c_trunc >= 0) then sp_401k = (sp_401k + fa_7c_trunc);
 else if (fa_7 = 1 & fa_7c_ref_1 = 1 & fa_7c_sr000001 < 0 & fa_7c_sr000002 < 0 
 & fa_7c_uab_a < 0 & fa_7c_uab_b < 0 & fa_7c_uab_c < 0) then sp_401k = -1;
  else if (fa_7c_trunc in(-1, -2) & fa_7c_sr000001 < 0 & fa_7c_sr000002 < 0 
  & fa_7c_uab_a < 0 & fa_7c_uab_b < 0 & fa_7c_uab_c < 0) then sp_401k = fa_7c_trunc;
    else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002 >= 0 & fa_7c_sr000002 = fa_7c_sr000001) then 
    sp_401k = (sp_401k + fa_7c_sr000001);
     else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002 >= 0 & fa_7c_sr000002 > fa_7c_sr000001) then 
     sp_401k = (sp_401k + (((fa_7c_sr000002 - fa_7c_sr000001)/2) + fa_7c_sr000001));
      else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002 >= 0 & fa_7c_sr000002 < fa_7c_sr000001) then 
      sp_401k = (sp_401k + (((fa_7c_sr000001 - fa_7c_sr000002)/2) + fa_7c_sr000002));
       else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_b = 0) then sp_401k = (sp_401k + quartile1);
        else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_b = 1) then sp_401k = (sp_401k + quartile2);
         else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_c = 0) then sp_401k = (sp_401k + quartile3);
          else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_c = 1) then sp_401k = (sp_401k + 150000);
           else if (fa_7c_uab_a in(-1, -2) | fa_7c_uab_b in(-1, -2) | fa_7c_uab_c in(-1, -2)) then sp_401k = -3;

/*******************************/
/* Add components A401K        */
/*******************************/

if (r_401k >= 0) then a401kc = (a401kc + r_401k); 
if (sp_401k >= 0) then a401kc = (a401kc + sp_401k); 
if (r_401k in(-1, -2, -3)) then a401kc = -3;
else if (sp_401k in(-1, -2, -3)) then a401kc = -3;

/****************************/
/* Compute CDEBT            */
/****************************/
/************************************************/
/* CDEBT Component - amtowe_assetpoorcars1      */
/************************************************/

if (sc_12b_01 >= 0) then amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + sc_12b_01);
  else if (sc_12b_01 in(-1, -2) & sc_12b_sr000001_01 < 0 & sc_12b_sr000002_01 < 0 
  & sc_12b_uab_a_01 < 0) then amtowe_assetpoorcars1 = sc_12b_01;
    else if (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 >= 0 & sc_12b_sr000002_01 = sc_12b_sr000001_01) then 
    amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + sc_12b_sr000001_01);
     else if (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 >= 0 & sc_12b_sr000002_01 > sc_12b_sr000001_01) then 
     amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + (((sc_12b_sr000002_01 - sc_12b_sr000001_01)/2) + sc_12b_sr000001_01));
      else if (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 >= 0 & sc_12b_sr000002_01 < sc_12b_sr000001_01) then 
      amtowe_assetpoorcars1 = (amtowe_assetpoorcars1 + (((sc_12b_sr000001_01 - sc_12b_sr000002_01)/2) + sc_12b_sr000002_01));
       else if (sc_12b_uab_a_01 in(-1, -2)) then amtowe_assetpoorcars1 = -3;

/************************************************/
/* CDEBT Component - amtowe_assetpoorcars2      */
/************************************************/

if (sc_12b_02 >= 0) then amtowe_assetpoorcars2 = (amtowe_assetpoorcars2 + sc_12b_02);
  else if (sc_12b_02 in(-1, -2) & sc_12b_sr000001_02 < 0 & sc_12b_sr000002_02 < 0) then amtowe_assetpoorcars2 = sc_12b_02;
   else if (sc_12b_sr000001_02 >= 0 & sc_12b_sr000002_02 >= 0 & sc_12b_sr000002_02 = sc_12b_sr000001_02) then 
   amtowe_assetpoorcars2 = (amtowe_assetpoorcars2 + sc_12b_sr000001_02);
    else if (sc_12b_sr000001_02 >= 0 & sc_12b_sr000002_02 >= 0 & sc_12b_sr000002_02 > sc_12b_sr000001_02) then 
    amtowe_assetpoorcars2 = (amtowe_assetpoorcars2 + (((sc_12b_sr000002_02 - sc_12b_sr000001_02)/2) + sc_12b_sr000001_02));
     else if (sc_12b_sr000001_02 >= 0 & sc_12b_sr000002_02 >= 0 & sc_12b_sr000002_02 < sc_12b_sr000001_02) then 
     amtowe_assetpoorcars2 = (amtowe_assetpoorcars2 + (((sc_12b_sr000001_02 - sc_12b_sr000002_02)/2) + sc_12b_sr000002_02));

/************************************************/
/* CDEBT Component - amountowe_vehicles1        */
/************************************************/

if (nfa_4f_trunc_01 >= 0) then amountowe_vehicles1 = (amountowe_vehicles1 + nfa_4f_trunc_01);
 else if (nfa_4f_trunc_01 in(-1, -2) & nfa_4f_sr000001_01 < 0 & nfa_4f_sr000002_trunc_01 < 0 
 & nfa_4f_uab_a_01 < 0 & nfa_4f_uab_b_01 < 0 & nfa_4f_uab_c_01 < 0) then amountowe_vehicles1 = nfa_4f_trunc_01;
   else if (nfa_4f_sr000001_01 >= 0 & nfa_4f_sr000002_trunc_01 >= 0 & nfa_4f_sr000002_trunc_01 = nfa_4f_sr000001_01) then 
   amountowe_vehicles1 = (amountowe_vehicles1 + nfa_4f_sr000001_01);
    else if (nfa_4f_sr000001_01 >= 0 & nfa_4f_sr000002_trunc_01 >= 0 & nfa_4f_sr000002_trunc_01 > nfa_4f_sr000001_01) then 
    amountowe_vehicles1 = (amountowe_vehicles1 + (((nfa_4f_sr000002_trunc_01 - nfa_4f_sr000001_01)/2) + nfa_4f_sr000001_01));
     else if (nfa_4f_sr000001_01 >= 0 & nfa_4f_sr000002_trunc_01 >= 0 & nfa_4f_sr000002_trunc_01 < nfa_4f_sr000001_01) then 
     amountowe_vehicles1 = (amountowe_vehicles1 + (((nfa_4f_sr000001_01 - nfa_4f_sr000002_trunc_01)/2) + nfa_4f_sr000002_trunc_01));
      else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_b_01 = 0) then amountowe_vehicles1 = (amountowe_vehicles1 + quartile1);
       else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_b_01 = 1) then amountowe_vehicles1 = (amountowe_vehicles1 + quartile2);
        else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_c_01 = 0) then amountowe_vehicles1 = (amountowe_vehicles1 + quartile3);
         else if (nfa_4f_trunc_01 in(-1, -2, -4) & nfa_4f_uab_c_01 = 1) then amountowe_vehicles1 = (amountowe_vehicles1 + 38000);
          else if (nfa_4f_uab_a_01 in(-1, -2) | nfa_4f_uab_b_01 in(-1, -2) | nfa_4f_uab_c_01 in(-1, -2)) then amtowe_vehicles1 = -3;

/************************************************/
/* CDEBT Component - amountowe_vehicles2        */
/************************************************/

if (nfa_4f_trunc_02 >= 0) then amountowe_vehicles2 = (amountowe_vehicles2 + nfa_4f_trunc_02);
 else if (nfa_4f_trunc_02 in(-1, -2) & nfa_4f_sr000001_02 < 0 & nfa_4f_sr000002_trunc_02 < 0 
 & nfa_4f_uab_a_02 < 0 & nfa_4f_uab_b_02 < 0 & nfa_4f_uab_c_02 < 0) then amountowe_vehicles2 = nfa_4f_trunc_02;
   else if (nfa_4f_sr000001_02 >= 0 & nfa_4f_sr000002_trunc_02 >= 0 & nfa_4f_sr000002_trunc_02 = nfa_4f_sr000001_02) then 
   amountowe_vehicles2 = (amountowe_vehicles2 + nfa_4f_sr000001_02);
    else if (nfa_4f_sr000001_02 >= 0 & nfa_4f_sr000002_trunc_02 >= 0 & nfa_4f_sr000002_trunc_02 > nfa_4f_sr000001_02) then 
    amountowe_vehicles2 = (amountowe_vehicles2 + (((nfa_4f_sr000002_trunc_02 - nfa_4f_sr000001_02)/2) + nfa_4f_sr000001_02));
     else if (nfa_4f_sr000001_02 >= 0 & nfa_4f_sr000002_trunc_02 >= 0 & nfa_4f_sr000002_trunc_02 < nfa_4f_sr000001_02) then 
     amountowe_vehicles2 = (amountowe_vehicles2 + (((nfa_4f_sr000001_02 - nfa_4f_sr000002_trunc_02)/2) + nfa_4f_sr000002_trunc_02));
      else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_b_02 = 0) then amountowe_vehicles2 = (amountowe_vehicles2 + quartile1);
       else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_b_02 = 1) then amountowe_vehicles2 = (amountowe_vehicles2 + quartile2);
        else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_c_02 = 0) then amountowe_vehicles2 = (amountowe_vehicles2 + quartile3);
         else if (nfa_4f_trunc_02 in(-1, -2, -4) & nfa_4f_uab_c_02 = 1) then amountowe_vehicles2 = (amountowe_vehicles2 + 40000);
          else if (nfa_4f_uab_a_02 in(-1, -2) | nfa_4f_uab_b_02 in(-1, -2) | nfa_4f_uab_c_02 in(-1, -2)) then amtowe_vehicles2 = -3;

/************************************************/
/* CDEBT Component - amountowe_vehicles3        */
/************************************************/

if (nfa_4f_trunc_03 >= 0) then amountowe_vehicles3 = (amountowe_vehicles3 + nfa_4f_trunc_03);
 else if (nfa_4f_trunc_03 in(-1, -2) & nfa_4f_sr000001_03 < 0 & nfa_4f_sr000002_trunc_03 < 0 
 & nfa_4f_uab_a_03 < 0 & nfa_4f_uab_c_03 < 0) then amountowe_vehicles3 = nfa_4f_trunc_03;
   else if (nfa_4f_sr000001_03 >= 0 & nfa_4f_sr000002_trunc_03 >= 0 & nfa_4f_sr000002_trunc_03 = nfa_4f_sr000001_03) then 
   amountowe_vehicles3 = (amountowe_vehicles3 + nfa_4f_sr000001_03);
    else if (nfa_4f_sr000001_03 >= 0 & nfa_4f_sr000002_trunc_03 >= 0 & nfa_4f_sr000002_trunc_03 > nfa_4f_sr000001_03) then 
    amountowe_vehicles3 = (amountowe_vehicles3 + (((nfa_4f_sr000002_trunc_03 - nfa_4f_sr000001_03)/2) + nfa_4f_sr000001_03));
     else if (nfa_4f_sr000001_03 >= 0 & nfa_4f_sr000002_trunc_03 >= 0 & nfa_4f_sr000002_trunc_03 < nfa_4f_sr000001_03) then 
     amountowe_vehicles3 = (amountowe_vehicles3 + (((nfa_4f_sr000001_03 - nfa_4f_sr000002_trunc_03)/2) + nfa_4f_sr000002_trunc_03));
      else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_c_03 = 0) then amountowe_vehicles3 = (amountowe_vehicles3 + quartile3);
       else if (nfa_4f_trunc_03 in(-1, -2, -4) & nfa_4f_uab_c_03 = 1) then amountowe_vehicles3 = (amountowe_vehicles3 + 35000);
        else if (nfa_4f_uab_a_03 in(-1, -2) | nfa_4f_uab_c_03 in(-1, -2)) then amtowe_vehicles3 = -3;

/************************************************/
/* CDEBT Component - amountowe_vehicles4        */
/************************************************/

if (nfa_4f_trunc_04 >= 0) then amountowe_vehicles4 = (amountowe_vehicles4 + nfa_4f_trunc_04);
 else if (nfa_4f_trunc_04 in(-1, -2) & nfa_4f_sr000001_04 < 0 & nfa_4f_sr000002_trunc_04 < 0 
 & nfa_4f_uab_a_04 < 0 & nfa_4f_uab_c_04 < 0) then amountowe_vehicles4 = nfa_4f_trunc_04;
   else if (nfa_4f_sr000001_04 >= 0 & nfa_4f_sr000002_trunc_04 >= 0 & nfa_4f_sr000002_trunc_04 = nfa_4f_sr000001_04) then 
   amountowe_vehicles4 = (amountowe_vehicles4 + nfa_4f_sr000001_04);
    else if (nfa_4f_sr000001_04 >= 0 & nfa_4f_sr000002_trunc_04 >= 0 & nfa_4f_sr000002_trunc_04 > nfa_4f_sr000001_04) then 
    amountowe_vehicles4 = (amountowe_vehicles4 + (((nfa_4f_sr000002_trunc_04 - nfa_4f_sr000001_04)/2) + nfa_4f_sr000001_04));
     else if (nfa_4f_sr000001_04 >= 0 & nfa_4f_sr000002_trunc_04 >= 0 & nfa_4f_sr000002_trunc_04 < nfa_4f_sr000001_04) then 
     amountowe_vehicles4 = (amountowe_vehicles4 + (((nfa_4f_sr000001_04 - nfa_4f_sr000002_trunc_04)/2) + nfa_4f_sr000002_trunc_04));
      else if (nfa_4f_trunc_04 in(-1, -2, -4) & nfa_4f_uab_c_04 = 0) then amountowe_vehicles4 = (amountowe_vehicles4 + quartile3);
       else if (nfa_4f_trunc_04 in(-1, -2, -4) & nfa_4f_uab_c_04 = 1) then amountowe_vehicles4 = (amountowe_vehicles4 + 53500);
        else if (nfa_4f_uab_a_04 in(-1, -2) | nfa_4f_uab_c_04 in(-1, -2)) then amtowe_vehicles4 = -3;

/************************************************/
/* CDEBT Component - amountowe_vehicles5        */
/************************************************/

if (nfa_4f_trunc_05 >= 0) then amountowe_vehicles5 = (amountowe_vehicles5 + nfa_4f_trunc_05);
 else if (nfa_4f_trunc_05 in(-1, -2)) then amountowe_vehicles5 = nfa_4f_trunc_05;

/************************************************/
/* CDEBT Component - amountowe_vehicles6        */
/************************************************/

if (nfa_4f_trunc_06 >= 0) then amountowe_vehicles6 = (amountowe_vehicles6 + nfa_4f_trunc_06);
 else if (nfa_4f_trunc_06 in(-1, -2)) then amountowe_vehicles6 = nfa_4f_trunc_06;

/************************************************/
/* CDEBT Component - amountowe_vehicles8        */
/************************************************/

if (nfa_4f_trunc_08 >= 0) then amountowe_vehicles8 = (amountowe_vehicles8 + nfa_4f_trunc_08);
 else if (nfa_4f_trunc_08 in(-1, -2)) then amountowe_vehicles8 = nfa_4f_trunc_08;

/************************************************/
/* CDEBT Component - amountowe_vehicles9        */
/************************************************/

if (nfa_4f_trunc_09 >= 0) then amountowe_vehicles9 = (amountowe_vehicles9 + nfa_4f_trunc_09);
 else if (nfa_4f_trunc_09 in(-1, -2)) then amountowe_vehicles9 = nfa_4f_trunc_09;

/************************************************/
/* CDEBT Component - amtowe_othervehicles       */
/************************************************/

if (nfa_5 = 1 & nfa_5b_trunc >= 0) then amtowe_othervehicles = (amtowe_othervehicles + nfa_5b_trunc);
 else if (nfa_5 = 1 & nfa_5b_trunc in(-1, -2)) then amtowe_othervehicles = nfa_5b_trunc;

/*******************************/
/* Add components CDEBT        */
/*******************************/

if (amtowe_assetpoorcars1 >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars1); 
if (amtowe_assetpoorcars2 >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars2); 
if (amountowe_vehicles1 >= 0) then cdebtc = (cdebtc + amountowe_vehicles1); 
if (amountowe_vehicles2 >= 0) then cdebtc = (cdebtc + amountowe_vehicles2); 
if (amountowe_vehicles3 >= 0) then cdebtc = (cdebtc + amountowe_vehicles3); 
if (amountowe_vehicles4 >= 0) then cdebtc = (cdebtc + amountowe_vehicles4); 
if (amountowe_vehicles5 >= 0) then cdebtc = (cdebtc + amountowe_vehicles5); 
if (amountowe_vehicles6 >= 0) then cdebtc = (cdebtc + amountowe_vehicles6); 
if (amountowe_vehicles8 >= 0) then cdebtc = (cdebtc + amountowe_vehicles8); 
if (amountowe_vehicles9 >= 0) then cdebtc = (cdebtc + amountowe_vehicles9);
if (amtowe_othervehicles >= 0) then cdebtc = (cdebtc + amtowe_othervehicles);

if (amtowe_assetpoorcars1 in(-1, -2, -3)) then cdebtc = -3; 
else if (amtowe_assetpoorcars2 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles1 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles2 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles3 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles4 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles5 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles6 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles8 in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles9 in(-1, -2, -3)) then cdebtc = -3; 
else if (amtowe_othervehicles in(-1, -2, -3)) then cdebtc = -3;

/****************************/
/* Compute CAR              */
/****************************/
/************************************************/
/* CAR Component - mktval_assetpoorcars1        */
/************************************************/

if (sc_12a_01 >= 0) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + sc_12a_01);
   else if (sc_12a_01 in(-1, -2) & sc_12a_sr000001_01 < 0 & sc_12a_sr000002_01 < 0 
  & sc_12a_uab_a_01 < 0 & sc_12a_uab_b_01 < 0) then mktval_assetpoorcars1 = sc_12a_01;
    else if (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 >= 0 & sc_12a_sr000002_01 = sc_12a_sr000001_01) then 
    mktval_assetpoorcars1 = (mktval_assetpoorcars1 + sc_12a_sr000001_01);
     else if (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 >= 0 & sc_12a_sr000002_01 > sc_12a_sr000001_01) then 
     mktval_assetpoorcars1 = (mktval_assetpoorcars1 + (((sc_12a_sr000002_01 - sc_12a_sr000001_01)/2) + sc_12a_sr000001_01));
      else if (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 >= 0 & sc_12a_sr000002_01 < sc_12a_sr000001_01) then 
      mktval_assetpoorcars1 = (mktval_assetpoorcars1 + (((sc_12a_sr000001_01 - sc_12a_sr000002_01)/2) + sc_12a_sr000002_01));
       else if (sc_12a_01 in(-1, -2, -4) & sc_12a_uab_b_01 = 0) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + quartile1);
        else if (sc_12a_01 in(-1, -2, -4) & sc_12a_uab_b_01 = 1) then mktval_assetpoorcars1 = (mktval_assetpoorcars1 + quartile2);
           else if (sc_12a_uab_a_01 in(-1, -2) | sc_12a_uab_b_01 in(-1, -2)) then mktval_assetpoorcars1 = -3;

/************************************************/
/* CAR Component - mktval_assetpoorcars2        */
/************************************************/

if (sc_12a_02 >= 0) then mktval_assetpoorcars2 = (mktval_assetpoorcars2 + sc_12a_02);
   else if (sc_12a_02 in(-1, -2)) then mktval_assetpoorcars2 = sc_12a_02;

/************************************************/
/* CAR Component - marketvalue_vehicles1        */
/************************************************/

if (nfa_4c_trunc_01 >= 0) then marketvalue_vehicles1 = (marketvalue_vehicles1 + nfa_4c_trunc_01);
 else if (nfa_4c_trunc_01 in(-1, -2) & nfa_4c_sr000001_01 < 0 & nfa_4c_sr000002_trunc_01 < 0 
 & nfa_4c_uab_a_01 < 0 & nfa_4c_uab_b_01 < 0 & nfa_4c_uab_c_01 < 0) then marketvalue_vehicles1 = nfa_4c_trunc_01;
   else if (nfa_4c_sr000001_01 >= 0 & nfa_4c_sr000002_trunc_01 >= 0 & nfa_4c_sr000002_trunc_01 = nfa_4c_sr000001_01) then 
   marketvalue_vehicles1 = (marketvalue_vehicles1 + nfa_4c_sr000001_01);
    else if (nfa_4c_sr000001_01 >= 0 & nfa_4c_sr000002_trunc_01 >= 0 & nfa_4c_sr000002_trunc_01 > nfa_4c_sr000001_01) then 
    marketvalue_vehicles1 = (marketvalue_vehicles1 + (((nfa_4c_sr000002_trunc_01 - nfa_4c_sr000001_01)/2) + nfa_4c_sr000001_01));
     else if (nfa_4c_sr000001_01 >= 0 & nfa_4c_sr000002_trunc_01 >= 0 & nfa_4c_sr000002_trunc_01 < nfa_4c_sr000001_01) then 
     marketvalue_vehicles1 = (marketvalue_vehicles1 + (((nfa_4c_sr000001_01 - nfa_4c_sr000002_trunc_01)/2) + nfa_4c_sr000002_trunc_01));
      else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_b_01 = 0) then marketvalue_vehicles1 = (marketvalue_vehicles1 + quartile1);
       else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_b_01 = 1) then marketvalue_vehicles1 = (marketvalue_vehicles1 + quartile2);
        else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_c_01 = 0) then marketvalue_vehicles1 = (marketvalue_vehicles1 + quartile3);
         else if (nfa_4c_trunc_01 in(-1, -2, -4) & nfa_4c_uab_c_01 = 1) then marketvalue_vehicles1 = (marketvalue_vehicles1 + 40000);
          else if (nfa_4c_uab_a_01 in(-1, -2) | nfa_4c_uab_b_01 in(-1, -2) | nfa_4c_uab_c_01 in(-1, -2)) then marketvalue_vehicles1 = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles2        */
/************************************************/

if (nfa_4c_trunc_02 >= 0) then marketvalue_vehicles2 = (marketvalue_vehicles2 + nfa_4c_trunc_02);
 else if (nfa_4c_trunc_02 in(-1, -2) & nfa_4c_sr000001_02 < 0 & nfa_4c_sr000002_trunc_02 < 0 
 & nfa_4c_uab_a_02 < 0 & nfa_4c_uab_b_02 < 0 & nfa_4c_uab_c_02 < 0) then marketvalue_vehicles2 = nfa_4c_trunc_02;
   else if (nfa_4c_sr000001_02 >= 0 & nfa_4c_sr000002_trunc_02 >= 0 & nfa_4c_sr000002_trunc_02 = nfa_4c_sr000001_02) then 
   marketvalue_vehicles2 = (marketvalue_vehicles2 + nfa_4c_sr000001_02);
    else if (nfa_4c_sr000001_02 >= 0 & nfa_4c_sr000002_trunc_02 >= 0 & nfa_4c_sr000002_trunc_02 > nfa_4c_sr000001_02) then 
    marketvalue_vehicles2 = (marketvalue_vehicles2 + (((nfa_4c_sr000002_trunc_02 - nfa_4c_sr000001_02)/2) + nfa_4c_sr000001_02));
     else if (nfa_4c_sr000001_02 >= 0 & nfa_4c_sr000002_trunc_02 >= 0 & nfa_4c_sr000002_trunc_02 < nfa_4c_sr000001_02) then 
     marketvalue_vehicles2 = (marketvalue_vehicles2 + (((nfa_4c_sr000001_02 - nfa_4c_sr000002_trunc_02)/2) + nfa_4c_sr000002_trunc_02));
      else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_b_02 = 0) then marketvalue_vehicles2 = (marketvalue_vehicles2 + quartile1);
       else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_b_02 = 1) then marketvalue_vehicles2 = (marketvalue_vehicles2 + quartile2);
        else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_c_02 = 0) then marketvalue_vehicles2 = (marketvalue_vehicles2 + quartile3);
         else if (nfa_4c_trunc_02 in(-1, -2, -4) & nfa_4c_uab_c_02 = 1) then marketvalue_vehicles2 = (marketvalue_vehicles2 + 40000);
          else if (nfa_4c_uab_a_02 in(-1, -2) | nfa_4c_uab_b_02 in(-1, -2) | nfa_4c_uab_c_02 in(-1, -2)) then marketvalue_vehicles2 = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles3        */
/************************************************/

if (nfa_4c_trunc_03 >= 0) then marketvalue_vehicles3 = (marketvalue_vehicles3 + nfa_4c_trunc_03);
 else if (nfa_4c_trunc_03 in(-1, -2) & nfa_4c_sr000001_03 < 0 & nfa_4c_sr000002_trunc_03 < 0 
 & nfa_4c_uab_a_03 < 0 & nfa_4c_uab_b_03 < 0 & nfa_4c_uab_c_03 < 0) then marketvalue_vehicles3 = nfa_4c_trunc_03;
   else if (nfa_4c_sr000001_03 >= 0 & nfa_4c_sr000002_trunc_03 >= 0 & nfa_4c_sr000002_trunc_03 = nfa_4c_sr000001_03) then 
   marketvalue_vehicles3 = (marketvalue_vehicles3 + nfa_4c_sr000001_03);
    else if (nfa_4c_sr000001_03 >= 0 & nfa_4c_sr000002_trunc_03 >= 0 & nfa_4c_sr000002_trunc_03 > nfa_4c_sr000001_03) then 
    marketvalue_vehicles3 = (marketvalue_vehicles3 + (((nfa_4c_sr000002_trunc_03 - nfa_4c_sr000001_03)/2) + nfa_4c_sr000001_03));
     else if (nfa_4c_sr000001_03 >= 0 & nfa_4c_sr000002_trunc_03 >= 0 & nfa_4c_sr000002_trunc_03 < nfa_4c_sr000001_03) then 
     marketvalue_vehicles3 = (marketvalue_vehicles3 + (((nfa_4c_sr000001_03 - nfa_4c_sr000002_trunc_03)/2) + nfa_4c_sr000002_trunc_03));
      else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_b_03 = 0) then marketvalue_vehicles3 = (marketvalue_vehicles3 + quartile1);
       else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_b_03 = 1) then marketvalue_vehicles3 = (marketvalue_vehicles3 + quartile2);
        else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_c_03 = 0) then marketvalue_vehicles3 = (marketvalue_vehicles3 + quartile3);
         else if (nfa_4c_trunc_03 in(-1, -2, -4) & nfa_4c_uab_c_03 = 1) then marketvalue_vehicles3 = (marketvalue_vehicles3 + 40000);
          else if (nfa_4c_uab_a_03 in(-1, -2) | nfa_4c_uab_b_03 in(-1, -2) | nfa_4c_uab_c_03 in(-1, -2)) then marketvalue_vehicles3 = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles4        */
/************************************************/

if (nfa_4c_trunc_04 >= 0) then marketvalue_vehicles4 = (marketvalue_vehicles4 + nfa_4c_trunc_04);
 else if (nfa_4c_trunc_04 in(-1, -2) & nfa_4c_sr000001_04 < 0 & nfa_4c_sr000002_trunc_04 < 0 
 & nfa_4c_uab_a_04 < 0 & nfa_4c_uab_c_04 < 0) then marketvalue_vehicles4 = nfa_4c_trunc_04;
   else if (nfa_4c_sr000001_04 >= 0 & nfa_4c_sr000002_trunc_04 >= 0 & nfa_4c_sr000002_trunc_04 = nfa_4c_sr000001_04) then 
   marketvalue_vehicles4 = (marketvalue_vehicles4 + nfa_4c_sr000001_04);
    else if (nfa_4c_sr000001_04 >= 0 & nfa_4c_sr000002_trunc_04 >= 0 & nfa_4c_sr000002_trunc_04 > nfa_4c_sr000001_04) then 
    marketvalue_vehicles4 = (marketvalue_vehicles4 + (((nfa_4c_sr000002_trunc_04 - nfa_4c_sr000001_04)/2) + nfa_4c_sr000001_04));
     else if (nfa_4c_sr000001_04 >= 0 & nfa_4c_sr000002_trunc_04 >= 0 & nfa_4c_sr000002_trunc_04 < nfa_4c_sr000001_04) then 
     marketvalue_vehicles4 = (marketvalue_vehicles4 + (((nfa_4c_sr000001_04 - nfa_4c_sr000002_trunc_04)/2) + nfa_4c_sr000002_trunc_04));
      else if (nfa_4c_trunc_04 in(-1, -2, -4) & nfa_4c_uab_c_04 = 0) then marketvalue_vehicles4 = (marketvalue_vehicles4 + quartile3);
       else if (nfa_4c_trunc_04 in(-1, -2, -4) & nfa_4c_uab_c_04 = 1) then marketvalue_vehicles4 = (marketvalue_vehicles4 + 40000);
        else if (nfa_4c_uab_a_04 in(-1, -2) | nfa_4c_uab_c_04 in(-1, -2)) then marketvalue_vehicles4 = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles5        */
/************************************************/

if (nfa_4c_trunc_05 >= 0) then marketvalue_vehicles5 = (marketvalue_vehicles5 + nfa_4c_trunc_05);
 else if (nfa_4c_trunc_05 in(-1, -2) & nfa_4c_sr000001_05 < 0 & nfa_4c_sr000002_trunc_05 < 0 
 & nfa_4c_uab_a_05 < 0 & nfa_4c_uab_c_05 < 0) then marketvalue_vehicles5 = nfa_4c_trunc_05;
   else if (nfa_4c_sr000001_05 >= 0 & nfa_4c_sr000002_trunc_05 >= 0 & nfa_4c_sr000002_trunc_05 = nfa_4c_sr000001_05) then 
   marketvalue_vehicles5 = (marketvalue_vehicles5 + nfa_4c_sr000001_05);
    else if (nfa_4c_sr000001_05 >= 0 & nfa_4c_sr000002_trunc_05 >= 0 & nfa_4c_sr000002_trunc_05 > nfa_4c_sr000001_05) then 
    marketvalue_vehicles5 = (marketvalue_vehicles5 + (((nfa_4c_sr000002_trunc_05 - nfa_4c_sr000001_05)/2) + nfa_4c_sr000001_05));
     else if (nfa_4c_sr000001_05 >= 0 & nfa_4c_sr000002_trunc_05 >= 0 & nfa_4c_sr000002_trunc_05 < nfa_4c_sr000001_05) then 
     marketvalue_vehicles5 = (marketvalue_vehicles5 + (((nfa_4c_sr000001_05 - nfa_4c_sr000002_trunc_05)/2) + nfa_4c_sr000002_trunc_05));
        else if (nfa_4c_trunc_05 in(-1, -2, -4) & nfa_4c_uab_c_05 = 0) then marketvalue_vehicles5 = (marketvalue_vehicles5 + quartile3);
         else if (nfa_4c_trunc_05 in(-1, -2, -4) & nfa_4c_uab_c_05 = 1) then marketvalue_vehicles5 = (marketvalue_vehicles5 + 45000);
          else if (nfa_4c_uab_a_05 in(-1, -2) | nfa_4c_uab_c_05 in(-1, -2)) then marketvalue_vehicles5 = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles6        */
/************************************************/

if (nfa_4c_trunc_06 >= 0) then marketvalue_vehicles6 = (marketvalue_vehicles6 + nfa_4c_trunc_06);
 else if (nfa_4c_trunc_06 in(-1, -2) & nfa_4c_uab_a_06 < 0 & nfa_4c_uab_c_06 < 0) 
 then marketvalue_vehicles6 = nfa_4c_trunc_06;
  else if (nfa_4c_trunc_06 in(-1, -2, -4) & nfa_4c_uab_c_06 = 0) then marketvalue_vehicles6 = (marketvalue_vehicles6 + quartile3);
   else if (nfa_4c_trunc_06 in(-1, -2, -4) & nfa_4c_uab_c_06 = 1) then marketvalue_vehicles6 = (marketvalue_vehicles6 + 40000);
    else if (nfa_4c_uab_a_06 in(-1, -2) | nfa_4c_uab_c_06 in(-1, -2)) then marketvalue_vehicles6 = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles7        */
/************************************************/

if (nfa_4c_trunc_07 >= 0) then marketvalue_vehicles7 = (marketvalue_vehicles7 + nfa_4c_trunc_07);
 else if (nfa_4c_trunc_07 in(-1, -2) & nfa_4c_uab_a_07 < 0) then marketvalue_vehicles7 = nfa_4c_trunc_07;
  else if (nfa_4c_uab_a_07 in(-1, -2)) then marketvalue_vehicles7 = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles8        */
/************************************************/

if (nfa_4c_trunc_08 >= 0) then marketvalue_vehicles8 = (marketvalue_vehicles8 + nfa_4c_trunc_08);
 else if (nfa_4c_trunc_08 in(-1, -2) & nfa_4c_uab_a_08 < 0 & nfa_4c_uab_c_08 < 0) then marketvalue_vehicles8 = nfa_4c_trunc_08;
  else if (nfa_4c_trunc_08 in(-1, -2, -4) & nfa_4c_uab_c_08 = 0) then marketvalue_vehicles8 = (marketvalue_vehicles8 + quartile3);
   else if (nfa_4c_trunc_08 in(-1, -2, -4) & nfa_4c_uab_c_08 = 1) then marketvalue_vehicles8 = (marketvalue_vehicles8 + 60000);
    else if (nfa_4c_uab_a_08 in(-1, -2) | nfa_4c_uab_c_08 in(-1, -2)) then marketvalue_vehicles8 = -3;


/************************************************/
/* CAR Component - marketvalue_vehicles9        */
/************************************************/

if (nfa_4c_trunc_09 >= 0) then marketvalue_vehicles9 = (marketvalue_vehicles9 + nfa_4c_trunc_09);
 else if (nfa_4c_trunc_09 in(-1, -2) & nfa_4c_uab_a_09 < 0 & nfa_4c_uab_b_09 < 0) then marketvalue_vehicles9 = nfa_4c_trunc_09;
  else if (nfa_4c_trunc_09 in(-1, -2, -4) & nfa_4c_uab_b_09 = 0) then marketvalue_vehicles9 = (marketvalue_vehicles9 + quartile1);
   else if (nfa_4c_trunc_09 in(-1, -2, -4) & nfa_4c_uab_b_09 = 1) then marketvalue_vehicles9 = (marketvalue_vehicles9 + quartile2);
    else if (nfa_4c_uab_a_09 in(-1, -2) | nfa_4c_uab_b_09 in(-1, -2)) then marketvalue_vehicles9 = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles10       */
/************************************************/

if (nfa_4c_trunc_10 >= 0) then marketvalue_vehicles10 = (marketvalue_vehicles10 + nfa_4c_trunc_10);
 else if (nfa_4c_trunc_10 in(-1, -2) & nfa_4c_uab_a_10 < 0) then marketvalue_vehicles10 = nfa_4c_trunc_10;
  else if (nfa_4c_uab_a_10 in(-1, -2)) then marketvalue_vehicles10 = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles11       */
/************************************************/

if (nfa_4c_trunc_11 >= 0) then marketvalue_vehicles11 = (marketvalue_vehicles11 + nfa_4c_trunc_11);
 else if (nfa_4c_trunc_11 in(-1, -2) & nfa_4c_uab_a_11 < 0) then marketvalue_vehicles11 = nfa_4c_trunc_11;
  else if (nfa_4c_uab_a_11 in(-1, -2)) then marketvalue_vehicles11 = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles12       */
/************************************************/

if (nfa_4c_trunc_12 >= 0) then marketvalue_vehicles12 = (marketvalue_vehicles12 + nfa_4c_trunc_12);
 else if (nfa_4c_trunc_12 in(-1, -2) & nfa_4c_uab_a_12 < 0) then marketvalue_vehicles12 = nfa_4c_trunc_12;
  else if (nfa_4c_uab_a_12 in(-1, -2)) then marketvalue_vehicles12 = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles13       */
/************************************************/

if (nfa_4c_trunc_13 >= 0) then marketvalue_vehicles13 = (marketvalue_vehicles13 + nfa_4c_trunc_13);
 else if (nfa_4c_trunc_13 in(-1, -2) & nfa_4c_uab_a_13 < 0) then marketvalue_vehicles13 = nfa_4c_trunc_13;
  else if (nfa_4c_uab_a_13 in(-1, -2)) then marketvalue_vehicles13 = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles14       */
/************************************************/

if (nfa_4c_trunc_14 >= 0) then marketvalue_vehicles14 = (marketvalue_vehicles14 + nfa_4c_trunc_14);
 else if (nfa_4c_trunc_14 in(-1, -2) & nfa_4c_uab_a_14 < 0) then marketvalue_vehicles14 = nfa_4c_trunc_14;
  else if (nfa_4c_uab_a_14 in(-1, -2)) then marketvalue_vehicles14 = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles15       */
/************************************************/

if (nfa_4c_trunc_15 >= 0) then marketvalue_vehicles15 = (marketvalue_vehicles15 + nfa_4c_trunc_15);
 else if (nfa_4c_trunc_15 in(-1, -2) ) then marketvalue_vehicles15 = nfa_4c_trunc_15;

/************************************************/
/* CAR Component - marketvalue_vehicles16       */
/************************************************/

if (nfa_4c_trunc_16 >= 0) then marketvalue_vehicles16 = (marketvalue_vehicles16 + nfa_4c_trunc_16);
 else if (nfa_4c_trunc_16 in(-1, -2)) then marketvalue_vehicles16 = nfa_4c_trunc_16;

/************************************************/
/* CAR Component - marketvalue_vehicles17       */
/************************************************/

if (nfa_4c_trunc_17 >= 0) then marketvalue_vehicles17 = (marketvalue_vehicles17 + nfa_4c_trunc_17);
 else if (nfa_4c_trunc_17 in(-1, -2)) then marketvalue_vehicles17 = nfa_4c_trunc_17;

/************************************************/
/* CAR Component - marketvalue_vehicles18       */
/************************************************/

if (nfa_4c_trunc_18 >= 0) then marketvalue_vehicles18 = (marketvalue_vehicles18 + nfa_4c_trunc_18);
 else if (nfa_4c_trunc_18 in(-1, -2)) then marketvalue_vehicles18 = nfa_4c_trunc_18;

/************************************************/
/* CAR Component - marketvalue_vehicles19       */
/************************************************/

if (nfa_4c_trunc_19 >= 0) then marketvalue_vehicles19 = (marketvalue_vehicles19 + nfa_4c_trunc_19);
 else if (nfa_4c_trunc_19 in(-1, -2)) then marketvalue_vehicles19 = nfa_4c_trunc_19;

/************************************************/
/* CAR Component - marketvalue_vehicles20       */
/************************************************/

if (nfa_4c_trunc_20 >= 0) then marketvalue_vehicles20 = (marketvalue_vehicles20 + nfa_4c_trunc_20);
 else if (nfa_4c_trunc_20 in(-1, -2)) then marketvalue_vehicles20 = nfa_4c_trunc_20;

/************************************************/
/* CAR Component - mktval_othervehicles         */
/************************************************/

if (nfa_5 = 1 & nfa_5c_trunc >= 0) then mktval_othervehicles = (mktval_othervehicles + nfa_5c_trunc);
 else if (nfa_5 = 1 & nfa_5c_ref_1 = 1 & nfa_5c_sr000001 < 0 & nfa_5c_sr000002 < 0
 & nfa_5c_uab_a < 0 & nfa_5c_uab_b < 0 & nfa_5c_uab_c < 0) then mktval_othervehicles = -1;
  else if (nfa_5 = 1 & nfa_5c_trunc in(-1, -2) & nfa_5c_sr000001 < 0 & nfa_5c_sr000002 < 0
  & nfa_5c_uab_a < 0 & nfa_5c_uab_b < 0 & nfa_5c_uab_c < 0) then mktval_othervehicles = nfa_5c_trunc;
    else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 = nfa_5c_sr000001) then 
    mktval_othervehicles = (mktval_othervehicles + nfa_5c_sr000001);
     else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 > nfa_5c_sr000001) then 
     mktval_othervehicles = (mktval_othervehicles + (((nfa_5c_sr000002 - nfa_5c_sr000001)/2) + nfa_5c_sr000001));
      else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 < nfa_5c_sr000001) then 
      mktval_othervehicles = (mktval_othervehicles + (((nfa_5c_sr000001 - nfa_5c_sr000002)/2) + nfa_5c_sr000002));
       else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_b = 0) then mktval_othervehicles = (mktval_othervehicles + quartile1);
        else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_b = 1) then mktval_othervehicles = (mktval_othervehicles + quartile2);
         else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_c = 0) then mktval_othervehicles = (mktval_othervehicles + quartile3);
          else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_c = 1) then mktval_othervehicles = (mktval_othervehicles + 50000);
           else if (nfa_5c_uab_a in(-1, -2) | nfa_5c_uab_b in(-1, -2) | nfa_5c_uab_c in(-1, -2)) then mktval_othervehicles = -3;

/*******************************/
/* Add components CAR          */
/*******************************/

if (mktval_assetpoorcars1 >= 0) then carc = (carc + mktval_assetpoorcars1); 
if (mktval_assetpoorcars2 >= 0) then carc = (carc + mktval_assetpoorcars2); 
if (marketvalue_vehicles1 >= 0) then carc = (carc + marketvalue_vehicles1); 
if (marketvalue_vehicles2 >= 0) then carc = (carc + marketvalue_vehicles2); 
if (marketvalue_vehicles3 >= 0) then carc = (carc + marketvalue_vehicles3); 
if (marketvalue_vehicles4 >= 0) then carc = (carc + marketvalue_vehicles4); 
if (marketvalue_vehicles5 >= 0) then carc = (carc + marketvalue_vehicles5); 
if (marketvalue_vehicles6 >= 0) then carc = (carc + marketvalue_vehicles6); 
if (marketvalue_vehicles7 >= 0) then carc = (carc + marketvalue_vehicles7); 
if (marketvalue_vehicles8 >= 0) then carc = (carc + marketvalue_vehicles8); 
if (marketvalue_vehicles9 >= 0) then carc = (carc + marketvalue_vehicles9); 
if (marketvalue_vehicles10 >= 0) then carc = (carc + marketvalue_vehicles10); 
if (marketvalue_vehicles11 >= 0) then carc = (carc + marketvalue_vehicles11); 
if (marketvalue_vehicles12 >= 0) then carc = (carc + marketvalue_vehicles12); 
if (marketvalue_vehicles13 >= 0) then carc = (carc + marketvalue_vehicles13); 
if (marketvalue_vehicles14 >= 0) then carc = (carc + marketvalue_vehicles14); 
if (marketvalue_vehicles15 >= 0) then carc = (carc + marketvalue_vehicles15); 
if (marketvalue_vehicles16 >= 0) then carc = (carc + marketvalue_vehicles16); 
if (marketvalue_vehicles17 >= 0) then carc = (carc + marketvalue_vehicles17); 
if (marketvalue_vehicles18 >= 0) then carc = (carc + marketvalue_vehicles18); 
if (marketvalue_vehicles19 >= 0) then carc = (carc + marketvalue_vehicles19); 
if (marketvalue_vehicles20 >= 0) then carc = (carc + marketvalue_vehicles20); 
if (mktval_othervehicles >= 0) then carc = (carc + mktval_othervehicles); 

if (mktval_assetpoorcars1 in(-1, -2, -3)) then carc = -3; 
else if (mktval_assetpoorcars2 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles1 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles2 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles3 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles4 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles5 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles6 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles7 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles8 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles9 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles10 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles11 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles12 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles13 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles14 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles15 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles16 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles17 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles18 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles19 in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles20 in(-1, -2, -3)) then carc = -3; 
else if (mktval_othervehicles in(-1, -2, -3)) then carc = -3; 

/************************/
/* Compute TNFW_TRUNC   */
/************************/
/*******************************************************/
/* TNFW_TRUNC - add components created in above code   */
/*******************************************************/

if (homec  >= 0) then tnfw_trunc = (tnfw_trunc + homec );
if (mortc  >= 0) then tnfw_trunc = (tnfw_trunc - mortc );
if (pdebtc >= 0) then tnfw_trunc = (tnfw_trunc - pdebtc);
if (cashc  >= 0) then tnfw_trunc = (tnfw_trunc + cashc );
if (irac   >= 0) then tnfw_trunc = (tnfw_trunc + irac  );
if (a401kc >= 0) then tnfw_trunc = (tnfw_trunc + a401kc);
if (cdsc   >= 0) then tnfw_trunc = (tnfw_trunc + cdsc  );
if (stockc >= 0) then tnfw_trunc = (tnfw_trunc + stockc);
if (bizc   >= 0) then tnfw_trunc = (tnfw_trunc + bizc  );
if (bdebtc >= 0) then tnfw_trunc = (tnfw_trunc - bdebtc);
if (cdebtc >= 0) then tnfw_trunc = (tnfw_trunc - cdebtc);
if (carc   >= 0) then tnfw_trunc = (tnfw_trunc + carc  );
if (posesc >= 0) then tnfw_trunc = (tnfw_trunc + posesc);
if (odebtc >= 0) then tnfw_trunc = (tnfw_trunc - odebtc);

if (homec  in(-1, -2, -3)) then tnfw_trunc = -3;
if (mortc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (pdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cashc  in(-1, -2, -3)) then tnfw_trunc = -3;
if (irac   in(-1, -2, -3)) then tnfw_trunc = -3;
if (a401kc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdsc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (stockc in(-1, -2, -3)) then tnfw_trunc = -3;
if (bizc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (bdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (cdebtc in(-1, -2, -3)) then tnfw_trunc = -3;
if (carc   in(-1, -2, -3)) then tnfw_trunc = -3;
if (posesc in(-1, -2, -3)) then tnfw_trunc = -3;
if (odebtc in(-1, -2, -3)) then tnfw_trunc = -3;

/****************************************/
/* APPLY TOPCODE TO TNFW_TRUNC FOR 2016 */
/****************************************/

if (tnfw_trunc_2016 >  3132500) then tnfw_trunc_2016 = 5526252;

tnfw_trunc_2016 = round(tnfw_trunc_2016);

/***************************************************************/
/* TNFW_TRUNC - adjust for partially missing range estimates   */
/***************************************************************/

if    (tnfw_trunc ~= -3 & 
         ((nfa_1a_sr000001 >= 0 & nfa_1a_sr000002 in(-1, -2)) | (nfa_1a_sr000001 in(-1, -2) & nfa_1a_sr000002 >= 0)
       | (nfa_1b_sr000001 >= 0 & nfa_1b_sr000002 in(-1, -2)) | (nfa_1b_sr000001 in(-1, -2) & nfa_1b_sr000002 >= 0) 
       | (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 in(-1, -2)) | (nfa_1c_sr000001 in(-1, -2) & nfa_1c_sr000002 >= 0)
       | (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 in(-1, -2)) | (nfa_2a_sr000001 in(-1, -2) & nfa_2a_sr000002 >= 0)
       | (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 in(-1, -2)) | (nfa_2b_sr000001 in(-1, -2) & nfa_2b_sr000002 >= 0) 
       | (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 in(-1, -2)) | (nfa_2c_sr000001 in(-1, -2) & nfa_2c_sr000002 >= 0) 
       | (fa_1a_sr000001 >= 0 & fa_1a_sr000002 in(-1, -2)) | (fa_1a_sr000001 in(-1, -2) & fa_1a_sr000002 >= 0)
       | (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 in(-1, -2)) | (fa_8d_sr000001_01 in(-1, -2) & fa_8d_sr000002_01 >= 0)
       | (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 in(-1, -2)) | (fa_8d_sr000001_02 in(-1, -2) & fa_8d_sr000002_02 >= 0)
       | (fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_03 in(-1, -2)) | (fa_8d_sr000001_03 in(-1, -2) & fa_8d_sr000002_03 >= 0)
       | (fa_8d_sr000001_04 >= 0 & fa_8d_sr000002_04 in(-1, -2)) | (fa_8d_sr000001_04 in(-1, -2) & fa_8d_sr000002_04 >= 0)
       | (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 in(-1, -2)) | (fa_8d_sr000001_05 in(-1, -2) & fa_8d_sr000002_05 >= 0)
       | (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 in(-1, -2)) | (fa_8d_sr000001_06 in(-1, -2) & fa_8d_sr000002_06 >= 0)
       | (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 in(-1, -2)) | (fa_8d_sr000001_07 in(-1, -2) & fa_8d_sr000002_07 >= 0)
       | (fa_6e_sr000001 >= 0 & fa_6e_sr000002 in(-1, -2)) | (fa_6e_sr000001 in(-1, -2) & fa_6e_sr000002 >= 0)
       | (fa_7c_sr000001 >= 0 & fa_7c_sr000002 in(-1, -2)) | (fa_7c_sr000001 in(-1, -2) & fa_7c_sr000002 >= 0)
       | (fa_2a_sr000001 >= 0 & fa_2a_sr000002 in(-1, -2)) | (fa_2a_sr000001 in(-1, -2) & fa_2a_sr000002 >= 0)
       | (fa_3a_sr000001 >= 0 & fa_3a_sr000002 in(-1, -2)) | (fa_3a_sr000001 in(-1, -2) & fa_3a_sr000002 >= 0)
       | (fa_4a_sr000001 >= 0 & fa_4a_sr000002 in(-1, -2)) | (fa_4a_sr000001 in(-1, -2) & fa_4a_sr000002 >= 0)
       | (fa_5a_sr000001 >= 0 & fa_5a_sr000002 in(-1, -2)) | (fa_5a_sr000001 in(-1, -2) & fa_5a_sr000002 >= 0)
       | (fa_9a_sr000001 >= 0 & fa_9a_sr000002 in(-1, -2)) | (fa_9a_sr000001 in(-1, -2) & fa_9a_sr000002 >= 0)
       | (fa_10a_sr000001 >= 0 & fa_10a_sr000002 in(-1, -2)) | (fa_10a_sr000001 in(-1, -2) & fa_10a_sr000002 >= 0)
       | (fa_11a_sr000001 >= 0 & fa_11a_sr000002 in(-1, -2)) | (fa_11a_sr000001 in(-1, -2) & fa_11a_sr000002 >= 0)
       | (q13_131_sr000001 >= 0 & q13_131_sr000002 in(-1, -2)) | (q13_131_sr000001 in(-1, -2) & q13_131_sr000002 >= 0)
       | (q13_132_sr000001 >= 0 & q13_132_sr000002 in(-1, -2)) | (q13_132_sr000001 in(-1, -2) & q13_132_sr000002 >= 0)
       | (sc_12b_sr000001_01 >= 0 & sc_12b_sr000002_01 in(-1, -2)) | (sc_12b_sr000001_01 in(-1, -2) & sc_12b_sr000002_01 >= 0)
       | (sc_12b_sr000001_02 >= 0 & sc_12b_sr000002_02 in(-1, -2)) | (sc_12b_sr000001_02 in(-1, -2) & sc_12b_sr000002_02 >= 0)
       | (nfa_4f_sr000001_01 >= 0 & nfa_4f_sr000002_01 in(-1, -2)) | (nfa_4f_sr000001_01 in(-1, -2) & nfa_4f_sr000002_01 >= 0)
       | (nfa_4f_sr000001_02 >= 0 & nfa_4f_sr000002_02 in(-1, -2)) | (nfa_4f_sr000001_02 in(-1, -2) & nfa_4f_sr000002_02 >= 0)
       | (nfa_4f_sr000001_03 >= 0 & nfa_4f_sr000002_03 in(-1, -2)) | (nfa_4f_sr000001_03 in(-1, -2) & nfa_4f_sr000002_03 >= 0)
       | (nfa_4f_sr000001_04 >= 0 & nfa_4f_sr000002_04 in(-1, -2)) | (nfa_4f_sr000001_04 in(-1, -2) & nfa_4f_sr000002_04 >= 0)
       | (sc_12a_sr000001_01 >= 0 & sc_12a_sr000002_01 in(-1, -2)) | (sc_12a_sr000001_01 in(-1, -2) & sc_12a_sr000002_01 >= 0)
       | (nfa_4c_sr000001_01 >= 0 & nfa_4c_sr000002_01 in(-1, -2)) | (nfa_4c_sr000001_01 in(-1, -2) & nfa_4c_sr000002_01 >= 0)
       | (nfa_4c_sr000001_02 >= 0 & nfa_4c_sr000002_02 in(-1, -2)) | (nfa_4c_sr000001_02 in(-1, -2) & nfa_4c_sr000002_02 >= 0)
       | (nfa_4c_sr000001_03 >= 0 & nfa_4c_sr000002_03 in(-1, -2)) | (nfa_4c_sr000001_03 in(-1, -2) & nfa_4c_sr000002_03 >= 0)
       | (nfa_4c_sr000001_04 >= 0 & nfa_4c_sr000002_04 in(-1, -2)) | (nfa_4c_sr000001_04 in(-1, -2) & nfa_4c_sr000002_04 >= 0)
       | (nfa_4c_sr000001_05 >= 0 & nfa_4c_sr000002_05 in(-1, -2)) | (nfa_4c_sr000001_05 in(-1, -2) & nfa_4c_sr000002_05 >= 0)
       | (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 in(-1, -2)) | (nfa_5c_sr000001 in(-1, -2) & nfa_5c_sr000002 >= 0)
       | (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002 in(-1, -2)) | (nfa_6e_sr000001 in(-1, -2) & nfa_6e_sr000002 >= 0)))
       then tnfw_trunc = -3;
end;
;

2020 TNFW_TRUNC variable creation

/***************************************************/
/* Compute dollar amt for dollars & cents vars */
/***************************************************/

nfa_7d_dc = nfa_7d_trunc;
if (nfa_7d_trunc > 0) then nfa_7d_dc = (nfa_7d_trunc/100);

/***************************************************/
/* Compute dynamic QUARTILE VALUES where necessary */
/* -- quartile4 defaults to 30000 if no specific */
/* value determined from frequencies */
/***************************************************/

array quartileqs (i) quartile1 quartile2 quartile3 quartile4;

do i = 1 to 4;
quartileqs = 0;
end;

if (symbol_entry_othhh = 7200) then do;
quartile1 = (5000/2);
quartile2 = (5000 + ((7200-5000)/2));
quartile3 = (7200 + ((30000-7200)/2));
quartile4 = 30000;
end;
else if (symbol_entry_othhh = 13000) then do;
quartile1 = (5000/2);
quartile2 = (5000 + ((13000-5000)/2));
quartile3 = (13000 + ((30000-13000)/2));
quartile4 = 30000;
end;

/***************************************************/
/* BEGIN COMPUTATIONS FOR NET WEALTH COMPONENTS */
/***************************************************/

array assetsc (i) homec mortc pdebtc cashc irac a401kc cdsc stockc trustc bizc 
bdebtc cdebtc carc posesc odebtc tnfw
collections items ccdebt studentloan childstudentloan owebusiness otherdebt
solebiz farm_1_value1 farm_2_value1 business_1_value1 business_2_value1
business_3_value1 business_4_value1 realestate_1_value1 
realestate_2_value1 realestate_3_value1 realestate_4_value1 realestate_5_value1 
farm_1_value farm_2_value business_1_value business_2_value
business_3_value business_4_value realestate_1_value 
realestate_2_value realestate_3_value realestate_4_value realestate_5_value 
debtbiz farm_1_debt1 farm_2_debt1 business_1_debt1 business_2_debt1
business_3_debt1 business_4_debt1 realestate_1_debt1 
realestate_2_debt1 realestate_3_debt1 realestate_4_debt1 realestate_5_debt1 
farm_1_debt farm_2_debt business_1_debt business_2_debt
business_3_debt business_4_debt realestate_1_debt
govbonds mutual lifeinsure shares corpbond moneyowedtor
home1 secondhome mort1 secondmort pdebt1 secondpdebt
ira1 ira2 ira3 ira4 ira5 ira6 ira7 r_401k sp_401k
amtowe_assetpoorcars
amountowe_vehicles amtowe_othervehicles
mktval_assetpoorcars
marketvalue_vehicles mktval_othervehicles;

do i = 1 to 92;
if (sampweight = 0) then assetsc = -5;
else if (sampweight > 0) then assetsc = 0;
end;


/****************************/
/* Compute POSES */
/****************************/
/*****************************************/
/* POSES Component - collections: */
/*****************************************/

if (nfa_6a = 1 & nfa_6e_trunc >= 0) then collections = (collections + nfa_6e_trunc);
else if (nfa_6a = 1 & nfa_6e_ref_1 = 1 & nfa_6e_sr000001 < 0 & nfa_6e_sr000002_trunc < 0 
& nfa_6e_uab_a < 0 & nfa_6e_uab_b < 0 & nfa_6e_uab_c < 0) then collections = -1;
else if (nfa_6a = 1 & nfa_6e_trunc in(-1, -2) & (nfa_6e_sr000001 < 0 | nfa_6e_sr000002_trunc < 0) 
& nfa_6e_uab_a < 0 & nfa_6e_uab_b < 0 & nfa_6e_uab_c < 0) then collections = nfa_6e_trunc;
else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002_trunc >= 0 & nfa_6e_sr000002_trunc = nfa_6e_sr000001) then 
collections = (collections + nfa_6e_sr000001);
else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002_trunc >= 0 & nfa_6e_sr000002_trunc > nfa_6e_sr000001) then 
collections = (collections + (((nfa_6e_sr000002_trunc - nfa_6e_sr000001)/2) + nfa_6e_sr000001));
else if (nfa_6e_sr000001 >= 0 & nfa_6e_sr000002_trunc >= 0 & nfa_6e_sr000002_trunc < nfa_6e_sr000001) then 
collections = (collections + (((nfa_6e_sr000001 - nfa_6e_sr000002_trunc)/2) + nfa_6e_sr000002_trunc));
else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_b = 0) then collections = (collections + quartile1);
else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_b = 1) then collections = (collections + quartile2);
else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_c = 0) then collections = (collections + quartile3);
else if (nfa_6e_trunc in(-1, -2, -4) & nfa_6e_uab_c = 1) then collections = (collections + 75000);
else if (nfa_6e_uab_a in(-1, -2) | nfa_6e_uab_b in(-1, -2) | nfa_6e_uab_c in(-1, -2)) then collections = -3;


/**********************************/
/* POSES Component - items: */
/**********************************/

if (nfa_7 = 1 & nfa_7d_dc >= 0) then items = (items + nfa_7d_dc);
else if (nfa_7 = 1 & nfa_7d_ref_1 = 1 & nfa_7d_uab_a < 0 & nfa_7d_uab_b < 0 & nfa_7d_uab_c < 0) then items = -1;
else if (nfa_7 = 1 & nfa_7d_dc in(-1, -2) & nfa_7d_uab_a < 0 & nfa_7d_uab_b < 0 & nfa_7d_uab_c < 0) then items = nfa_7d_dc;
else if (nfa_7d_dc in(-1, -2, -4) & nfa_7d_uab_b = 0) then items = (items + quartile1);
else if (nfa_7d_dc in(-1, -2, -4) & nfa_7d_uab_b = 1) then items = (items + quartile2);
else if (nfa_7d_dc in(-1, -2, -4) & nfa_7d_uab_c = 0) then items = (items + quartile3);
else if (nfa_7d_dc in(-1, -2, -4) & nfa_7d_uab_c = 1) then items = (items + 50000);
else if (nfa_7d_uab_a in(-1, -2) | nfa_7d_uab_b in(-1, -2) | nfa_7d_uab_c in(-1, -2)) then items = -3;


/*******************************/
/* Add components POSES */
/*******************************/

if (collections >= 0) then posesc = (posesc + collections); 
if (items >= 0) then posesc = (posesc + items);
if (collections in(-1, -2, -3)) then posesc = -3;
else if (items in(-1, -2, -3)) then posesc = -3;


/****************************/
/* Compute ODEBT */
/****************************/

/************************************/
/* ODEBT Component - ccdebt: */
/************************************/

if (debt_1 = 1 & debt_1a_trunc >= 0) then ccdebt = (ccdebt + debt_1a_trunc);
else if (debt_1 = 1 & debt_1a_ref_1 = 1 & debt_1a_uab_a < 0 & debt_1a_uab_b < 0 & debt_1a_uab_c < 0) then ccdebt = -1;
else if (debt_1 = 1 & debt_1a_trunc in(-1, -2) & debt_1a_uab_a < 0 & debt_1a_uab_b < 0 & debt_1a_uab_c < 0) then ccdebt = debt_1a_trunc;
else if (debt_1a_trunc in(-1, -2, -4) & debt_1a_uab_b = 0) then ccdebt = (ccdebt + quartile1);
else if (debt_1a_trunc in(-1, -2, -4) & debt_1a_uab_b = 1) then ccdebt = (ccdebt + quartile2);
else if (debt_1a_trunc in(-1, -2, -4) & debt_1a_uab_c = 0) then ccdebt = (ccdebt + quartile3);
else if (debt_1a_trunc in(-1, -2, -4) & debt_1a_uab_c = 1) then ccdebt = (ccdebt + 45000);
else if (debt_1a_uab_a in(-1, -2) | debt_1a_uab_b in(-1, -2) | debt_1a_uab_c in(-1, -2)) then ccdebt = -3;

/*****************************************/
/* ODEBT Component - studentloan */
/*****************************************/

if (debt_2 = 1 & debt_2a_trunc >= 0) then studentloan = (studentloan + debt_2a_trunc);
else if (debt_2 = 1 & debt_2a_ref_1 = 1 & debt_2a_uab_a < 0 & debt_2a_uab_b < 0 & debt_2a_uab_c < 0) then studentloan = -1;
else if (debt_2 = 1 & debt_2a_trunc in(-1, -2) & debt_2a_uab_a < 0 & debt_2a_uab_b < 0 & debt_2a_uab_c < 0) then studentloan = debt_2a_trunc;
else if (debt_2a_trunc in(-1, -2, -4) & debt_2a_uab_b = 0) then studentloan = (studentloan + quartile1);
else if (debt_2a_trunc in(-1, -2, -4) & debt_2a_uab_b = 1) then studentloan = (studentloan + quartile2);
else if (debt_2a_trunc in(-1, -2, -4) & debt_2a_uab_c = 0) then studentloan = (studentloan + quartile3);
else if (debt_2a_trunc in(-1, -2, -4) & debt_2a_uab_c = 1) then studentloan = (studentloan + 70000);
else if (debt_2a_uab_a in(-1, -2) | debt_2a_uab_b in(-1, -2) | debt_2a_uab_c in(-1, -2)) then studentloan = -3;


/*********************************************/
/* ODEBT Component - childstudentloan */
/*********************************************/

if (debt_2c = 1 & debt_2d_trunc >= 0) then childstudentloan = (childstudentloan + debt_2d_trunc);
else if (debt_2c = 1 & debt_2d_ref_1 = 1 & debt_2d_uab_a < 0 & debt_2d_uab_b < 0 & debt_2d_uab_c < 0) then childstudentloan = -1;
else if (debt_2c = 1 & debt_2d_trunc in(-1, -2) & debt_2d_uab_a < 0 & debt_2d_uab_b < 0 & debt_2d_uab_c < 0) then childstudentloan = debt_2d_trunc;
else if (debt_2d_trunc in(-1, -2, -4) & debt_2d_uab_b = 0) then childstudentloan = (childstudentloan + quartile1);
else if (debt_2d_trunc in(-1, -2, -4) & debt_2d_uab_b = 1) then childstudentloan = (childstudentloan + quartile2);
else if (debt_2d_trunc in(-1, -2, -4) & debt_2d_uab_c = 0) then childstudentloan = (childstudentloan + quartile3);
else if (debt_2d_trunc in(-1, -2, -4) & debt_2d_uab_c = 1) then childstudentloan = (childstudentloan + 67500);
else if (debt_2d_uab_a in(-1, -2) | debt_2d_uab_b in(-1, -2) | debt_2d_uab_c in(-1, -2)) then childstudentloan = -3;


/****************************************/
/* ODEBT Component - owebusiness */
/****************************************/

if (debt_3 = 1 & debt_3a_trunc >= 0) then owebusiness = (owebusiness + debt_3a_trunc);
else if (debt_3 = 1 & debt_3a_ref_1 = 1 & debt_3a_uab_a < 0 & debt_3a_uab_b < 0 & debt_3a_uab_c < 0) then owebusiness = -1;
else if (debt_3 = 1 & debt_3a_trunc in(-1, -2) & debt_3a_uab_a < 0 & debt_3a_uab_b < 0 & debt_3a_uab_c < 0) then owebusiness = debt_3a_trunc;
else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_b = 0) then owebusiness = (owebusiness + quartile1);
else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_b = 1) then owebusiness = (owebusiness + quartile2);
else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_c = 0) then owebusiness = (owebusiness + quartile3);
else if (debt_3a_trunc in(-1, -2, -4) & debt_3a_uab_c = 1) then owebusiness = (owebusiness + 60000);
else if (debt_3a_uab_a in(-1, -2) | debt_3a_uab_b in(-1, -2) | debt_3a_uab_c in(-1, -2)) then owebusiness = -3;


/*****************************************/
/* ODEBT Component - otherdebt */
/*****************************************/

if (debt_4 = 1 & debt_4a_trunc >= 0) then otherdebt = (otherdebt + debt_4a_trunc);
else if (debt_4 = 1 & debt_4a_ref_1 = 1 
& debt_4a_uab_a < 0 & debt_4a_uab_b < 0 & debt_4a_uab_c < 0) then otherdebt = -1;
else if (debt_4 = 1 & debt_4a_trunc in(-1, -2) & debt_4a_uab_a < 0 & debt_4a_uab_b < 0 & debt_4a_uab_c < 0) then otherdebt = debt_4a_trunc;
else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_b = 0) then otherdebt = (otherdebt + quartile1);
else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_b = 1) then otherdebt = (otherdebt + quartile2);
else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_c = 0) then otherdebt = (otherdebt + quartile3);
else if (debt_4a_trunc in(-1, -2, -4) & debt_4a_uab_c = 1) then otherdebt = (otherdebt + 50000);
else if (debt_4a_uab_a in(-1, -2) | debt_4a_uab_b in(-1, -2) | debt_4a_uab_c in(-1, -2)) then otherdebt = -3;


/*******************************/
/* Add components ODEBT */
/*******************************/

if (ccdebt >= 0) then odebtc = (odebtc + ccdebt); 
if (studentloan >= 0) then odebtc = (odebtc + studentloan);
if (childstudentloan >= 0) then odebtc = (odebtc + childstudentloan);
if (owebusiness >= 0) then odebtc = (odebtc + owebusiness);
if (otherdebt >= 0) then odebtc = (odebtc + otherdebt);
if (ccdebt in(-1, -2, -3)) then odebtc = -3;
else if (studentloan in(-1, -2, -3)) then odebtc = -3;
else if (childstudentloan in(-1, -2, -3)) then odebtc = -3;
else if (owebusiness in(-1, -2, -3)) then odebtc = -3;
else if (otherdebt in(-1, -2, -3)) then odebtc = -3;


/********************/
/* Compute BIZ */
/********************/

/************************************/
/* BIZ Component - solebiz: */
/************************************/

if (q13_131_trunc >= 0) then solebiz = (solebiz + q13_131_trunc);
else if (q13_131_trunc = 1 & q13_131_ref_1 = 1 & q13_131_sr000001 < 0 & q13_131_sr000002 < 0 
& q13_131_uab_a < 0 & q13_131_uab_c < 0) then solebiz = -1;
else if (q13_131_trunc in(-1, -2) & (q13_131_sr000001 < 0 | q13_131_sr000002 < 0) 
& q13_131_uab_a < 0 & q13_131_uab_c < 0) then solebiz = q13_131_trunc;
else if (q13_131_sr000001 >= 0 & q13_131_sr000002 >= 0 & q13_131_sr000002 = q13_131_sr000001) then 
solebiz = (solebiz + q13_131_sr000001);
else if (q13_131_sr000001 >= 0 & q13_131_sr000002 >= 0 & q13_131_sr000002 > q13_131_sr000001) then 
solebiz = (solebiz + (((q13_131_sr000002 - q13_131_sr000001)/2) + q13_131_sr000001));
else if (q13_131_sr000001 >= 0 & q13_131_sr000002 >= 0 & q13_131_sr000002 < q13_131_sr000001) then 
solebiz = (solebiz + (((q13_131_sr000001 - q13_131_sr000002)/2) + q13_131_sr000002));
else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_c = 0) then solebiz = (solebiz + quartile3);
else if (q13_131_trunc in(-1, -2, -4) & q13_131_uab_c = 1) then solebiz = (solebiz + 310000);
else if (q13_131_uab_a in(-1, -2) | q13_131_uab_c in(-1, -2)) then solebiz = -3;


/********************************************************************************************************/
/* BIZ Components - farm_#_value, business_#_value, realestate_#_value & percentage ownership */
/********************************************************************************************************/

if (q13_fjt_11_trunc_01 > -4) then farm_1_value1 = q13_fjt_11_trunc_01;
if (q13_fjt_11_trunc_02 > -4) then farm_2_value1 = q13_fjt_11_trunc_02;
if (q13_bppjt_11_trunc_01 > -4) then business_1_value1 = q13_bppjt_11_trunc_01;
if (q13_bppjt_11_trunc_02 > -4) then business_2_value1 = q13_bppjt_11_trunc_02;
if (q13_bppjt_11_trunc_03 > -4) then business_3_value1 = q13_bppjt_11_trunc_03;
if (q13_bppjt_11_trunc_04 > -4) then business_4_value1 = q13_bppjt_11_trunc_04;
if (q13_bppjt_11_trunc_05 > -4) then business_5_value1 = q13_bppjt_11_trunc_05;
if (q13_rejt_11_trunc_01 > -4) then realestate_1_value1 = q13_rejt_11_trunc_01;
if (q13_rejt_11_trunc_02 > -4) then realestate_2_value1 = q13_rejt_11_trunc_02;
if (q13_rejt_11_03 > -4) then realestate_3_value1 = q13_rejt_11_03;
if (q13_rejt_11_04 > -4) then realestate_4_value1 = q13_rejt_11_04;

if (q13_fjt_12b_01 > -4) then farm_1_pcntshare = q13_fjt_12b_01;
if (q13_fjt_12b_02 > -4) then farm_2_pcntshare = q13_fjt_12b_02;
if (q13_bppjt_12b_01 > -4) then business_1_pcntshare = q13_bppjt_12b_01;
if (q13_bppjt_12b_02 > -4) then business_2_pcntshare = q13_bppjt_12b_02;
if (q13_bppjt_12b_03 > -4) then business_3_pcntshare = q13_bppjt_12b_03;
if (q13_bppjt_12b_04 > -4) then business_4_pcntshare = q13_bppjt_12b_04;
if (q13_bppjt_12b_05 > -4) then business_5_pcntshare = q13_bppjt_12b_05;
if (q13_rejt_12b_01 > -4) then realestate_1_pcntshare = q13_rejt_12b_01;
if (q13_rejt_12b_02 > -4) then realestate_2_pcntshare = q13_rejt_12b_02;
if (q13_rejt_12b_03 > -4) then realestate_3_pcntshare = q13_rejt_12b_03;
if (q13_rejt_12b_04 > -4) then realestate_4_pcntshare = q13_rejt_12b_04;

if (farm_1_pcntshare > 0) then farm_1_pcntshare = (farm_1_pcntshare / 100);
if (farm_2_pcntshare > 0) then farm_2_pcntshare = (farm_2_pcntshare / 100);
if (business_1_pcntshare > 0) then business_1_pcntshare = (business_1_pcntshare / 100);
if (business_2_pcntshare > 0) then business_2_pcntshare = (business_2_pcntshare / 100);
if (business_3_pcntshare > 0) then business_3_pcntshare = (business_3_pcntshare / 100);
if (business_4_pcntshare > 0) then business_4_pcntshare = (business_4_pcntshare / 100);
if (business_5_pcntshare > 0) then business_5_pcntshare = (business_5_pcntshare / 100);
if (realestate_1_pcntshare > 0) then realestate_1_pcntshare = (realestate_1_pcntshare / 100);
if (realestate_2_pcntshare > 0) then realestate_2_pcntshare = (realestate_2_pcntshare / 100);
if (realestate_3_pcntshare > 0) then realestate_3_pcntshare = (realestate_3_pcntshare / 100);
if (realestate_4_pcntshare > 0) then realestate_4_pcntshare = (realestate_4_pcntshare / 100);

if (farm_1_value1 >= 0 & farm_1_pcntshare >= 0) then farm_1_value = (farm_1_value1 * farm_1_pcntshare);
if (farm_2_value1 >= 0 & farm_2_pcntshare >= 0) then farm_2_value = (farm_2_value1 * farm_2_pcntshare);
if (business_1_value1 >= 0 & business_1_pcntshare >= 0) then business_1_value = (business_1_value1 * business_1_pcntshare);
if (business_2_value1 >= 0 & business_2_pcntshare >= 0) then business_2_value = (business_2_value1 * business_2_pcntshare);
if (business_3_value1 >= 0 & business_3_pcntshare >= 0) then business_3_value = (business_3_value1 * business_3_pcntshare);
if (business_4_value1 >= 0 & business_4_pcntshare >= 0) then business_4_value = (business_4_value1 * business_4_pcntshare);
if (business_5_value1 >= 0 & business_5_pcntshare >= 0) then business_5_value = (business_5_value1 * business_5_pcntshare);
if (realestate_1_value1 >= 0 & realestate_1_pcntshare >= 0) then realestate_1_value = (realestate_1_value1 * realestate_1_pcntshare);
if (realestate_2_value1 >= 0 & realestate_2_pcntshare >= 0) then realestate_2_value = (realestate_2_value1 * realestate_2_pcntshare);
if (realestate_3_value1 >= 0 & realestate_3_pcntshare >= 0) then realestate_3_value = (realestate_3_value1 * realestate_3_pcntshare);
if (realestate_4_value1 >= 0 & realestate_4_pcntshare >= 0) then realestate_4_value = (realestate_4_value1 * realestate_4_pcntshare);


/*******************************/
/* Add components BIZ */
/*******************************/

if (solebiz >= 0) then bizc = (bizc + solebiz); 
if (farm_1_value >= 0) then bizc = (bizc + farm_1_value);
if (farm_2_value >= 0) then bizc = (bizc + farm_2_value);
if (business_1_value >= 0) then bizc = (bizc + business_1_value);
if (business_2_value >= 0) then bizc = (bizc + business_2_value);
if (business_3_value >= 0) then bizc = (bizc + business_3_value);
if (business_4_value >= 0) then bizc = (bizc + business_4_value);
if (business_5_value >= 0) then bizc = (bizc + business_5_value);
if (realestate_1_value >= 0) then bizc = (bizc + realestate_1_value);
if (realestate_2_value >= 0) then bizc = (bizc + realestate_2_value);
if (realestate_3_value >= 0) then bizc = (bizc + realestate_3_value);
if (realestate_4_value >= 0) then bizc = (bizc + realestate_4_value);

if (solebiz in(-1, -2, -3)) then bizc = -3;
if (farm_1_value1 in(-1, -2, -3) | farm_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (farm_2_value1 in(-1, -2, -3) | farm_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_1_value1 in(-1, -2, -3) | business_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_2_value1 in(-1, -2, -3) | business_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_3_value1 in(-1, -2, -3) | business_3_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_4_value1 in(-1, -2, -3) | business_4_pcntshare in(-1, -2, -3)) then bizc = -3;
if (business_5_value1 in(-1, -2, -3) | business_5_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_1_value1 in(-1, -2, -3) | realestate_1_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_2_value1 in(-1, -2, -3) | realestate_2_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_3_value1 in(-1, -2, -3) | realestate_3_pcntshare in(-1, -2, -3)) then bizc = -3;
if (realestate_4_value1 in(-1, -2, -3) | realestate_4_pcntshare in(-1, -2, -3)) then bizc = -3;


/****************************/
/* Compute BDEBT */
/****************************/

/**************************************/
/* BDEBT Component - debtbiz: */
/**************************************/

if (q13_132_trunc >= 0) then debtbiz = (debtbiz + q13_132_trunc);
else if (q13_132_trunc = 1 & q13_132_ref_1 = 1 & q13_132_sr000001 < 0 & q13_132_sr000002 < 0 
& q13_132_uab_a < 0 & q13_132_uab_c < 0) then debtbiz = -1;
else if (q13_132_trunc in(-1, -2) & (q13_132_sr000001 < 0 | q13_132_sr000002 < 0) 
& q13_132_uab_a < 0 & q13_132_uab_c < 0) then debtbiz = q13_132_trunc;
else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 = q13_132_sr000001) then 
debtbiz = (debtbiz + q13_132_sr000001);
else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 > q13_132_sr000001) then 
debtbiz = (debtbiz + (((q13_132_sr000002 - q13_132_sr000001)/2) + q13_132_sr000001));
else if (q13_132_sr000001 >= 0 & q13_132_sr000002 >= 0 & q13_132_sr000002 < q13_132_sr000001) then 
debtbiz = (debtbiz + (((q13_132_sr000001 - q13_132_sr000002)/2) + q13_132_sr000002));
else if (q13_132_trunc in(-1, -2, -4) & q13_132_uab_c = 0) then debtbiz = (debtbiz + quartile3);
else if (q13_132_trunc in(-1, -2, -4) & q13_132_uab_c = 1) then debtbiz = (debtbiz + 187000);
else if (q13_132_uab_a in(-1, -2) | q13_132_uab_c in(-1, -2)) then debtbiz = -3;

/*********************************************************************************/
/* BDEBT Components - farm_#_debt, business_#_debt, realestate_#_debt */
/*********************************************************************************/

if (q13_fjt_12_01 > -4) then farm_1_debt1 = q13_fjt_12_01;
if (q13_fjt_12_02 > -4) then farm_2_debt1 = q13_fjt_12_02;
if (q13_bppjt_12_trunc_01 > -4) then business_1_debt1 = q13_bppjt_12_trunc_01;
if (q13_bppjt_12_trunc_02 > -4) then business_2_debt1 = q13_bppjt_12_trunc_02;
if (q13_bppjt_12_trunc_03 > -4) then business_3_debt1 = q13_bppjt_12_trunc_03;
if (q13_bppjt_12_04 > -4) then business_4_debt1 = q13_bppjt_12_04;
if (q13_bppjt_12_05 > -4) then business_5_debt1 = q13_bppjt_12_05;
if (q13_rejt_12_trunc > -4) then realestate_1_debt1 = q13_rejt_12_trunc;

if (farm_1_debt1 >= 0 & farm_1_pcntshare >= 0) then farm_1_debt = (farm_1_debt1 * farm_1_pcntshare);
if (farm_2_debt1 >= 0 & farm_2_pcntshare >= 0) then farm_2_debt = (farm_2_debt1 * farm_2_pcntshare);
if (business_1_debt1 >= 0 & business_1_pcntshare >= 0) then business_1_debt = (business_1_debt1 * business_1_pcntshare);
if (business_2_debt1 >= 0 & business_2_pcntshare >= 0) then business_2_debt = (business_2_debt1 * business_2_pcntshare);
if (business_3_debt1 >= 0 & business_3_pcntshare >= 0) then business_3_debt = (business_3_debt1 * business_3_pcntshare);
if (business_4_debt1 >= 0 & business_4_pcntshare >= 0) then business_4_debt = (business_4_debt1 * business_4_pcntshare);
if (business_5_debt1 >= 0 & business_5_pcntshare >= 0) then business_5_debt = (business_5_debt1 * business_5_pcntshare);
if (realestate_1_debt1 >= 0 & realestate_1_pcntshare >= 0) then realestate_1_debt = (realestate_1_debt1 * realestate_1_pcntshare);


/*******************************/
/* Add components BDEBT */
/*******************************/

if (debtbiz >= 0) then bdebtc = (bdebtc + debtbiz); 
if (farm_1_debt >= 0) then bdebtc = (bdebtc + farm_1_debt);
if (farm_2_debt >= 0) then bdebtc = (bdebtc + farm_2_debt);
if (business_1_debt >= 0) then bdebtc = (bdebtc + business_1_debt);
if (business_2_debt >= 0) then bdebtc = (bdebtc + business_2_debt);
if (business_3_debt >= 0) then bdebtc = (bdebtc + business_3_debt);
if (business_4_debt >= 0) then bdebtc = (bdebtc + business_4_debt);
if (business_5_debt >= 0) then bdebtc = (bdebtc + business_5_debt);
if (realestate_1_debt >= 0) then bdebtc = (bdebtc + realestate_1_debt);

if (debtbiz in(-1, -2, -3)) then bdebtc = -3; 
if (farm_1_debt1 in(-1, -2, -3) | farm_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (farm_2_debt1 in(-1, -2, -3) | farm_2_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_1_debt1 in(-1, -2, -3) | business_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_2_debt1 in(-1, -2, -3) | business_2_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_3_debt1 in(-1, -2, -3) | business_3_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_4_debt1 in(-1, -2, -3) | business_4_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (business_5_debt1 in(-1, -2, -3) | business_5_pcntshare in(-1, -2, -3)) then bdebtc = -3;
if (realestate_1_debt1 in(-1, -2, -3) | realestate_1_pcntshare in(-1, -2, -3)) then bdebtc = -3;


/****************************/
/* Compute CASH */
/****************************/

/**********************************/
/* CASH Component - cash: */
/**********************************/

if (fa_1 = 1 & fa_1a_trunc >= 0) then cashc = (cashc + fa_1a_trunc);
else if (fa_1 = 1 & fa_1_ref_1 = 1 & fa_1a_sr000001 < 0 & fa_1a_sr000002 < 0 
& fa_1a_uab_a < 0 & fa_1a_uab_b < 0 & fa_1a_uab_c < 0) then cashc = -1;
else if (fa_1 = 1 & fa_1a_trunc in(-1, -2) & (fa_1a_sr000001 < 0 | fa_1a_sr000002 < 0) 
& fa_1a_uab_a < 0 & fa_1a_uab_b < 0 & fa_1a_uab_c < 0) then cashc = fa_1a_trunc;
else if (fa_1a_sr000001 >= 0 & fa_1a_sr000002 >= 0 & fa_1a_sr000002 = fa_1a_sr000001) then 
cashc = (cashc + fa_1a_sr000001);
else if (fa_1a_sr000001 >= 0 & fa_1a_sr000002 >= 0 & fa_1a_sr000002 > fa_1a_sr000001) then 
cashc = (cashc + (((fa_1a_sr000002 - fa_1a_sr000001)/2) + fa_1a_sr000001));
else if (fa_1a_sr000001 >= 0 & fa_1a_sr000002 >= 0 & fa_1a_sr000002 < fa_1a_sr000001) then 
cashc = (cashc + (((fa_1a_sr000001 - fa_1a_sr000002)/2) + fa_1a_sr000002));
else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_b = 0) then cashc = (cashc + quartile1);
else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_b = 1) then cashc = (cashc + quartile2);
else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_c = 0) then cashc = (cashc + quartile3);
else if (fa_1a_trunc in(-1, -2, -4) & fa_1a_uab_c = 1) then cashc = (cashc + 90000);
else if (fa_1a_uab_a in(-1, -2) | fa_1a_uab_b in(-1, -2) | fa_1a_uab_c in(-1, -2)) then cashc = -3;


/*************************************************************/
/* No need to add components for CASHC - set -3 missing */
/*************************************************************/

if (cashc in(-1, -2, -3)) then cashc = -3;


/****************************/
/* Compute CDS */
/****************************/

/**********************************/
/* CDS Component - cds: */
/**********************************/

if (fa_2 = 1 & fa_2a_trunc >= 0) then cdsc = (cdsc + fa_2a_trunc);
else if (fa_2 = 1 & fa_2_ref_1 = 1 & fa_2a_sr000001 < 0 & fa_2a_sr000002 < 0 
& fa_2a_uab_a < 0 & fa_2a_uab_b < 0 & fa_2a_uab_c < 0) then cdsc = -1;
else if (fa_2 = 1 & fa_2a_trunc in(-1, -2) & (fa_2a_sr000001 < 0 | fa_2a_sr000002 < 0) 
& fa_2a_uab_a < 0 & fa_2a_uab_b < 0 & fa_2a_uab_c < 0) then cdsc = fa_2a_trunc;
else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002 >= 0 & fa_2a_sr000002 = fa_2a_sr000001) then 
cdsc = (cdsc + fa_2a_sr000001);
else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002 >= 0 & fa_2a_sr000002 > fa_2a_sr000001) then 
cdsc = (cdsc + (((fa_2a_sr000002 - fa_2a_sr000001)/2) + fa_2a_sr000001));
else if (fa_2a_sr000001 >= 0 & fa_2a_sr000002 >= 0 & fa_2a_sr000002 < fa_2a_sr000001) then 
cdsc = (cdsc + (((fa_2a_sr000001 - fa_2a_sr000002)/2) + fa_2a_sr000002));
else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_b = 0) then cdsc = (cdsc + quartile1);
else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_b = 1) then cdsc = (cdsc + quartile2);
else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_c = 0) then cdsc = (cdsc + quartile3);
else if (fa_2a_trunc in(-1, -2, -4) & fa_2a_uab_c = 1) then cdsc = (cdsc + 100000);
else if (fa_2a_uab_a in(-1, -2) | fa_2a_uab_b in(-1, -2) | fa_2a_uab_c in(-1, -2)) then cdsc = -3;

/*************************************************************/
/* No need to add components for CDSC - set -3 missing */
/*************************************************************/

if (cdsc in(-1, -2, -3)) then cdsc = -3;


/****************************/
/* Compute STOCK */
/****************************/

/***************************************/
/* STOCK Component - govbonds: */
/***************************************/

if (fa_3 = 1 & fa_3a >= 0) then govbonds = (govbonds + fa_3a);
else if (fa_3 = 1 & fa_3_ref_1 = 1 & fa_3a_sr000001 < 0 & fa_3a_sr000002 < 0 
& fa_3a_uab_a < 0 & fa_3a_uab_b < 0 & fa_3a_uab_c < 0) then govbonds = -1;
else if (fa_3 = 1 & fa_3a in(-1, -2) & (fa_3a_sr000001 < 0 | fa_3a_sr000002 < 0) 
& fa_3a_uab_a < 0 & fa_3a_uab_b < 0 & fa_3a_uab_c < 0) then govbonds = fa_3a;
else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 = fa_3a_sr000001) then 
govbonds = (govbonds + fa_3a_sr000001);
else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 > fa_3a_sr000001) then 
govbonds = (govbonds + (((fa_3a_sr000002 - fa_3a_sr000001)/2) + fa_3a_sr000001));
else if (fa_3a_sr000001 >= 0 & fa_3a_sr000002 >= 0 & fa_3a_sr000002 < fa_3a_sr000001) then 
govbonds = (govbonds + (((fa_3a_sr000001 - fa_3a_sr000002)/2) + fa_3a_sr000002));
else if (fa_3a in(-1, -2, -4) & fa_3a_uab_b = 0) then govbonds = (govbonds + quartile1);
else if (fa_3a in(-1, -2, -4) & fa_3a_uab_b = 1) then govbonds = (govbonds + quartile2);
else if (fa_3a in(-1, -2, -4) & fa_3a_uab_c = 0) then govbonds = (govbonds + quartile3);
else if (fa_3a in(-1, -2, -4) & fa_3a_uab_c = 1) then govbonds = (govbonds + 85000);
else if (fa_3a_uab_a in(-1, -2) | fa_3a_uab_b in(-1, -2) | fa_3a_uab_c in(-1, -2)) then govbonds = -3;

/***************************************/
/* STOCK Component - mutual: */
/***************************************/

if (fa_4 = 1 & fa_4a_trunc >= 0) then mutual = (mutual + fa_4a_trunc);
else if (fa_4 = 1 & fa_4_ref_1 = 1 & fa_4a_sr000001 < 0 & fa_4a_sr000002 < 0 
& fa_4a_uab_a < 0 & fa_4a_uab_c < 0) then mutual = -1;
else if (fa_4 = 1 & fa_4a_trunc in(-1, -2) & (fa_4a_sr000001 < 0 | fa_4a_sr000002 < 0) 
& fa_4a_uab_a < 0 & fa_4a_uab_c < 0) then mutual = fa_4a_trunc;
else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 = fa_4a_sr000001) then 
mutual = (mutual + fa_4a_sr000001);
else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 > fa_4a_sr000001) then 
mutual = (mutual + (((fa_4a_sr000002 - fa_4a_sr000001)/2) + fa_4a_sr000001));
else if (fa_4a_sr000001 >= 0 & fa_4a_sr000002 >= 0 & fa_4a_sr000002 < fa_4a_sr000001) then 
mutual = (mutual + (((fa_4a_sr000001 - fa_4a_sr000002)/2) + fa_4a_sr000002));
else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_c = 0) then mutual = (mutual + quartile3);
else if (fa_4a_trunc in(-1, -2, -4) & fa_4a_uab_c = 1) then mutual = (mutual + 250000);
else if (fa_4a_uab_a in(-1, -2) | fa_4a_uab_c in(-1, -2)) then mutual = -3;

/*******************************************/
/* STOCK Component - lifeinsure: */
/*******************************************/

if (fa_5 = 1 & fa_5a_trunc >= 0) then lifeinsure = (lifeinsure + fa_5a_trunc);
else if (fa_5 = 1 & fa_5_ref_1 = 1 & fa_5a_sr000001 < 0 & fa_5a_sr000002_trunc < 0 
& fa_5a_uab_a < 0 & fa_5a_uab_b < 0 & fa_5a_uab_c < 0) then lifeinsure = -1;
else if (fa_5 = 1 & fa_5a_trunc in(-1, -2) & (fa_5a_sr000001 < 0 | fa_5a_sr000002_trunc < 0) 
& fa_5a_uab_a < 0 & fa_5a_uab_b < 0 & fa_5a_uab_c < 0) then lifeinsure = fa_5a_trunc;
else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002_trunc >= 0 & fa_5a_sr000002_trunc = fa_5a_sr000001) then 
lifeinsure = (lifeinsure + fa_5a_sr000001);
else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002_trunc >= 0 & fa_5a_sr000002_trunc > fa_5a_sr000001) then 
lifeinsure = (lifeinsure + (((fa_5a_sr000002_trunc - fa_5a_sr000001)/2) + fa_5a_sr000001));
else if (fa_5a_sr000001 >= 0 & fa_5a_sr000002_trunc >= 0 & fa_5a_sr000002_trunc < fa_5a_sr000001) then 
lifeinsure = (lifeinsure + (((fa_5a_sr000001 - fa_5a_sr000002_trunc)/2) + fa_5a_sr000002_trunc));
else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_b = 0) then lifeinsure = (lifeinsure + quartile1);
else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_b = 1) then lifeinsure = (lifeinsure + quartile2);
else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_c = 0) then lifeinsure = (lifeinsure + quartile3);
else if (fa_5a_trunc in(-1, -2, -4) & fa_5a_uab_c = 1) then lifeinsure = (lifeinsure + 100000);
else if (fa_5a_uab_a in(-1, -2) | fa_5a_uab_b in(-1, -2) | fa_5a_uab_c in(-1, -2)) then lifeinsure = -3;

/***************************************/
/* STOCK Component - shares: */
/***************************************/

if (fa_9 = 1 & fa_9a_trunc >= 0) then shares = (shares + fa_9a_trunc);
else if (fa_9 = 1 & fa_9_ref_1 = 1 & fa_9a_sr000001_trunc < 0 & fa_9a_sr000002 < 0 
& fa_9a_uab_a < 0 & fa_9a_uab_b < 0 & fa_9a_uab_c < 0) then shares = -1;
else if (fa_9 = 1 & fa_9a_trunc in(-1, -2) & (fa_9a_sr000001_trunc < 0 | fa_9a_sr000002 < 0) 
& fa_9a_uab_a < 0 & fa_9a_uab_b < 0 & fa_9a_uab_c < 0) then shares = fa_9a_trunc;
else if (fa_9a_sr000001_trunc >= 0 & fa_9a_sr000002 >= 0 & fa_9a_sr000002 = fa_9a_sr000001_trunc) then 
shares = (shares + fa_9a_sr000001_trunc);
else if (fa_9a_sr000001_trunc >= 0 & fa_9a_sr000002 >= 0 & fa_9a_sr000002 > fa_9a_sr000001_trunc) then 
shares = (shares + (((fa_9a_sr000002 - fa_9a_sr000001_trunc)/2) + fa_9a_sr000001_trunc));
else if (fa_9a_sr000001_trunc >= 0 & fa_9a_sr000002 >= 0 & fa_9a_sr000002 < fa_9a_sr000001_trunc) then 
shares = (shares + (((fa_9a_sr000001_trunc - fa_9a_sr000002)/2) + fa_9a_sr000002));
else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_b = 0) then shares = (shares + quartile1);
else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_b = 1) then shares = (shares + quartile2);
else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_c = 0) then shares = (shares + quartile3);
else if (fa_9a_trunc in(-1, -2, -4) & fa_9a_uab_c = 1) then shares = (shares + 200000);
else if (fa_9a_uab_a in(-1, -2) | fa_9a_uab_b in(-1, -2) | fa_9a_uab_c in(-1, -2)) then shares = -3;

/****************************************/
/* STOCK Component - corpbond: */
/****************************************/

if (fa_10 = 1 & fa_10a_trunc >= 0) then corpbond = (corpbond + fa_10a_trunc);
else if (fa_10 = 1 & fa_10_ref_1 = 1 & fa_10a_sr000001_trunc < 0 & fa_10a_sr000002_trunc < 0
& fa_10a_uab_a < 0 & fa_10a_uab_b < 0 & fa_10a_uab_c < 0) then corpbond = -1;
else if (fa_10 = 1 & fa_10a_trunc in(-1, -2) & (fa_10a_sr000001_trunc < 0 | fa_10a_sr000002_trunc < 0) 
& fa_10a_uab_a < 0 & fa_10a_uab_b < 0 & fa_10a_uab_c < 0) then corpbond = fa_10a_trunc;
else if (fa_10a_sr000001_trunc >= 0 & fa_10a_sr000002_trunc >= 0 & fa_10a_sr000002_trunc = fa_10a_sr000001_trunc) then 
corpbond = (corpbond + fa_10a_sr000001_trunc);
else if (fa_10a_sr000001_trunc >= 0 & fa_10a_sr000002_trunc >= 0 & fa_10a_sr000002_trunc > fa_10a_sr000001_trunc) then 
corpbond = (corpbond + (((fa_10a_sr000002_trunc - fa_10a_sr000001_trunc)/2) + fa_10a_sr000001_trunc));
else if (fa_10a_sr000001_trunc >= 0 & fa_10a_sr000002_trunc >= 0 & fa_10a_sr000002_trunc < fa_10a_sr000001_trunc) then 
corpbond = (corpbond + (((fa_10a_sr000001_trunc - fa_10a_sr000002_trunc)/2) + fa_10a_sr000002_trunc));
else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_b = 0) then corpbond = (corpbond + quartile1);
else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_b = 1) then corpbond = (corpbond + quartile2);
else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_c = 0) then corpbond = (corpbond + quartile3);
else if (fa_10a_trunc in(-1, -2, -4) & fa_10a_uab_c = 1) then corpbond = (corpbond + 200000);
else if (fa_10a_uab_a in(-1, -2) | fa_10a_uab_b in(-1, -2) | fa_10a_uab_c in(-1, -2)) then corpbond = -3;

/******************************************/
/* STOCK Component - moneyowedtor: */
/******************************************/

if (fa_11 = 1 & fa_11a >= 0) then moneyowedtor = (moneyowedtor + fa_11a);
else if (fa_11 = 1 & fa_11_ref_1 = 1 & fa_11a_sr000001 < 0 & fa_11a_sr000002 < 0 
& fa_11a_uab_a < 0 & fa_11a_uab_b < 0 & fa_11a_uab_c < 0) then moneyowedtor = -1;
else if (fa_11 = 1 & fa_11a in(-1, -2) & (fa_11a_sr000001 < 0 | fa_11a_sr000002 < 0) 
& fa_11a_uab_a < 0 & fa_11a_uab_b < 0 & fa_11a_uab_c < 0) then moneyowedtor = fa_11a;
else if (fa_11a_sr000001 >= 0 & fa_11a_sr000002 >= 0 & fa_11a_sr000002 = fa_11a_sr000001) then 
moneyowedtor = (moneyowedtor + fa_11a_sr000001);
else if (fa_11a_sr000001 >= 0 & fa_11a_sr000002 >= 0 & fa_11a_sr000002 > fa_11a_sr000001) then 
moneyowedtor = (moneyowedtor + (((fa_11a_sr000002 - fa_11a_sr000001)/2) + fa_11a_sr000001));
else if (fa_11a_sr000001 >= 0 & fa_11a_sr000002 >= 0 & fa_11a_sr000002 < fa_11a_sr000001) then 
moneyowedtor = (moneyowedtor + (((fa_11a_sr000001 - fa_11a_sr000002)/2) + fa_11a_sr000002));
else if (fa_11a in(-1, -2, -4) & fa_11a_uab_b = 0) then moneyowedtor = (moneyowedtor + quartile1);
else if (fa_11a in(-1, -2, -4) & fa_11a_uab_b = 1) then moneyowedtor = (moneyowedtor + quartile2);
else if (fa_11a in(-1, -2, -4) & fa_11a_uab_c = 0) then moneyowedtor = (moneyowedtor + quartile3);
else if (fa_11a in(-1, -2, -4) & fa_11a_uab_c = 1) then moneyowedtor = (moneyowedtor + 90000);
else if (fa_11a_uab_a in(-1, -2) | fa_11a_uab_b in(-1, -2) | fa_11a_uab_c in(-1, -2)) then moneyowedtor = -3;

/*******************************/
/* Add components STOCK */
/*******************************/

if (govbonds >= 0) then stockc = (stockc + govbonds); 
if (mutual >= 0) then stockc = (stockc + mutual);
if (lifeinsure >= 0) then stockc = (stockc + lifeinsure);
if (shares >= 0) then stockc = (stockc + shares);
if (corpbond >= 0) then stockc = (stockc + corpbond);
if (moneyowedtor >= 0) then stockc = (stockc + moneyowedtor);
if (govbonds in(-1, -2, -3)) then stockc = -3;
else if (mutual in(-1, -2, -3)) then stockc = -3;
else if (lifeinsure in(-1, -2, -3)) then stockc = -3;
else if (shares in(-1, -2, -3)) then stockc = -3;
else if (corpbond in(-1, -2, -3)) then stockc = -3;
else if (moneyowedtor in(-1, -2, -3)) then stockc = -3;


/****************************/
/* Compute HOME */
/****************************/

/**********************************/
/* HOME Component - home1: */
/**********************************/

if (nfa_1 = 1 & nfa_1a_trunc >= 0) then home1 = (home1 + nfa_1a_trunc);
else if (nfa_1 = 1 & nfa_1_ref_1 = 1 & nfa_1a_sr000001 < 0 & nfa_1a_sr000002 < 0 
& nfa_1a_uab_a < 0 & nfa_1a_uab_b < 0 & nfa_1a_uab_c < 0) then home1 = -1;
else if (nfa_1 = 1 & nfa_1a_trunc in(-1, -2) & (nfa_1a_sr000001 < 0 | nfa_1a_sr000002 < 0) 
& nfa_1a_uab_a < 0 & nfa_1a_uab_b < 0 & nfa_1a_uab_c < 0) then home1 = nfa_1a_trunc;
else if (nfa_1a_sr000001 >= 0 & nfa_1a_sr000002 >= 0 & nfa_1a_sr000002 = nfa_1a_sr000001) then 
home1 = (home1 + nfa_1a_sr000001);
else if (nfa_1a_sr000001 >= 0 & nfa_1a_sr000002 >= 0 & nfa_1a_sr000002 > nfa_1a_sr000001) then 
home1 = (home1 + (((nfa_1a_sr000002 - nfa_1a_sr000001)/2) + nfa_1a_sr000001));
else if (nfa_1a_sr000001 >= 0 & nfa_1a_sr000002 >= 0 & nfa_1a_sr000002 < nfa_1a_sr000001) then 
home1 = (home1 + (((nfa_1a_sr000001 - nfa_1a_sr000002)/2) + nfa_1a_sr000002));
else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_b = 0) then home1 = (home1 + quartile1);
else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_b = 1) then home1 = (home1 + quartile2);
else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_c = 0) then home1 = (home1 + quartile3);
else if (nfa_1a_trunc in(-1, -2, -4) & nfa_1a_uab_c = 1) then home1 = (home1 + 250000);
else if (nfa_1a_uab_a in(-1, -2) | nfa_1a_uab_b in(-1, -2) | nfa_1a_uab_c in(-1, -2)) then home1 = -3;

/************************************/
/* HOME Component - secondhome: */
/************************************/

if (nfa_2 = 1 & nfa_2a_trunc >= 0) then secondhome = (secondhome + nfa_2a_trunc);
else if (nfa_2 = 1 & nfa_2_ref_1 = 1 & nfa_2a_sr000001 < 0 & nfa_2a_sr000002 < 0 
& nfa_2a_uab_a < 0 & nfa_2a_uab_b < 0 & nfa_2a_uab_c < 0) then secondhome = -1;
else if (nfa_2 = 1 & nfa_2a_trunc in(-1, -2) & (nfa_2a_sr000001 < 0 | nfa_2a_sr000002 < 0) 
& nfa_2a_uab_a < 0 & nfa_2a_uab_b < 0 & nfa_2a_uab_c < 0) then secondhome = nfa_2a_trunc;
else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 = nfa_2a_sr000001) then 
secondhome = (secondhome + nfa_2a_sr000001);
else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 > nfa_2a_sr000001) then 
secondhome = (secondhome + (((nfa_2a_sr000002 - nfa_2a_sr000001)/2) + nfa_2a_sr000001));
else if (nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 >= 0 & nfa_2a_sr000002 < nfa_2a_sr000001) then 
secondhome = (secondhome + (((nfa_2a_sr000001 - nfa_2a_sr000002)/2) + nfa_2a_sr000002));
else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_b = 0) then secondhome = (secondhome + quartile1);
else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_b = 1) then secondhome = (secondhome + quartile2);
else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_c = 0) then secondhome = (secondhome + quartile3);
else if (nfa_2a_trunc in(-1, -2, -4) & nfa_2a_uab_c = 1) then secondhome = (secondhome + 200000);
else if (nfa_2a_uab_a in(-1, -2) | nfa_2a_uab_b in(-1, -2) | nfa_2a_uab_c in(-1, -2)) then secondhome = -3;

/*******************************/
/* Add components HOME */
/*******************************/

if (home1 >= 0) then homec = (homec + home1); 
if (secondhome >= 0) then homec = (homec + secondhome);
if (home1 in(-1, -2, -3)) then homec = -3;
else if (secondhome in(-1, -2, -3)) then homec = -3;


/****************************/
/* Compute MORT */
/****************************/

/*************************************/
/* MORT Component - mort1: */
/*************************************/

if (nfa_1b_trunc >= 0) then mort1 = (mort1 + nfa_1b_trunc);
else if (nfa_1b_ref_1 = 1 & nfa_1b_sr000001 < 0 & nfa_1b_sr000002 < 0 
& nfa_1b_uab_a < 0 & nfa_1b_uab_b < 0 & nfa_1b_uab_c < 0) then mort1 = -1;
else if (nfa_1b_trunc in(-1, -2) & (nfa_1b_sr000001 < 0 | nfa_1b_sr000002 < 0) 
& nfa_1b_uab_a < 0 & nfa_1b_uab_b < 0 & nfa_1b_uab_c < 0) then mort1 = nfa_1b_trunc;
else if (nfa_1b_sr000001 >= 0 & nfa_1b_sr000002 >= 0 & nfa_1b_sr000002 = nfa_1b_sr000001) then 
mort1 = (mort1 + nfa_1b_sr000001);
else if (nfa_1b_sr000001 >= 0 & nfa_1b_sr000002 >= 0 & nfa_1b_sr000002 > nfa_1b_sr000001) then 
mort1 = (mort1 + (((nfa_1b_sr000002 - nfa_1b_sr000001)/2) + nfa_1b_sr000001));
else if (nfa_1b_sr000001 >= 0 & nfa_1b_sr000002 >= 0 & nfa_1b_sr000002 < nfa_1b_sr000001) then 
mort1 = (mort1 + (((nfa_1b_sr000001 - nfa_1b_sr000002)/2) + nfa_1b_sr000002));
else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_b = 0) then mort1 = (mort1 + quartile1);
else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_b = 1) then mort1 = (mort1 + quartile2);
else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_c = 0) then mort1 = (mort1 + quartile3);
else if (nfa_1b_trunc in(-1, -2, -4) & nfa_1b_uab_c = 1) then mort1 = (mort1 + 125000);
else if (nfa_1b_uab_a in(-1, -2) | nfa_1b_uab_b in(-1, -2) | nfa_1b_uab_c in(-1, -2)) then mort1 = -3;


/*****************************************/
/* MORT Component - secondmort: */
/*****************************************/

if (nfa_2b_trunc >= 0) then secondmort = (secondmort + nfa_2b_trunc);
else if (nfa_2b_ref_1 = 1 & nfa_2b_sr000001 < 0 & nfa_2b_sr000002 < 0 
& nfa_2b_uab_a < 0 & nfa_2b_uab_b < 0 & nfa_2b_uab_c < 0) then secondmort = -1;
else if (nfa_2b_trunc in(-1, -2) & (nfa_2b_sr000001 < 0 | nfa_2b_sr000002 < 0) 
& nfa_2b_uab_a < 0 & nfa_2b_uab_b < 0 & nfa_2b_uab_c < 0) then secondmort = nfa_2b_trunc;
else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 = nfa_2b_sr000001) then 
secondmort = (secondmort + nfa_2b_sr000001);
else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 > nfa_2b_sr000001) then 
secondmort = (secondmort + (((nfa_2b_sr000002 - nfa_2b_sr000001)/2) + nfa_2b_sr000001));
else if (nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 >= 0 & nfa_2b_sr000002 < nfa_2b_sr000001) then 
secondmort = (secondmort + (((nfa_2b_sr000001 - nfa_2b_sr000002)/2) + nfa_2b_sr000002));
else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_b = 0) then secondmort = (secondmort + quartile1);
else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_b = 1) then secondmort = (secondmort + quartile2);
else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_c = 0) then secondmort = (secondmort + quartile3);
else if (nfa_2b_trunc in(-1, -2, -4) & nfa_2b_uab_c = 1) then secondmort = (secondmort + 135000);
else if (nfa_2b_uab_a in(-1, -2) | nfa_2b_uab_b in(-1, -2) | nfa_2b_uab_c in(-1, -2)) then secondmort = -3;

/*******************************/
/* Add components MORT */
/*******************************/

if (mort1 >= 0) then mortc = (mortc + mort1); 
if (secondmort >= 0) then mortc = (mortc + secondmort);
if (mort1 in(-1, -2, -3)) then mortc = -3;
else if (secondmort in(-1, -2, -3)) then mortc = -3;


/****************************/
/* Compute PDEBT */
/****************************/

/**************************************/
/* PDEBT Component - pdebt1: */
/**************************************/

if (nfa_1c >= 0) then pdebt1 = (pdebt1 + nfa_1c);
else if (nfa_1c_ref_1 = 1 & nfa_1c_sr000001 < 0 & nfa_1c_sr000002 < 0 
& nfa_1c_uab_a < 0 & nfa_1c_uab_b < 0 & nfa_1c_uab_c < 0) then pdebt1 = -1;
else if (nfa_1c in(-1, -2) & (nfa_1c_sr000001 < 0 | nfa_1c_sr000002 < 0) 
& nfa_1c_uab_a < 0 & nfa_1c_uab_b < 0 & nfa_1c_uab_c < 0) then pdebt1 = nfa_1c;
else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 = nfa_1c_sr000001) then 
pdebt1 = (pdebt1 + nfa_1c_sr000001);
else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 > nfa_1c_sr000001) then 
pdebt1 = (pdebt1 + (((nfa_1c_sr000002 - nfa_1c_sr000001)/2) + nfa_1c_sr000001));
else if (nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 >= 0 & nfa_1c_sr000002 < nfa_1c_sr000001) then 
pdebt1 = (pdebt1 + (((nfa_1c_sr000001 - nfa_1c_sr000002)/2) + nfa_1c_sr000002));
else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_b = 0) then pdebt1 = (pdebt1 + quartile1);
else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_b = 1) then pdebt1 = (pdebt1 + quartile2);
else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_c = 0) then pdebt1 = (pdebt1 + quartile3);
else if (nfa_1c in(-1, -2, -4) & nfa_1c_uab_c = 1) then pdebt1 = (pdebt1 + 55000);
else if (nfa_1c_uab_a in(-1, -2) | nfa_1c_uab_b in(-1, -2) | nfa_1c_uab_c in(-1, -2)) then pdebt1 = -3;

/*******************************************/
/* PDEBT Component - secondpdebt: */
/*******************************************/

if (nfa_2c >= 0) then secondpdebt = (secondpdebt + nfa_2c);
else if (nfa_2c_ref_1 = 1 & nfa_2c_sr000001 < 0 & nfa_2c_sr000002 < 0 
& nfa_2c_uab_a < 0 & nfa_2c_uab_b < 0 & nfa_2c_uab_c < 0) then secondpdebt = -1;
else if (nfa_2c in(-1, -2) & (nfa_2c_sr000001 < 0 | nfa_2c_sr000002 < 0) 
& nfa_2c_uab_a < 0 & nfa_2c_uab_b < 0 & nfa_2c_uab_c < 0) then secondpdebt = nfa_2c;
else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 = nfa_2c_sr000001) then 
secondpdebt = (secondpdebt + nfa_2c_sr000001);
else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 > nfa_2c_sr000001) then 
secondpdebt = (secondpdebt + (((nfa_2c_sr000002 - nfa_2c_sr000001)/2) + nfa_2c_sr000001));
else if (nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 >= 0 & nfa_2c_sr000002 < nfa_2c_sr000001) then 
secondpdebt = (secondpdebt + (((nfa_2c_sr000001 - nfa_2c_sr000002)/2) + nfa_2c_sr000002));
else if (nfa_2c in(-1, -2, -4) & nfa_2c_uab_b = 0) then secondpdebt = (secondpdebt + quartile1);
else if (nfa_2c in(-1, -2, -4) & nfa_2c_uab_b = 1) then secondpdebt = (secondpdebt + quartile2);
else if (nfa_2c in(-1, -2, -4) & nfa_2c_uab_c = 0) then secondpdebt = (secondpdebt + quartile3);
else if (nfa_2c in(-1, -2, -4) & nfa_2c_uab_c = 1) then secondpdebt = (secondpdebt + 47500);
else if (nfa_2c_uab_a in(-1, -2) | nfa_2c_uab_b in(-1, -2) | nfa_2c_uab_c in(-1, -2)) then secondpdebt = -3;

/*******************************/
/* Add components PDEBT */
/*******************************/

if (pdebt1 >= 0) then pdebtc = (pdebtc + pdebt1); 
if (secondpdebt >= 0) then pdebtc = (pdebtc + secondpdebt);
if (pdebt1 in(-1, -2, -3)) then pdebtc = -3;
else if (secondpdebt in(-1, -2, -3)) then pdebtc = -3;


/****************************/
/* Compute IRA */
/****************************/

/**********************************/
/* IRA Component - ira1: */
/**********************************/

if (fa_8 = 1 & fa_8d_trunc_01 >= 0) then ira1 = (ira1 + fa_8d_trunc_01);
else if (fa_8 = 1 & fa_8d_trunc_01 in(-1, -2) & (fa_8d_sr000001_01 < 0 | fa_8d_sr000002_01 < 0) 
& fa_8d_uab_a_01 < 0 & fa_8d_uab_b_01 < 0 & fa_8d_uab_c_01 < 0) then ira1 = fa_8d_trunc_01;
else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 >= 0 & fa_8d_sr000002_01 = fa_8d_sr000001_01) then 
ira1 = (ira1 + fa_8d_sr000001_01);
else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 >= 0 & fa_8d_sr000002_01 > fa_8d_sr000001_01) then 
ira1 = (ira1 + (((fa_8d_sr000002_01 - fa_8d_sr000001_01)/2) + fa_8d_sr000001_01));
else if (fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 >= 0 & fa_8d_sr000002_01 < fa_8d_sr000001_01) then 
ira1 = (ira1 + (((fa_8d_sr000001_01 - fa_8d_sr000002_01)/2) + fa_8d_sr000002_01));
else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_b_01 = 0) then ira1 = (ira1 + quartile1);
else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_b_01 = 1) then ira1 = (ira1 + quartile2);
else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_c_01 = 0) then ira1 = (ira1 + quartile3);
else if (fa_8d_trunc_01 in(-1, -2, -4) & fa_8d_uab_c_01 = 1) then ira1 = (ira1 + 200000);
else if (fa_8d_uab_a_01 in(-1, -2) | fa_8d_uab_b_01 in(-1, -2) | fa_8d_uab_c_01 in(-1, -2)) then ira1 = -3;

/*********************************/
/* IRA Component - ira2: */
/*********************************/

if (fa_8 = 1 & fa_8d_trunc_02 >= 0) then ira2 = (ira2 + fa_8d_trunc_02);
else if (fa_8 = 1 & fa_8d_trunc_02 in(-1, -2) & (fa_8d_sr000001_02 < 0 | fa_8d_sr000002_02 < 0) 
& fa_8d_uab_a_02 < 0 & fa_8d_uab_b_02 < 0 & fa_8d_uab_c_02 < 0) then ira2 = fa_8d_trunc_02;
else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 >= 0 & fa_8d_sr000002_02 = fa_8d_sr000001_02) then 
ira2 = (ira2 + fa_8d_sr000001_02);
else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 >= 0 & fa_8d_sr000002_02 > fa_8d_sr000001_02) then 
ira2 = (ira2 + (((fa_8d_sr000002_02 - fa_8d_sr000001_02)/2) + fa_8d_sr000001_02));
else if (fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 >= 0 & fa_8d_sr000002_02 < fa_8d_sr000001_02) then 
ira2 = (ira2 + (((fa_8d_sr000001_02 - fa_8d_sr000002_02)/2) + fa_8d_sr000002_02));
else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_b_02 = 0) then ira2 = (ira2 + quartile1);
else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_b_02 = 1) then ira2 = (ira2 + quartile2);
else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_c_02 = 0) then ira2 = (ira2 + quartile3);
else if (fa_8d_trunc_02 in(-1, -2, -4) & fa_8d_uab_c_02 = 1) then ira2 = (ira2 + 100000);
else if (fa_8d_uab_a_02 in(-1, -2) | fa_8d_uab_b_02 in(-1, -2) | fa_8d_uab_c_02 in(-1, -2)) then ira2 = -3;


/*********************************/
/* IRA Component - ira3: */
/*********************************/

if (fa_8 = 1 & fa_8d_03 >= 0) then ira3 = (ira3 + fa_8d_03);
else if (fa_8 = 1 & fa_8d_03 in(-1, -2) & fa_8d_uab_a_03 < 0 & fa_8d_uab_c_03 < 0) then ira3 = fa_8d_03;
else if (fa_8d_03 in(-1, -2, -4) & fa_8d_uab_c_03 = 0) then ira3 = (ira3 + quartile3);
else if (fa_8d_03 in(-1, -2, -4) & fa_8d_uab_c_03 = 1) then ira3 = (ira3 + 266000);
else if (fa_8d_uab_a_03 in(-1, -2) | fa_8d_uab_c_03 in(-1, -2)) then ira3 = -3;

/*********************************/
/* IRA Component - ira4: */
/*********************************/

if (fa_8 = 1 & fa_8d_trunc_04 >= 0) then ira4 = (ira4 + fa_8d_trunc_04);
else if (fa_8 = 1 & fa_8d_trunc_04 in(-1, -2) & fa_8d_uab_a_04 < 0) then ira4 = fa_8d_trunc_04;
else if (fa_8d_uab_a_04 in(-1, -2)) then ira4 = -3;

/*******************************/
/* IRA Component - ira5: */
/*******************************/

if (fa_8 = 1 & fa_8d_trunc_05 >= 0) then ira5 = (ira5 + fa_8d_trunc_05);
else if (fa_8 = 1 & fa_8d_trunc_05 in(-1, -2) & (fa_8d_sr000001_05 < 0 | fa_8d_sr000002_05 < 0) 
& fa_8d_uab_a_05 < 0 & fa_8d_uab_c_05 < 0) then ira5 = fa_8d_trunc_05;
else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 >= 0 & fa_8d_sr000002_05 = fa_8d_sr000001_05) then 
ira5 = (ira5 + fa_8d_sr000001_05);
else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 >= 0 & fa_8d_sr000002_05 > fa_8d_sr000001_05) then 
ira5 = (ira5 + (((fa_8d_sr000002_05 - fa_8d_sr000001_05)/2) + fa_8d_sr000001_05));
else if (fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 >= 0 & fa_8d_sr000002_05 < fa_8d_sr000001_05) then 
ira5 = (ira5 + (((fa_8d_sr000001_05 - fa_8d_sr000002_05)/2) + fa_8d_sr000002_05));
else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_c_05 = 0) then ira5 = (ira5 + quartile3);
else if (fa_8d_trunc_05 in(-1, -2, -4) & fa_8d_uab_c_05 = 1) then ira5 = (ira5 + 137000);
else if (fa_8d_uab_a_05 in(-1, -2) | fa_8d_uab_c_05 in(-1, -2)) then ira5 = -3;

/*********************************/
/* IRA Component - ira6: */
/*********************************/

if (fa_8 = 1 & fa_8d_06 >= 0) then ira6 = (ira6 + fa_8d_06);
else if (fa_8 = 1 & fa_8d_06 in(-1, -2) & (fa_8d_sr000001_06 < 0 | fa_8d_sr000002_06 < 0) 
& fa_8d_uab_a_06 < 0 & fa_8d_uab_b_06 < 0 & fa_8d_uab_c_06 < 0) then ira6 = fa_8d_06;
else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 >= 0 & fa_8d_sr000002_06 = fa_8d_sr000001_06) then 
ira6 = (ira6 + fa_8d_sr000001_06);
else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 >= 0 & fa_8d_sr000002_06 > fa_8d_sr000001_06) then 
ira6 = (ira6 + (((fa_8d_sr000002_06 - fa_8d_sr000001_06)/2) + fa_8d_sr000001_06));
else if (fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 >= 0 & fa_8d_sr000002_06 < fa_8d_sr000001_06) then 
ira6 = (ira6 + (((fa_8d_sr000001_06 - fa_8d_sr000002_06)/2) + fa_8d_sr000002_06));
else if (fa_8d_06 in(-1, -2, -4) & fa_8d_uab_b_06 = 0) then ira6 = (ira6 + quartile1);
else if (fa_8d_06 in(-1, -2, -4) & fa_8d_uab_b_06 = 1) then ira6 = (ira6 + quartile2);
else if (fa_8d_06 in(-1, -2, -4) & fa_8d_uab_c_06 = 0) then ira6 = (ira6 + quartile3);
else if (fa_8d_06 in(-1, -2, -4) & fa_8d_uab_c_06 = 1) then ira6 = (ira6 + 90977);
else if (fa_8d_uab_a_06 in(-1, -2) | fa_8d_uab_b_06 in(-1, -2) | fa_8d_uab_c_06 in(-1, -2)) then ira6 = -3;

/********************************/
/* IRA Component - ira7: */
/********************************/

if (fa_8 = 1 & fa_8d_trunc_07 >= 0) then ira7 = (ira7 + fa_8d_trunc_07);
else if (fa_8 = 1 & fa_8d_trunc_07 in(-1, -2) & (fa_8d_sr000001_07 < 0 | fa_8d_sr000002_07 < 0) 
& fa_8d_uab_a_07 < 0 & fa_8d_uab_c_07 < 0) then ira7 = fa_8d_trunc_07;
else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 >= 0 & fa_8d_sr000002_07 = fa_8d_sr000001_07) then 
ira7 = (ira7 + fa_8d_sr000001_07);
else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 >= 0 & fa_8d_sr000002_07 > fa_8d_sr000001_07) then 
ira7 = (ira7 + (((fa_8d_sr000002_07 - fa_8d_sr000001_07)/2) + fa_8d_sr000001_07));
else if (fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 >= 0 & fa_8d_sr000002_07 < fa_8d_sr000001_07) then 
ira7 = (ira7 + (((fa_8d_sr000001_07 - fa_8d_sr000002_07)/2) + fa_8d_sr000002_07));
else if (fa_8d_trunc_07 in(-1, -2, -4) & fa_8d_uab_c_07 = 0) then ira7 = (ira7 + quartile3);
else if (fa_8d_trunc_07 in(-1, -2, -4) & fa_8d_uab_c_07 = 1) then ira7 = (ira7 + 150000);
else if (fa_8d_uab_a_07 in(-1, -2) | fa_8d_uab_c_07 in(-1, -2)) then ira7 = -3;

/*******************************/
/* Add components IRA */
/*******************************/

if (ira1 >= 0) then irac = (irac + ira1); 
if (ira2 >= 0) then irac = (irac + ira2); 
if (ira3 >= 0) then irac = (irac + ira3); 
if (ira4 >= 0) then irac = (irac + ira4); 
if (ira5 >= 0) then irac = (irac + ira5); 
if (ira6 >= 0) then irac = (irac + ira6); 
if (ira7 >= 0) then irac = (irac + ira7); 
if (ira1 in(-1, -2, -3)) then irac = -3;
else if (ira2 in(-1, -2, -3)) then irac = -3;
else if (ira3 in(-1, -2, -3)) then irac = -3;
else if (ira4 in(-1, -2, -3)) then irac = -3;
else if (ira5 in(-1, -2, -3)) then irac = -3;
else if (ira6 in(-1, -2, -3)) then irac = -3;
else if (ira7 in(-1, -2, -3)) then irac = -3;


/****************************/
/* Compute A401K */
/****************************/

/***********************************/
/* A401K component - r_401k */
/***********************************/

if (fa_6b = 1 & fa_6e_trunc >= 0) then r_401k = (r_401k + fa_6e_trunc);
else if (fa_6b = 1 & fa_6e_ref_1 = 1 & fa_6e_sr000001 < 0 & fa_6e_sr000002 < 0 
& fa_6e_uab_a < 0 & fa_6e_uab_b < 0 & fa_6e_uab_c < 0) then r_401k = -1;
else if (fa_6e_trunc in(-1, -2) & (fa_6e_sr000001 < 0 | fa_6e_sr000002 < 0) 
& fa_6e_uab_a < 0 & fa_6e_uab_b < 0 & fa_6e_uab_c < 0) then r_401k = fa_6e_trunc;
else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 = fa_6e_sr000001) then 
r_401k = (r_401k + fa_6e_sr000001);
else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 > fa_6e_sr000001) then 
r_401k = (r_401k + (((fa_6e_sr000002 - fa_6e_sr000001)/2) + fa_6e_sr000001));
else if (fa_6e_sr000001 >= 0 & fa_6e_sr000002 >= 0 & fa_6e_sr000002 < fa_6e_sr000001) then 
r_401k = (r_401k + (((fa_6e_sr000001 - fa_6e_sr000002)/2) + fa_6e_sr000002));
else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_b = 0) then r_401k = (r_401k + quartile1);
else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_b = 1) then r_401k = (r_401k + quartile2);
else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_c = 0) then r_401k = (r_401k + quartile3);
else if (fa_6e_trunc in(-1, -2, -4) & fa_6e_uab_c = 1) then r_401k = (r_401k + 150000);
else if (fa_6e_uab_a in(-1, -2) | fa_6e_uab_b in(-1, -2) | fa_6e_uab_c in(-1, -2)) then r_401k = -3;


/*************************************/
/* A401K component - sp_401k */
/*************************************/

if (fa_7 = 1 & fa_7c_trunc >= 0) then sp_401k = (sp_401k + fa_7c_trunc);
else if (fa_7 = 1 & fa_7c_ref_1 = 1 & fa_7c_sr000001 < 0 & fa_7c_sr000002 < 0 
& fa_7c_uab_a < 0 & fa_7c_uab_b < 0 & fa_7c_uab_c < 0) then sp_401k = -1;
else if (fa_7c_trunc in(-1, -2) & (fa_7c_sr000001 < 0 | fa_7c_sr000002 < 0) 
& fa_7c_uab_a < 0 & fa_7c_uab_b < 0 & fa_7c_uab_c < 0) then sp_401k = fa_7c_trunc;
else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002 >= 0 & fa_7c_sr000002 = fa_7c_sr000001) then 
sp_401k = (sp_401k + fa_7c_sr000001);
else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002 >= 0 & fa_7c_sr000002 > fa_7c_sr000001) then 
sp_401k = (sp_401k + (((fa_7c_sr000002 - fa_7c_sr000001)/2) + fa_7c_sr000001));
else if (fa_7c_sr000001 >= 0 & fa_7c_sr000002 >= 0 & fa_7c_sr000002 < fa_7c_sr000001) then 
sp_401k = (sp_401k + (((fa_7c_sr000001 - fa_7c_sr000002)/2) + fa_7c_sr000002));
else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_b = 0) then sp_401k = (sp_401k + quartile1);
else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_b = 1) then sp_401k = (sp_401k + quartile2);
else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_c = 0) then sp_401k = (sp_401k + quartile3);
else if (fa_7c_trunc in(-1, -2, -4) & fa_7c_uab_c = 1) then sp_401k = (sp_401k + 160000);
else if (fa_7c_uab_a in(-1, -2) | fa_7c_uab_b in(-1, -2) | fa_7c_uab_c in(-1, -2)) then sp_401k = -3;


/*******************************/
/* Add components A401K */
/*******************************/

if (r_401k >= 0) then a401kc = (a401kc + r_401k); 
if (sp_401k >= 0) then a401kc = (a401kc + sp_401k); 
if (r_401k in(-1, -2, -3)) then a401kc = -3;
else if (sp_401k in(-1, -2, -3)) then a401kc = -3;


/****************************/
/* Compute CDEBT */
/****************************/
/**************************************************/
/* CDEBT Component - amtowe_assetpoorcars: */
/**************************************************/

if (sc_12b_trunc >= 0) then amtowe_assetpoorcars = (amtowe_assetpoorcars + sc_12b_trunc);
else if (sc_12b_trunc = 1 & sc_12b_ref_1a = 1 & sc_12b_sr000001 < 0 & sc_12b_sr000002 < 0) then amtowe_assetpoorcars = -1;
else if (sc_12b_trunc in(-1, -2) & (sc_12b_sr000001 < 0 | sc_12b_sr000002 < 0)) then amtowe_assetpoorcars = sc_12b_trunc;
else if (sc_12b_sr000001 >= 0 & sc_12b_sr000002 >= 0 & sc_12b_sr000002 = sc_12b_sr000001) then 
amtowe_assetpoorcars = (amtowe_assetpoorcars + sc_12b_sr000001);
else if (sc_12b_sr000001 >= 0 & sc_12b_sr000002 >= 0 & sc_12b_sr000002 > sc_12b_sr000001) then 
amtowe_assetpoorcars = (amtowe_assetpoorcars + (((sc_12b_sr000002 - sc_12b_sr000001)/2) + sc_12b_sr000001));
else if (sc_12b_sr000001 >= 0 & sc_12b_sr000002 >= 0 & sc_12b_sr000002 < sc_12b_sr000001) then 
amtowe_assetpoorcars = (amtowe_assetpoorcars + (((sc_12b_sr000001 - sc_12b_sr000002)/2) + sc_12b_sr000002));

/***********************************************/
/* CDEBT Component - amountowe_vehicles: */
/***********************************************/

if (nfa_4f_trunc >= 0) then amountowe_vehicles = (amountowe_vehicles + nfa_4f_trunc);
else if (nfa_4f_trunc in(-1, -2) & (nfa_4f_sr000001_trunc < 0 | nfa_4f_sr000002_trunc < 0) 
& nfa_4f_uab_a < 0 & nfa_4f_uab_b < 0 & nfa_4f_uab_c < 0) then amountowe_vehicles = nfa_4f_trunc;
else if (nfa_4f_sr000001_trunc >= 0 & nfa_4f_sr000002_trunc >= 0 & nfa_4f_sr000002_trunc = nfa_4f_sr000001_trunc) then 
amountowe_vehicles = (amountowe_vehicles + nfa_4f_sr000001_trunc);
else if (nfa_4f_sr000001_trunc >= 0 & nfa_4f_sr000002_trunc >= 0 & nfa_4f_sr000002_trunc > nfa_4f_sr000001_trunc) then 
amountowe_vehicles = (amountowe_vehicles + (((nfa_4f_sr000002_trunc - nfa_4f_sr000001_trunc)/2) + nfa_4f_sr000001_trunc));
else if (nfa_4f_sr000001_trunc >= 0 & nfa_4f_sr000002_trunc >= 0 & nfa_4f_sr000002_trunc < nfa_4f_sr000001_trunc) then 
amountowe_vehicles = (amountowe_vehicles + (((nfa_4f_sr000001_trunc - nfa_4f_sr000002_trunc)/2) + nfa_4f_sr000002_trunc));
else if (nfa_4f_trunc in(-1, -2, -4) & nfa_4f_uab_b = 0) then amountowe_vehicles = (amountowe_vehicles + quartile1);
else if (nfa_4f_trunc in(-1, -2, -4) & nfa_4f_uab_b = 1) then amountowe_vehicles = (amountowe_vehicles + quartile2);
else if (nfa_4f_trunc in(-1, -2, -4) & nfa_4f_uab_c = 0) then amountowe_vehicles = (amountowe_vehicles + quartile3);
else if (nfa_4f_trunc in(-1, -2, -4) & nfa_4f_uab_c = 1) then amountowe_vehicles = (amountowe_vehicles + 40000);
else if (nfa_4f_uab_a in(-1, -2) | nfa_4f_uab_b in(-1, -2) | nfa_4f_uab_c in(-1, -2)) then amtowe_vehicles1 = -3;

/*************************************************/
/* CDEBT Component - amtowe_othervehicles: */
/*************************************************/

if (nfa_5 = 1 & nfa_5b_trunc >= 0) then amtowe_othervehicles = (amtowe_othervehicles + nfa_5b_trunc);
else if (nfa_5 = 1 & nfa_5b_trunc in(-1, -2) & (nfa_5b_sr000001 < 0 | nfa_5b_sr000002 < 0)
& nfa_5b_uab_a < 0 & nfa_5b_uab_b < 0 & nfa_5b_uab_c < 0) then amtowe_othervehicles = nfa_5b_trunc;
else if (nfa_5b_sr000001 >= 0 & nfa_5b_sr000002 >= 0 & nfa_5b_sr000002 = nfa_5b_sr000001) then 
amtowe_othervehicles = (amtowe_othervehicles + nfa_5b_sr000001);
else if (nfa_5b_sr000001 >= 0 & nfa_5b_sr000002 >= 0 & nfa_5b_sr000002 > nfa_5b_sr000001) then 
amtowe_othervehicles = (amtowe_othervehicles + (((nfa_5b_sr000002 - nfa_5b_sr000001)/2) + nfa_5b_sr000001));
else if (nfa_5b_sr000001 >= 0 & nfa_5b_sr000002 >= 0 & nfa_5b_sr000002 < nfa_5b_sr000001) then 
amtowe_othervehicles = (amtowe_othervehicles + (((nfa_5b_sr000001 - nfa_5b_sr000002)/2) + nfa_5b_sr000002));
else if (nfa_5b_trunc in(-1, -2, -4) & nfa_5b_uab_b = 0) then amtowe_othervehicles = (amtowe_othervehicles + quartile1);
else if (nfa_5b_trunc in(-1, -2, -4) & nfa_5b_uab_b = 1) then amtowe_othervehicles = (amtowe_othervehicles + quartile2);
else if (nfa_5b_trunc in(-1, -2, -4) & nfa_5b_uab_c = 0) then amtowe_othervehicles = (amtowe_othervehicles + quartile3);
else if (nfa_5b_trunc in(-1, -2, -4) & nfa_5b_uab_c = 1) then amtowe_othervehicles = (amtowe_othervehicles + 50000);
else if (nfa_5b_uab_a in(-1, -2) | nfa_5b_uab_b in(-1, -2) | nfa_5b_uab_c in(-1, -2)) then amtowe_othervehicles = -3;


/*******************************/
/* Add components CDEBT */
/*******************************/

if (amtowe_assetpoorcars >= 0) then cdebtc = (cdebtc + amtowe_assetpoorcars); 
if (amountowe_vehicles >= 0) then cdebtc = (cdebtc + amountowe_vehicles); 
if (amtowe_othervehicles >= 0) then cdebtc = (cdebtc + amtowe_othervehicles);


if (amtowe_assetpoorcars in(-1, -2, -3)) then cdebtc = -3; 
else if (amountowe_vehicles in(-1, -2, -3)) then cdebtc = -3; 
else if (amtowe_othervehicles in(-1, -2, -3)) then cdebtc = -3;


/****************************/
/* Compute CAR */
/****************************/
/***********************************************/
/* CAR Component - mktval_assetpoorcars: */
/***********************************************/
if (sc_12a_trunc >= 0) then mktval_assetpoorcars = (mktval_assetpoorcars + sc_12a_trunc);
else if (sc_12a_trunc = 1 & sc_12a_ref_1a = 1 & sc_12a_sr000001 < 0 & sc_12a_sr000002 < 0 
& sc_12a_uab_a < 0 & sc_12a_uab_b < 0 ) then mktval_assetpoorcars = -1;
else if (sc_12a_trunc in(-1, -2) & (sc_12a_sr000001 < 0 | sc_12a_sr000002 < 0) 
& sc_12a_uab_a < 0 & sc_12a_uab_b < 0) then mktval_assetpoorcars = sc_12a_trunc;
else if (sc_12a_sr000001 >= 0 & sc_12a_sr000002 >= 0 & sc_12a_sr000002 = sc_12a_sr000001) then 
mktval_assetpoorcars = (mktval_assetpoorcars + sc_12a_sr000001);
else if (sc_12a_sr000001 >= 0 & sc_12a_sr000002 >= 0 & sc_12a_sr000002 > sc_12a_sr000001) then 
mktval_assetpoorcars = (mktval_assetpoorcars + (((sc_12a_sr000002 - sc_12a_sr000001)/2) + sc_12a_sr000001));
else if (sc_12a_sr000001 >= 0 & sc_12a_sr000002 >= 0 & sc_12a_sr000002 < sc_12a_sr000001) then 
mktval_assetpoorcars = (mktval_assetpoorcars + (((sc_12a_sr000001 - sc_12a_sr000002)/2) + sc_12a_sr000002));
else if (sc_12a_trunc in(-1, -2, -4) & sc_12a_uab_b = 0) then mktval_assetpoorcars = (mktval_assetpoorcars + quartile1);
else if (sc_12a_trunc in(-1, -2, -4) & sc_12a_uab_b = 1) then mktval_assetpoorcars = (mktval_assetpoorcars + quartile2);
else if (sc_12a_uab_a in(-1, -2) | sc_12a_uab_b in(-1, -2)) then mktval_assetpoorcars = -3;

/************************************************/
/* CAR Component - marketvalue_vehicles: */
/************************************************/

if (nfa_4c_trunc >= 0) then marketvalue_vehicles = (marketvalue_vehicles + nfa_4c_trunc);
else if (nfa_4c_trunc in(-1, -2) & (nfa_4c_sr000001 < 0 | nfa_4c_sr000002_trunc < 0) 
& nfa_4c_uab_a < 0 & nfa_4c_uab_b < 0 & nfa_4c_uab_c < 0) then marketvalue_vehicles = nfa_4c_trunc;
else if (nfa_4c_sr000001 >= 0 & nfa_4c_sr000002_trunc >= 0 & nfa_4c_sr000002_trunc = nfa_4c_sr000001) then 
marketvalue_vehicles = (marketvalue_vehicles + nfa_4c_sr000001);
else if (nfa_4c_sr000001 >= 0 & nfa_4c_sr000002_trunc >= 0 & nfa_4c_sr000002_trunc > nfa_4c_sr000001) then 
marketvalue_vehicles = (marketvalue_vehicles + (((nfa_4c_sr000002_trunc - nfa_4c_sr000001)/2) + nfa_4c_sr000001));
else if (nfa_4c_sr000001 >= 0 & nfa_4c_sr000002_trunc >= 0 & nfa_4c_sr000002_trunc < nfa_4c_sr000001) then 
marketvalue_vehicles = (marketvalue_vehicles + (((nfa_4c_sr000001 - nfa_4c_sr000002_trunc)/2) + nfa_4c_sr000002_trunc));
else if (nfa_4c_trunc in(-1, -2, -4) & nfa_4c_uab_b = 0) then marketvalue_vehicles = (marketvalue_vehicles + quartile1);
else if (nfa_4c_trunc in(-1, -2, -4) & nfa_4c_uab_b = 1) then marketvalue_vehicles = (marketvalue_vehicles + quartile2);
else if (nfa_4c_trunc in(-1, -2, -4) & nfa_4c_uab_c = 0) then marketvalue_vehicles = (marketvalue_vehicles + quartile3);
else if (nfa_4c_trunc in(-1, -2, -4) & nfa_4c_uab_c = 1) then marketvalue_vehicles = (marketvalue_vehicles + 50000);
else if (nfa_4c_uab_a in(-1, -2) | nfa_4c_uab_b in(-1, -2) | nfa_4c_uab_c in(-1, -2)) then marketvalue_vehicles = -3;

/***********************************************/
/* CAR Component - mktval_othervehicles: */
/***********************************************/

if (nfa_5 = 1 & nfa_5c_trunc >= 0) then mktval_othervehicles = (mktval_othervehicles + nfa_5c_trunc);
else if (nfa_5 = 1 & nfa_5c_ref_1 = 1 & nfa_5c_sr000001 < 0 & nfa_5c_sr000002 < 0
& nfa_5c_uab_a < 0 & nfa_5c_uab_b < 0 & nfa_5c_uab_c < 0) then mktval_othervehicles = -1;
else if (nfa_5 = 1 & nfa_5c_trunc in(-1, -2) & (nfa_5c_sr000001 < 0 | nfa_5c_sr000002 < 0)
& nfa_5c_uab_a < 0 & nfa_5c_uab_b < 0 & nfa_5c_uab_c < 0) then mktval_othervehicles = nfa_5c_trunc;
else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 = nfa_5c_sr000001) then 
mktval_othervehicles = (mktval_othervehicles + nfa_5c_sr000001);
else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 > nfa_5c_sr000001) then 
mktval_othervehicles = (mktval_othervehicles + (((nfa_5c_sr000002 - nfa_5c_sr000001)/2) + nfa_5c_sr000001));
else if (nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 >= 0 & nfa_5c_sr000002 < nfa_5c_sr000001) then 
mktval_othervehicles = (mktval_othervehicles + (((nfa_5c_sr000001 - nfa_5c_sr000002)/2) + nfa_5c_sr000002));
else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_b = 0) then mktval_othervehicles = (mktval_othervehicles + quartile1);
else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_b = 1) then mktval_othervehicles = (mktval_othervehicles + quartile2);
else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_c = 0) then mktval_othervehicles = (mktval_othervehicles + quartile3);
else if (nfa_5c_trunc in(-1, -2, -4) & nfa_5c_uab_c = 1) then mktval_othervehicles = (mktval_othervehicles + 60000);
else if (nfa_5c_uab_a in(-1, -2) | nfa_5c_uab_b in(-1, -2) | nfa_5c_uab_c in(-1, -2)) then mktval_othervehicles = -3;

/*******************************/
/* Add components CAR */
/*******************************/

if (mktval_assetpoorcars >= 0) then carc = (carc + mktval_assetpoorcars); 
if (marketvalue_vehicles >= 0) then carc = (carc + marketvalue_vehicles); 
if (mktval_othervehicles >= 0) then carc = (carc + mktval_othervehicles);

if (mktval_assetpoorcars in(-1, -2, -3)) then carc = -3; 
else if (marketvalue_vehicles in(-1, -2, -3)) then carc = -3; 
else if (mktval_othervehicles in(-1, -2, -3)) then carc = -3;


/****************************/
/* Compute NET_WORTH */
/****************************/
/************************************************************/
/* NET_WORTH - add components created in above code */
/************************************************************/

if (homec >= 0) then tnfw = (tnfw + homec );
if (mortc >= 0) then tnfw = (tnfw - mortc );
if (pdebtc >= 0) then tnfw = (tnfw - pdebtc);
if (cashc >= 0) then tnfw = (tnfw + cashc );
if (irac >= 0) then tnfw = (tnfw + irac );
if (a401kc >= 0) then tnfw = (tnfw + a401kc);
if (cdsc >= 0) then tnfw = (tnfw + cdsc );
if (stockc >= 0) then tnfw = (tnfw + stockc);
if (bizc >= 0) then tnfw = (tnfw + bizc );
if (bdebtc >= 0) then tnfw = (tnfw - bdebtc);
if (cdebtc >= 0) then tnfw = (tnfw - cdebtc);
if (carc >= 0) then tnfw = (tnfw + carc );
if (posesc >= 0) then tnfw = (tnfw + posesc);
if (odebtc >= 0) then tnfw = (tnfw - odebtc);

if (homec in(-1, -2, -3)) then tnfw = -3;
if (mortc in(-1, -2, -3)) then tnfw = -3;
if (pdebtc in(-1, -2, -3)) then tnfw = -3;
if (cashc in(-1, -2, -3)) then tnfw = -3;
if (irac in(-1, -2, -3)) then tnfw = -3;
if (a401kc in(-1, -2, -3)) then tnfw = -3;
if (cdsc in(-1, -2, -3)) then tnfw = -3;
if (stockc in(-1, -2, -3)) then tnfw = -3;
if (bizc in(-1, -2, -3)) then tnfw = -3;
if (bdebtc in(-1, -2, -3)) then tnfw = -3;
if (cdebtc in(-1, -2, -3)) then tnfw = -3;
if (carc in(-1, -2, -3)) then tnfw = -3;
if (posesc in(-1, -2, -3)) then tnfw = -3;
if (odebtc in(-1, -2, -3)) then tnfw = -3;

/************************************************/
/* Adjust for partially missing range estimates */
/************************************************/

if (tnfw ~= -3 & 
((((nfa_1a_sr000001 >= 0 & nfa_1a_sr000002 in(-1, -2)) | (nfa_1a_sr000001 in(-1, -2) & nfa_1a_sr000002 >= 0))
& nfa_1a_uab_a in(-1, -2, -3, -4) & nfa_1a_uab_b in(-1, -2, -3, -4) & nfa_1a_uab_c in(-1, -2, -3, -4))
| (((nfa_1b_sr000001 >= 0 & nfa_1b_sr000002 in(-1, -2)) | (nfa_1b_sr000001 in(-1, -2) & nfa_1b_sr000002 >= 0)) 
& nfa_1b_uab_a in(-1, -2, -3, -4) & nfa_1b_uab_b in(-1, -2, -3, -4) & nfa_1b_uab_c in(-1, -2, -3, -4))
| (((nfa_1c_sr000001 >= 0 & nfa_1c_sr000002 in(-1, -2)) | (nfa_1c_sr000001 in(-1, -2) & nfa_1c_sr000002 >= 0))
& nfa_1c_uab_a in(-1, -2, -3, -4) & nfa_1c_uab_b in(-1, -2, -3, -4) & nfa_1c_uab_c in(-1, -2, -3, -4))
| (((nfa_2a_sr000001 >= 0 & nfa_2a_sr000002 in(-1, -2)) | (nfa_2a_sr000001 in(-1, -2) & nfa_2a_sr000002 >= 0))
& nfa_2a_uab_a in(-1, -2, -3, -4) & nfa_2a_uab_b in(-1, -2, -3, -4) & nfa_2a_uab_c in(-1, -2, -3, -4))
| (((nfa_2b_sr000001 >= 0 & nfa_2b_sr000002 in(-1, -2)) | (nfa_2b_sr000001 in(-1, -2) & nfa_2b_sr000002 >= 0)) 
& nfa_2b_uab_a in(-1, -2, -3, -4) & nfa_2b_uab_b in(-1, -2, -3, -4) & nfa_2b_uab_c in(-1, -2, -3, -4))
| (((nfa_2c_sr000001 >= 0 & nfa_2c_sr000002 in(-1, -2)) | (nfa_2c_sr000001 in(-1, -2) & nfa_2c_sr000002 >= 0)) 
& nfa_2c_uab_a in(-1, -2, -3, -4) & nfa_2c_uab_b in(-1, -2, -3, -4) & nfa_2c_uab_c in(-1, -2, -3, -4))
| (((fa_1a_sr000001 >= 0 & fa_1a_sr000002 in(-1, -2)) | (fa_1a_sr000001 in(-1, -2) & fa_1a_sr000002 >= 0))
& fa_1a_uab_a in(-1, -2, -3, -4) & fa_1a_uab_b in(-1, -2, -3, -4) & fa_1a_uab_c in(-1, -2, -3, -4))
| (((fa_8d_sr000001_01 >= 0 & fa_8d_sr000002_01 in(-1, -2)) | (fa_8d_sr000001_01 in(-1, -2) & fa_8d_sr000002_01 >= 0))
& fa_8d_uab_a_01 in(-1, -2, -3, -4) & fa_8d_uab_b_01 in(-1, -2, -3, -4) & fa_8d_uab_c_01 in(-1, -2, -3, -4))
| (((fa_8d_sr000001_02 >= 0 & fa_8d_sr000002_02 in(-1, -2)) | (fa_8d_sr000001_02 in(-1, -2) & fa_8d_sr000002_02 >= 0)) 
& fa_8d_uab_a_02 in(-1, -2, -3, -4) & fa_8d_uab_b_02 in(-1, -2, -3, -4) & fa_8d_uab_c_02 in(-1, -2, -3, -4))
| (((fa_8d_sr000001_03 >= 0 & fa_8d_sr000002_03 in(-1, -2)) | (fa_8d_sr000001_03 in(-1, -2) & fa_8d_sr000002_03 >= 0)) 
& fa_8d_uab_a_03 in(-1, -2, -3, -4) & fa_8d_uab_c_03 in(-1, -2, -3, -4))
| (((fa_8d_sr000001_05 >= 0 & fa_8d_sr000002_05 in(-1, -2)) | (fa_8d_sr000001_05 in(-1, -2) & fa_8d_sr000002_05 >= 0)) 
& fa_8d_uab_a_05 in(-1, -2, -3, -4) & fa_8d_uab_c_05 in(-1, -2, -3, -4))
| (((fa_8d_sr000001_06 >= 0 & fa_8d_sr000002_06 in(-1, -2)) | (fa_8d_sr000001_06 in(-1, -2) & fa_8d_sr000002_06 >= 0)) 
& fa_8d_uab_a_06 in(-1, -2, -3, -4) & fa_8d_uab_b_06 in(-1, -2, -3, -4) & fa_8d_uab_c_06 in(-1, -2, -3, -4))
| (((fa_8d_sr000001_07 >= 0 & fa_8d_sr000002_07 in(-1, -2)) | (fa_8d_sr000001_07 in(-1, -2) & fa_8d_sr000002_07 >= 0)) 
& fa_8d_uab_a_07 in(-1, -2, -3, -4) & fa_8d_uab_c_07 in(-1, -2, -3, -4))
| (((fa_6e_sr000001 >= 0 & fa_6e_sr000002 in(-1, -2)) | (fa_6e_sr000001 in(-1, -2) & fa_6e_sr000002 >= 0))
& fa_6e_uab_a in(-1, -2, -3, -4) & fa_6e_uab_b in(-1, -2, -3, -4) & fa_6e_uab_c in(-1, -2, -3, -4))
| (((fa_7c_sr000001 >= 0 & fa_7c_sr000002 in(-1, -2)) | (fa_7c_sr000001 in(-1, -2) & fa_7c_sr000002 >= 0)) 
& fa_7c_uab_a in(-1, -2, -3, -4) & fa_7c_uab_b in(-1, -2, -3, -4) & fa_7c_uab_c in(-1, -2, -3, -4))
| (((fa_2a_sr000001 >= 0 & fa_2a_sr000002 in(-1, -2)) | (fa_2a_sr000001 in(-1, -2) & fa_2a_sr000002 >= 0)) 
& fa_2a_uab_a in(-1, -2, -3, -4) & fa_2a_uab_b in(-1, -2, -3, -4) & fa_2a_uab_c in(-1, -2, -3, -4))
| (((fa_3a_sr000001 >= 0 & fa_3a_sr000002 in(-1, -2)) | (fa_3a_sr000001 in(-1, -2) & fa_3a_sr000002 >= 0))
& fa_3a_uab_a in(-1, -2, -3, -4) & fa_3a_uab_b in(-1, -2, -3, -4) & fa_3a_uab_c in(-1, -2, -3, -4))
| (((fa_4a_sr000001 >= 0 & fa_4a_sr000002 in(-1, -2)) | (fa_4a_sr000001 in(-1, -2) & fa_4a_sr000002 >= 0))
& fa_4a_uab_a in(-1, -2, -3, -4) & fa_4a_uab_c in(-1, -2, -3, -4))
| (((fa_5a_sr000001 >= 0 & fa_5a_sr000002_trunc in(-1, -2)) | (fa_5a_sr000001 in(-1, -2) & fa_5a_sr000002_trunc >= 0))
& fa_5a_uab_a in(-1, -2, -3, -4) & fa_5a_uab_b in(-1, -2, -3, -4) & fa_5a_uab_c in(-1, -2, -3, -4))
| (((fa_9a_sr000001_trunc >= 0 & fa_9a_sr000002 in(-1, -2)) | (fa_9a_sr000001_trunc in(-1, -2) & fa_9a_sr000002 >= 0))
& fa_9a_uab_a in(-1, -2, -3, -4) & fa_9a_uab_b in(-1, -2, -3, -4) & fa_9a_uab_c in(-1, -2, -3, -4))
| (((fa_10a_sr000001_trunc >= 0 & fa_10a_sr000002_trunc in(-1, -2)) | (fa_10a_sr000001_trunc in(-1, -2) & fa_10a_sr000002_trunc >= 0))
& fa_10a_uab_a in(-1, -2, -3, -4) & fa_10a_uab_b in(-1, -2, -3, -4) & fa_10a_uab_c in(-1, -2, -3, -4))
| (((fa_11a_sr000001 >= 0 & fa_11a_sr000002 in(-1, -2)) | (fa_11a_sr000001 in(-1, -2) & fa_11a_sr000002 >= 0))
& fa_11a_uab_a in(-1, -2, -3, -4) & fa_11a_uab_b in(-1, -2, -3, -4) & fa_11a_uab_c in(-1, -2, -3, -4))
| (((q13_131_sr000001 >= 0 & q13_131_sr000002 in(-1, -2)) | (q13_131_sr000001 in(-1, -2) & q13_131_sr000002 >= 0))
& q13_131_uab_a in(-1, -2, -3, -4) & q13_131_uab_c in(-1, -2, -3, -4))
| (((q13_132_sr000001 >= 0 & q13_132_sr000002 in(-1, -2)) | (q13_132_sr000001 in(-1, -2) & q13_132_sr000002 >= 0))
& q13_132_uab_a in(-1, -2, -3, -4) & q13_132_uab_c in(-1, -2, -3, -4))
| (sc_12b_sr000001 >= 0 & sc_12b_sr000002 in(-1, -2)) | (sc_12b_sr000001 in(-1, -2) & sc_12b_sr000002 >= 0)
| (((nfa_4f_sr000001_trunc >= 0 & nfa_4f_sr000002_trunc in(-1, -2)) | (nfa_4f_sr000001_trunc in(-1, -2) & nfa_4f_sr000002_trunc >= 0))
& nfa_4f_uab_a in(-1, -2, -3, -4) & nfa_4f_uab_b in(-1, -2, -3, -4) & nfa_4f_uab_c in(-1, -2, -3, -4))
| (((sc_12a_sr000001 >= 0 & sc_12a_sr000002 in(-1, -2)) | (sc_12a_sr000001 in(-1, -2) & sc_12a_sr000002 >= 0))
& sc_12a_uab_a in(-1, -2, -3, -4) & sc_12a_uab_b in(-1, -2, -3, -4))
| (((nfa_4c_sr000001 >= 0 & nfa_4c_sr000002_trunc in(-1, -2)) | (nfa_4c_sr000001 in(-1, -2) & nfa_4c_sr000002_trunc >= 0))
& nfa_4c_uab_a in(-1, -2, -3, -4) & nfa_4c_uab_b in(-1, -2, -3, -4) & nfa_4c_uab_c in(-1, -2, -3, -4))
| (((nfa_5c_sr000001 >= 0 & nfa_5c_sr000002 in(-1, -2)) | (nfa_5c_sr000001 in(-1, -2) & nfa_5c_sr000002 >= 0))
& nfa_5c_uab_a in(-1, -2, -3, -4) & nfa_5c_uab_b in(-1, -2, -3, -4) & nfa_5c_uab_c in(-1, -2, -3, -4))
| (((nfa_6e_sr000001 >= 0 & nfa_6e_sr000002_trunc in(-1, -2)) | (nfa_6e_sr000001 in(-1, -2) & nfa_6e_sr000002_trunc >= 0))
& nfa_6e_uab_a in(-1, -2, -3, -4) & nfa_6e_uab_b in(-1, -2, -3, -4) & nfa_6e_uab_c in(-1, -2, -3, -4))))
then do;
tnfw = -3;
tnfw_trunc = -3;
end;


/*************************************************/
/* Apply Topcode to TNFW_TRUNC for 2020 */
/*************************************************/

if (tnfw_trunc > 5384000) then tnfw_trunc = 16449398;

tnfw_trunc = round(tnfw_trunc);

Asset and debt questions were first introduced in 1985. They were included in each survey through the 1990s, with the exception of 1991. Beginning in 2000, the assets module has been included in alternating rounds. These questions solicit information about specific categories of assets and debt. The 1985 survey included questions about ten categories. In subsequent years, these categories were expanded. Through the 1990s, the values for each category were collected with a single question per category. In 2000 and beyond, multiple values were collected with respect to some categories, providing some additional definition to those categories. For instance, questions about home value were expanded to include the value of a secondary residence as well. A single question on stocks/bonds/mutual funds/etc. was split to ask individually about stock values, bond values, mutual fund values, etc. Questions on business values and debts were expanded to establish sole or joint ownership of the business and percentage of the business that respondents owned if applicable.

In the 2000 and subsequent surveys, respondents were also given the opportunity to provide estimates for some values of which they were unsure or for which they refused to report a precise figure. Respondents had the opportunity to report values within a bounded range (reporting a low and high value) and/or to report values simply over or under certain amounts (see description of unfolding brackets earlier in the appendix), enabling a range to be established. These estimates were incorporated into the TNFW_TRUNC values where available. Questions containing the string “_SR000001” and “_SR000002” contain values for low- and high-bounded ranges respondents may have reported. Questions containing the string “UAB_A”, “UAB_B” and “UAB_C” contain responses to unfolding brackets if the respondent reported estimates in that manner.  The exception is 2000, the introductory year, when only a few questions (Q13-122, Q13-123C and Q13-125) were followed by unfolding brackets if necessary.

The categories of assets and debt are listed below, along with the survey year in which they were introduced.

  1. Home value (1985)
  2. Mortgages (1985)
  3. Other residential debt (1985)
  4. Value of farm/business/real estate (1985)
  5. Debts of farm/business/real estate  (1985)
  6. Market value of vehicles (1985)
  7. Debt of vehicles (1985)
  8. Value of stocks/bonds/mutual funds (1988)
  9. Value of CDs (1994)
  10. Value of trusts (1988–2000 only)
    • Note: Trusts were dropped in 2000 as few respondents reported being trust fund recipients.
  11. Value of IRAs (1994)
  12. Value of 401ks and 403bs (1994)
  13. Value of cash savings (1985)
  14. Value of other assets like jewelry/collections (1985)
  15. Value of all other debts like credit cards/student loans (1985)

Table 2 lists the reference numbers, question names and titles from the 1996 survey for each of the categories, and the imputed variable created for each category:

Table 2. Round 17 (1996) asset and debt variable categories
Asset/Debt Category
Note 2.1
R Number Root Question Name
Note 2.2
Variable Title
Q13-118_REVISED R57282.01 Q13-118 Mkt Val Res Property R-Sp Own 96
Q13-119 R57283.01 Q13-119 Amount R-Sp Owe On Res Property 96
Q13-120_REVISED R57284.01 Q13-120 Amt Oth Debt R-Sp Owes On Res Prop 96
Q13-122_REVISED R57286.01 Q13-122 Amount In Savings Accounts 96
Q13-123A_REVISED R57288.01 Q13-123A Amount In IRAs-Keough 96
Q13-123C_REVISED R57290.01 Q13-123C Amount In Tax-Defrd Plans 96
Q13-123E_REVISED R57292.01 Q13-123E Amount In CDs, Loans, Mortg 96
Q13-125_REVISED R57294.01 Q13-125 Mkt Val Of Stocks, Bonds R-Sp Have 96
Q13-127_REVISED R57296.01 Q13-127 Total Val Of Estate, Invest Trust 96
Q13-131_REVISED R57300.01 Q13-131 Ttl Mkt Val Farm, Bsns, Oth Prop? 96
Q13-132_REVISED R57301.01 Q13-132 Ttl Amt Debts, Liablty Farm, Bsns 96
Q13-135_REVISED R57304.01 Q13-135 Amt R-Sp Owe On Vehicles 96
Q13-136_REVISED R57305.01 Q13-136 Mkt Val Of Vehicles R-Sp Own 96
Q13-138_REVISED R57307.01 Q13-138 Ttl Mkt Val Items Over $500 96
Q13-140_REVISED R57309.01 Q13-140 Total Amt R-Sp Owe To Creditors 96

Note 2.1: Imputed variables were used to compute the older NET_WORTH_[YR], variables, but not the updated TNFW_TRUNC variables. These use the truncated versions of the variables in the question name column.

Note 2.2: Revised / truncated question names version used wherever available.

As an example, Table 3 lists the twelve variables used in 2004 to create the home value variable, as a component of "TNFW_TRUNC.”

Table 3. 2004 home value variables
R Number  Question Name  Variable Title
R83792.00 NFA_1A_TRUNC Mkt Val Res Property R/Sp Own 2004
R83793.00 NFA_1A_SR000001 Est Market Value Of Residential Property R/Spar Own
R83794.00 NFA_1A_SR000002 Est Market Value Of Residential Property R/Spar Own
R83795.00 NFA_1A_UAB_A Market Value Of Residence In 2003 More Than Entry Amount
R83795.10 NFA_1A_UAB_B Market Value Of Residence In 2003 More Than $5k
R83796.00 NFA_1A_UAB_C Market Value Of Residence In 2003 More Than $30k
R83814.00 NFA_2A_TRUNC Market Value of (2nd) Residential Property R/Spouse Own
R83814.00 NFA_2A_SR000001 Est Market Value Of (2nd) Residential Property R/Spar Own
R83815.00 NFA_2A_SR000002 Est Market Value Of (2nd) Residential Property R/Spar Own
R83816.00 NFA_2A_UAB_A Market Value Of (2nd) Residence In 2003 More Than Entry Amount
R83816.10 NFA_2A_UAB_B Market Value Of (2nd) Residence In 2003 More Than $5k
R83817.00 NFA_2A_UAB_C Market Value Of (2nd) Residence In 2003 More Than $30k

Table 4 lists the root variables included in the asset and debt categories starting with Round 21 (2004). While only the root question names are shown in Table 4, the additional bounded range and unfolding bracket estimate questions, shown in Table 3, are incorporated as well whenever applicable.

Table 4: Data underlying mid-level asset and debt categories used beginning in Round 21 (2004)
Asset/Debt Category R Number
Note 4.1
Root Question Name
Note 4.2
Description
Home/Residential Value R83792.00 NFA_1A Value of 1st Home
R83814.00 NFA_2A Value of 2nd Home/Time Share
Mortgage R83799.00 NFA_1B Mortgage on 1st Home
R83820.00 NFA_2B Mortgage on 2nd Home/Time Share
Property Debt R83808.00 NFA_1C Other Property Debt on 1st Home
R83827.00 NFA_2C Other Property Debt on 2nd Home/Time Share
Cash Savings R83630.00 FA_1A Total Amount In Checking, Savings, And Money Market Funds
Stocks/Bonds R83648.00 FA_3A Total Money If R-Spar Cashed In US Government Savings bonds
R83657.00 FA_4A Total Money If R-Spar Sold Mutual Funds
R83666.00 FA_5A Total Money If Insurance Policies Cashed
R83764.00 FA_9A Money R-Spar Have If Sold/Paid Amt Owe On Stock
R83773.00 FA_10A Amt Of $ If Cash/Pay Off Securities/ Bonds
R83782.00 FA_11A R-Spouse/Partner Owed Money From Personal Or Mortgage Loans
Trusts     These variables contain only -4s and -5s after survey year 2000, since the trust asset value questions were not asked. Because there was a chance the underlying questions would be brought back, the variables (all missing) are still present in several years after 2000 to preserve a consistent sequence.
Business Assets R83868.00 Q13-FJT-11.## Market Value Of Farm in 2003,
Excluding Crops Held Under Commodity Credit Loans
R83873.00 Q13-FJT-12B.## Percentage Of Farm Owned By R Or Spouse
R83896.00 Q13-BPPJT-11.## Market Value Of Business Professional Practice
R83904.00 Q13-BPPJT-12B.## Percentage Of Professional Practice That R Owns
R83907.00 Q13-BPPJT-12E.## Market Value Of R Share Of Professional Practice
R83927.00 Q13-REJT-11.## Market Value Of Additional Real Estate
R83932.00 Q13-REJT-12B.## Percentage Of Real Estate R-Spouse Own
R83936.00 Q13-REJT-12E.## Market Value Of R Share Of Real Estate
R83943.00 Q13-131 Total Market Value Of
Farm/Business/Other Property R/Spouse Own
Business Debt R83869.00 Q13-FJT-12.## Total Amount Of Debts Owed On Farm
R83900.00 Q13-BPPJT-12.## Total Amount Of Debts Owed
On Professional Practice
R83950.00 Q13-132 Total Amount Of Debts
On Farm/Business/Other Property R/Spouse Owe
Car Value R83979.00 NFA_4C.## Market Value Of Vehicle
R83611.00 SC_12A.01.## Current Value Of Vehicle
R84105.00 NFA_5C Market Value Of Other Personal Use Vehicles
CDs R83639.00 FA_2A Total Money If R-Spouse Cashed In
Certificate of Deposits/CDs
Car Debt R84080.00 NFA_4F.## Total Amount Owed By R-Spouse
On Vehicle After Last Car Payment
R84098.00 NFA_5B Total Amount Owed By R-Spar
On All Other Personal Use Vehicles
R83621.00 SC_12B.## Balance Owed On Vehicle
After Last Payment
Possessions R84116.00 NFA_6E Market Value Of Collections
Worth $1000 Or More
R84125.00 NFA_7D Market Value Of Individual R-Spouse Items
Worth $1000 Or More
Other Debt R84132.00 DEBT_1A Total Balance Owed
On All Credit Card Accounts Together
R84139.00 DEBT_2A Total Amount R-Spouse Owes
On Student Loans
R84147.00 DEBT_2D Total Amount Owed
On Student Loans For Children
R84154.00 DEBT_3A Total Amount R-Spouse Owes To Other Businesses
After Most Recent Payment
R84161.00 DEBT_4A Total Amount R-Spouse Owes Other Persons, Institutions, Companies to nearest $1000
IRAs R83733.00 FA_8D_TRUNC.## Total Money If Tax Advantage Account Cashed
401Ks R83683.00 FA_6E Total Value Of Emp-Sponsored Retiremt Plans
R83700.00 FA_7C Tot Balance Of Spar-Emp Sponsored Retiremt Plans

Note 4.1: The first Rnum is listed for sets of variables that fall in loops and have more than one occurrence.

Note 4.2: Truncated version used wherever it exists.

Researchers can find all the original respondent data (truncated where necessary) in the NLSY79 dataset in the NLS Investigator by searching the root qnames listed in the tables above.

NLSY79 Appendix 22: Migration Distance Variables for Respondent Locations

To support research on respondent mobility, we created a series of variables for the distance between respondent addresses at each interview round. This supplements the data on state and county of residence in the Geocode release. These variables are available only on the Geocode data release.

These confidential files are available for use only at the BLS National Office in Washington, DC, and at Federal Statistical Research Data Centers (FSRDCs) on statistical research projects approved by BLS. Access to data is subject to the availability of space and resources. Information about applying to use the zip code and Census tract data is available on the BLS Restricted Data Access page.

The distance between the respondent's addresses at each date of interview was created for all unique pairs of survey years with names in the form DISTANCE_DTyrA_yrB. (In order to avoid unnecessary duplication of variables these distance based variables are between years A and B only for A>B.) The data described here do not actually provide a location for the respondent's residence; these variables only provide distances between the various places the respondent lives. This pairwise matrix of variables enables various types of migration research by enabling users to consider the distance between residences and to identify return migration to an area where the respondent has lived in the past.

In addition to the set of distance variables, we created indicators of the quality of the geographic data. For a variety of reasons, we may not have an address for the respondent. In such cases we geocode the respondent to the centroid of the zipcode when we can determine the zipcode. To identify these cases, an indicator for the quality of this distance measure was created based on the quality of the matches in both years. This variable, DISTANCE_DFyrA_yrB takes a value of 1 if the addresses in both years were exact address matches, a value of 2 if one match was based on the zip centroid and the other was an exact address match, and a value of 3 if both were zip centroid matches.

Finally, DISTANCE_DZCyrA_yrB, an indicator for whether the respondent was located in the same zip code, was created for all pairs of years.

Data notes and variable construction

The large number of "Don't Know" values for 1979 and 1980 reflects the weakness of the address data for the 1980 wave due to 1980 addresses being missing at a high rate. The 1980 addresses were only recovered from the archives a few years ago and what we have represents considerable effort to re-constitute the historical record.

Respondent address data can be rather messy with some fields of an address either missing or incorrectly carried over from a previous round. The most reliable address components we have are the state and county of residence at each interview round. Archivists put considerable effort into examining conflicting pieces of evidence to arrive at the most reasonable judgment as to where the respondent lived at the time of the interview. Users should bear in mind that some respondents live in temporary quarters with friends, relatives or in a shelter, are working at remote locations where the employer supplies a place to stay, are homeless or living out of a car or choose not to say where they live. Some addresses are RFD, descriptive (at that trailer park just outside of town) or the respondent uses a PO Box, making it impossible to assign longitude and latitude to the address. Archivists consulted a variety of data resources in both the interview form and records from the field to make as accurate a determination as possible. For example, in years when landlines dominated telephony, area codes and exchanges provided reliable data on location as interviewers use the telephone heavily in setting appointments and, in some cases, conducting the interview over the phone.

These distance data were constructed in 2009. We proceeded under the assumption that any attempt to correct the existing state and county of residence many years after the original geocoding effort was more likely to degrade data quality than improve it. Hence the created distance variables are consistent with the state and county of residence data released in the various waves of the NLSY79 geocode data.

The major task was in placing the respondent at a particular location in the county so that we could compute distances. A corollary to this is that distance measures involving moves from one county to another, and especially one state to another, will likely contain error that are a relatively small fraction of the total distance moved. However, the major motivation of this effort is to provide the user with an indication of when a respondent moved back to a location that is relatively nearby one of their former addresses, signifying a return to a place where the respondent may have an existing network of contacts.

There are several caveats in using these data about which researchers should be aware.

  1. In years 1984-1989 address information was in principle collected only for individuals who had changed addresses since the date of the previous interview. The raw data from those years show fewer moves from year to year than at any other time during the project. We believe moves are understated in these years. As a consequence the created variables between pairs of years that include any year 1984-1989 likely understate the degree of mobility that occurred or incorrectly assigning mobility to a later date when address data were collected with greater rigor.
  2. The distance between a respondent's addresses in pairs of years is an imperfect proxy for whether the respondent ever moved between those years. There is a fair amount of return migration, and respondents may have experienced multiple, high frequency address changes and be located at the same address at the time of the two consecutive interviews despite having moved between interviews. It is possible to detect some of these interim moves from migration histories collected in selected survey years, but these moves are not represented in these data, which only deal with location at the date of interview.
  3. The frequency of moves between all possible pairs of years, A>B, is higher than it is between adjacent interview years. Consider two individuals with complete data over a 10-year window. There are up to 9 possible moves between consecutive interviews and 45 pairs of years. If individual 1 moves once between consecutive years or 10% of the time between consecutive years, his mean of moving over all year pairs is 20% (assuming the move is in the interior of the interval). If individual 2 moves 5 times or 50% of the time between consecutive years, his mean of moves between all pairs of years is 78%. By similar logic one long distance move will generate indications of many long distance years among all possible pairs of years.
  4. There have been changes over time in the FIPS (Federal Interagency Processing Standards) codes for some counties and county equivalents. In each round of data the state and county codes reflect the contemporaneous FIPS codes. In creating the distance based variables the changes in coding were reconciled. There are cases in which the FIPS codes are different across pairs of years but the change of address variable indicates that the respondent was located at the same address. That is, the distance moved variables we created will show no move whereas an examination of FIPS codes would suggest a move.
  5. Archivists were able to identify respondents' state and county of residence even in cases where the address data were insufficient to locate the residence more precisely within the county. In some cases we could locate the respondent in a zipcode and we used the zipcode centroid as the respondent location. In other cases, we could not generate the respondent's latitude and longitude if the zipcode was not determined. As a result, there are numerous cases in which the pairwise distance variables are missing but state and county variables are available in both years.
  6. For pairs of addresses within the same county, we reviewed addresses to determine whether what appeared to be different addresses were actually the same place but with differences in spelling or other minor errors that might lead to an address being put in a different location or treated as not translatable into latitude and longitude. For example, 126 USA Street and 126 USO Street may be the same place with a typographical error. We have made an effort to reconcile these differences, eliminating such false moves.

Because software packages that assign latitude and longitude to addresses have evolved over time and differ slightly among vendors, the same address can generate slightly different latitude and longitude based on variation in the software system. We have enforced matching coordinates for matching addresses based upon the presumption that geocoding software has seen a secular improvement so that more recently generated coordinates are most likely more reliable. When the same address generates different coordinates, we accept the more recent coordinates.

Click below to view programming code.


/**Variable Names in program           Variable Names in data release**/
dist_2022_&yra (1979-2022)             distance_d22_[survey year] (1979-2022)
dist_collapsed_2022_&yra (1979-2022)   distance_dt22_[survey year] (1979-2022) 
dist_type_2022_&yra (1979-2022)        distance_df22_[survey year] (1979- 2022) 
zip_changed_2022_&yra (1979-2022)      distance_dzc22_[survey year] (1979-2022)
/*----------------------------------------------------------------------*/
array rni  (i)     rni80-rni94 rni96 rni98 rni00 rni02 rni04 rni06 rni08 rni10 
rni12 rni14 rni16 rni18 rni20 rni22;
array nonint  (i)     nonint1980-nonint1994 nonint1996 nonint1998 nonint2000 
nonint2002 nonint2004 nonint2006 nonint2008 nonint2010 nonint2012 nonint2014 
nonint2016 nonint2018 nonint2020 nonint2022;
do over rni;
	if rni>=60 then nonint=1;
	else nonint=0;
end;
nonint1979=0;
*calculate distances;
%macro survey_y(yra);
    %if &yra < 2022 %then %do;
        latA = lat&yra;     
        latB = lat2022;
        longA = long&yra;
        longB = long2022;
        centrA = zip_centroid&yra;
        centrB = zip_centroid2022;
        
        if (latA ~= . and latB ~= .) then do;
            if latA = latB and longA = longB then do;
                dist = 0;
            end;
            else do;    
                latA  = latA  * 0.017453; 
                longA = longA * 0.017453;
                latB  = latB  * 0.017453;
                longB = longB * 0.017453;
                dlat = latB - latA;
                dlong = longB - longA;
                a1 = (sin(dlat/2))**2;
                a2 = cos(latA) * cos(latB) * ((sin(dlong/2))**2);
                a = a1 + a2;
                dist = 2.0 * 3963.0 * atan2( sqrt(a), sqrt(1-a) );
                dist = round(dist * 100)/100;
            end;
            
            if dist = 0 then dist_collapsed = 0;
            else if dist < 0.189393939 then dist_collapsed = 1;       
            else if dist < 1 then dist_collapsed = 2;
            else if dist < 5 then dist_collapsed = 3;
            else if dist < 20 then dist_collapsed = 4;
            else if dist < 50 then dist_collapsed = 5;                
            else if dist < 100 then dist_collapsed = 6;
            else if dist < 500 then dist_collapsed = 7;
            else if dist >=500 then dist_collapsed = 8;
                
            if latA ~= . and latB ~= . then do;
            	if centrA = 0 and centrB = 0 then dist_type = 1; 
            	else if centrA = 1 and centrB = 1 then dist_type = 3; 
            	else dist_type = 2; 
            end;
            
            dist_2022_&yra = dist;
            dist_collapsed_2022_&yra = dist_collapsed;
            dist_type_2022_&yra = dist_type; 
        end;
        
        if zip&yra = ' ' or zip2022 = ' ' then zip_changed = .;
        else if zip&yra = zip2022 & latA~=. & latB~=. then zip_changed=0;
        else if zip&yra ~= zip2022 & latA~=. & latB~=. then zip_changed=1;
        
        if latA ~= . and latB ~= .  then zip_changed_2022_&yra = zip_changed;
        else zip_changed_2022_&yra = .;
        
		if dist_2022_&yra=. and (nonint&yra=1 or nonint2022=1) then dist_2022_&yra=-5;
		if dist_collapsed_2022_&yra=. and (nonint&yra=1 or nonint2022=1) then dist_collapsed_2022_&yra=-5;
		if dist_type_2022_&yra=. and (nonint&yra=1 or nonint2022=1) then dist_type_2022_&yra=-5;
		if zip_changed_2022_&yra=. and (nonint&yra=1 or nonint2022=1) then zip_changed_2022_&yra=-5;
		
		if dist_2022_&yra=. then dist_2022_&yra=-4;
		if dist_collapsed_2022_&yra=. then dist_collapsed_2022_&yra=-4;
		if dist_type_2022_&yra=. then dist_type_2022_&yra=-4;
		if zip_changed_2022_&yra=. then zip_changed_2022_&yra=-4;
    %end; 
%mend;
%macro rd;
    %do yra = 1979 %to 1994;
        %survey_y(&yra);
    %end; 
    %do yra = 1996 %to 2020 %by 2;
        %survey_y(&yra);
    %end; 
%mend;
%rd;
run;

NLSY79 Appendix 20: Round 20 (2002) Early Bird and Income Recall Experiments

Two experiments were implemented with the round 20 (2002) survey. Each is described in more detail below.

Early Bird Experiment

The first experiment, called the "Early Bird Experiment," sought to encourage early participation in the survey and to save resources on later locating and conversion efforts. A group of over 2800 respondents who have been friendly and cooperative in round 19 (2000) were assigned to an "Early Bird" sample of respondents. These respondents were further assigned randomly to one of 12 replicates which were fielded sequentially at regular intervals. A toll-free telephone line was established, staffed with interviewers working remotely around the country.

An initial advance letter was sent to the respondents in each replicate as their replicate was to be activated for interviewing. They were offered a higher participation fee (randomly assigned $60/$80) if they called into the toll-free line to schedule an interview within a four week window. Respondents who had not contacted the toll-free line in the first two weeks of their initial letter were sent a reminder postcard. Respondents who did not contact the toll-free line to complete their interview by the time their Early Bird window expired reverted to a $40 standard fee.

Income Recall and Estimation Experiment

The second experiment was aimed at determining the most effective way for respondents to estimate income and asset amounts. This experiment was implemented in two stages.

First, a select group of historically cooperative respondents were asked to recall their own income and, if applicable, their spouse/partner's income for the calendar year 1999. These respondents were assigned randomly to one of three types of questions and asked to estimate his/her and/or his/her spouse/partner's 1999 income. The three types of questions are described below.

  • Unfolding brackets: This involves asking the respondent first if the amount is above a certain amount, and based on that response whether it would be above a second amount. This procedure establishes a loose range for the amount.
  • Estimate to the nearest $10,000: The respondent is asked to estimate the amount to the nearest $10,000.
  • Self-reported ranges: The respondent is asked to report an upper and lower range for the amount. The intent of this type of question is to have the respondent to narrow the possible range in his or her own mind.

In the second stage of this experiment, these three types of questions were included in the instrument following selected income questions. Respondents who answered either "don't know" or "refuse" to the exact income amount were asked to estimate the amount using one of the three types of questions, depending upon the type of questions to which they were pre-assigned.

The results from this experiment were analyzed to determine which yielded

  1. estimates of 1999 income that were closest to the actual amounts given in the 2000 interview;
  2. estimates of income that most closely coincided with income reports in previous interviews and;
  3. the method most successful in gaining income estimates from respondents who otherwise refuse to give such information. 

Users interested in obtaining the results of this analysis can request the report entitled "NLSY79 Income Experiment" (Aughinbaugh, Gardecki, 2003) by emailing NLS User Services.

NLSY79 Appendix 19: SF-12 Health Scale Scoring

The SF-12, which stands for short-form 12-question, is a brief inventory of self-reported mental and physical health. This scale was administered to respondents who had turned 40 since their last interview as part of the age 40+ Health Module, included in the 1998, 2000, 2002, 2004, and 2006 surveys, and in the 50+ Health Module administered in the 2008, 2010, 2012, 2014 and 2016 surveys. The 2018, 2020 and 2022 surveys contain the 60+ Health Module for respondents born in 1963 or 1964, as well as a small number of under-60 respondents in 2022 who had not previously been administered the 50+ module.

Rather than using the twelve questions separately, SF-12 users often create two summary scores:

  • PCS-12 or Physical Component Summary (measures physical health): question name H40-SF12_PCS_SCORE, H50-SF12_PCS_SCORE, H60-SF12_PCS_SCORE
  • MCS-12 or Mental Component Summary (measures mental health): question name H40-SF12_MCS_SCORE, H50-SF12_MCS_SCORE, H60-SF12_MCS_SCORE

CHRR has received permission to calculate these summary scores for NLSY79 respondents and release the scores with the main data set. Scores are created according to the manual by Ware, Kosinski, and Keller (1995) and are provided on the data set with the question names listed above. However, we are not permitted to release the scoring formula; interested users should visit the QualityMetric website for SF survey information. For users looking at the SF surveys on the Internet, note that the NLSY79 uses version 1, not version 2, of the survey.

In large national surveys of the entire US population, both the PCS-12 and MCS-12 have a mean of 50 and a standard deviation of 10. The interpretation of these two scores is straightforward. NLSY79 respondents with a score above 50 have better health than the typical person in the general U.S. population (age is not held constant). NLSY79 respondents with scores below 50 have worse health than the typical U.S. person. Each one-point difference above or below 50 corresponds to a one-tenth of a standard deviation. For example, a person with a score of 30 is two standard deviations away from the mean.

Table 1. Summary statistics for NLSY79 SF-12 scores
Survey Year PCS Score MCS Score
1998
40+ Health Module
Mean:52.54234
StDev:7.36181
Mean:53.09726
StDev:7.84907
2000
40+ Health Module
Mean:51.9258
StDev:8.3178
Mean:52.8005
StDev:8.7351
2002
40+ Health Module
Mean:51.8369
StDev:8.22884
Mean:52.9219
StDev:8.45037
2004
40+ Health Module
Mean:52.0493 
StDev:8.05267
Mean:52.9520 
StDev:8.39288
2006
40+ Health Module
Mean:51.2377
StDev:8.3259
Mean:53.0284
StDev:8.1516
2008
50+ Health Module
Mean:49.3411
StDev:10.1989
Mean:52.2461
StDev:8.9656
2010
50+ Health Module
Mean:48.9792
StDev:10.3186
Mean:52.9244
StDev:8.9174
2012
50+ Health Module
Mean:49.1479
StDev:10.1989
Mean:52.9057
StDev:9.1790
2014
50+ Health Module
Mean:48.9292
StDev:10.4001
Mean:53.2262
StDev:8.6177
2016
50+ Health Module
Mean:48.5636
StDev:11.7487
Mean:52.3556
StDev:10.6123
2018
50+ Health Module
Mean:48.9917
StDev:11.4059
Mean:53.8298
StDev:8.9462
2018
60+ Health Module
Mean:46.5358
StDev:11.4087
Mean:52.8598
StDev:8.7285
2020
60+ Health Module
Mean:45.1580
StDev:12.9898
Mean:52.0627
StDev:10.7300
2022
60+ Health Module
Mean:46.0572
StDev: 11.5745
Mean:53.0388
StDev: 9.2205

As Table 1 indicates, the typical NLSY79 respondent self-reports better health than the typical U.S. respondent while in their 40s. This matches the results described in the SF-12 scoring manual, which in addition to population norms reports the norms for U.S. residents in specific age ranges.

Table 2. Physical Component Summary (PCS) means and standard deviations by age range
Age Range Mean Standard Deviation
35-44 52.18 7.30
45-54 49.71 9.5
55-64 46.55 10.63
65-74 43.65 11.02
Table 3. Mental Component Summary (MCS) means and standard deviations by age range
Age Range Mean Standard Deviation
35-44 50.1 8.62
45-54 50.45 9.55
55-64 50.57 9.82
65-74 52.10 9.53

NLSY79 respondents in 2008 have higher MCS scores than the overall population and similar PCS scores.

Overall, the SF-12 manual shows higher-than-average physical scores prior to age 55 and rapidly falling scores after that age. Mental scores do not appear to decline with age. Information from the NLSY79 40+, 50+, and 60+ Health Modules appears to match this pattern.

Reference

Ware, John, Mark Kosinski and Susan Keller. 1995. SF-12: How to Score the SF-12 Physical and Mental Health Summary Scales, 2nd edition. Boston: The Health Institute, New England Medical Center.

Subscribe to NLSY79