Appendix B - Recodes for Creating Expanded Person Variables
Note: See Codebook, Section D
*-------------------------------------------------------------------*
| APPENDX.SAS: A merge that adds variables to the child/other |
| household member records, including whether the child |
| provided help with each of the six ADLs, with IADLs, or |
| money management, whether child provides help with paying |
| for medical expenses, whether the child is included |
| in the will(s) of parents, whether the child has received |
| financial assistance of various types. Information |
| is taken from all four files. |
| |
| |
| This setup combines variables about household members with |
| those about non-coresident children when appropriate. The |
| revised variables are as follows: |
| |
| RELATE_F, Relationship to female respondent |
| RELATE_M, Relationship to male respondent |
| - replace V418, V421, V443, and V445 |
| SEXP, Sex of child/other household member |
| - replaces V417 and V422 |
| AGEP, Age of child/other household member |
| - replaces V422 and V446/V447 |
| EDUCP, Education of child/other household member |
| - replaces V423 and V449 |
| MARSTATP, Marital status of child/other household member |
| - replaces V419 and V444 |
| NUMKIDSP, Number of children of child/other household |
| member |
| - replaces V429 and V450 |
| AGESPP, Age of spouse of child/other household |
| member |
| - replaces V487 and V459 |
| EDUCSPP, Education of spouse of child/other household |
| member |
| - replaces V430 and V460 |
| WORKP, Work status of child/other household member |
| - replaces V480 and V451 |
| WORKSPP, Work status of spouse of child/other household |
| member |
| - replaces V488 and V461 |
| V481C, MD category for D11, household member earnings |
| - replaces V483, V484, and V485 |
| V489C, MD category for D18, earnings of the spouse of |
| of other household member |
| - replaces V491, V492, and |
| V458C, category for D30-D32, household earnings for |
| child living elsewhere |
| - replaces V456, V457, and V458 |
| |
| |
| The following variables are created based on the respondents' |
| reports of who (if anyone) helps them with ADLs and IADLs. |
| Separate variables indicate help provided by the child or |
| other household member to a female and to a male respondent. |
| For children not co-residing with the respondent, the help |
| may be given by the child him- or herself, OR by his or her |
| spouse, OR by one of his or her children (i.e., by a |
| grandchild of the respondent). For other household members, |
| the help may be given by either spouse in a couple, but |
| help by their children (i.e., by grandchildren of the |
| respondent) cannot always be identified accurately. |
| First, variables are created for each of six ADLs, with any |
| of four IADLs, and with managing money: |
| |
| - V775HF, Help to female R with walking |
| - V775HM, Help to male R with walking |
| - V783HF, Help to female R with bathing |
| - V783HM, Help to male R with bathing |
| - V791HF, Help to female R with dressing |
| - V791HM, Help to male R with dressing |
| - V799HF, Help to female R with eating |
| - V799HM, Help to male R with eating |
| - V805HF, Help to female R with getting in/out of bed |
| - V805HM, Help to male R with getting in/out of bed |
| - V823HF, Help to female R with toileting |
| - V823HM, Help to male R with toileting |
| - V913HF, First helper with IADLs for female R |
| - V913HM, First helper with IADLs for male R |
| - V924HF, Second helper with IADLs for female R |
| - V924HM, Second helper with IADLs for male R |
| - V950HF, Help to female R with managing money |
| - V950HM, Help to male R with managing money |
| |
| There are also counts for the number of ADLs and total ADLs |
| plus IADLs for which help is given. In addition to the |
| separate counts for female and male respondents there are |
| also variables that combine the counts from both |
| respondents, in the case of couples: |
| |
| - ADLHELPF, Number of ADLs with which female respondent |
| is helped by the child/other household member |
| - ADLHELPM, Number of ADLs with which male respondent |
| is helped by the child/other household member |
| - ADLHELPT, Number of ADLs with which any respondent |
| is helped by the child/other household member |
| - IADLHLPF, Whether the child/hh member helps the female |
| respondent with any of four IADLs |
| - IADLHLPM, Whether the child/hh member helps the male |
| respondent with any of four IADLs |
| - IADLHLPT, Whether the child/hh member helps any |
| respondent with any of four IADLs |
| - ALLHELPF, Sum of ADLHELPF + IADLHLPF + V950HF, so |
| whether child/other household member provides any type |
| of help to female R |
| - ALLHELPM, Sum of ADLHELPM + IADLHLPM + V950HM, so |
| whether child/other household member provides any type |
| of help to male R |
| - ALLHELPT, Sum of ADLHELPT + IADLHLPT + V950HT, so |
| whether child/other household member provides any type |
| of help to any R |
| Then there is a summary variable that describes who provides |
| help to both male and female respondents: |
| |
| - WHOHELPT, where each digit before the decimal specifies |
| a helper for a male respondent, and each digit AFTER the |
| decimal specifies a helper for a female respondent. |
| The digits correspond to the codes for the variable |
| RELATEP -- that is, "1" indicates the child him- or |
| herself, "2" indicates the spouse of the child, and |
| "3" or "4" indicates a child of the child. |
| |
| The following variables accumulate information about the |
| amount of time spent helping the respondent(s), whether |
| they are paid for that help and if so whether Medicare |
| helps pay, and the amount paid, accumulating across |
| helpers associated with each child/other hh member. |
| |
| - TIMEHELP, total time spent helping either R, per week |
| - MDTIMEHL, count of helpers for which time per week is |
| missing |
| - PAIDHELP, count of helpers who are paid for their help |
| - MEDCHELP, count of paid helpers for which Medicare pays |
| part or all of the amount |
| - DLLRHELP, total amount paid per month |
| - MDDLLRHL, count of helpers for which amount paid is |
| missing |
| - G100HELP, whether paid at least $100 per month |
| |
| Respondents who did not report any helpers were asked if |
| there is anyone who would be willing and able to provide |
| help with ADLs if needed in the future. |
| |
| - FUTURHLF, whether the child (or spouse or child) |
| is named by the female R as someone who would be |
| willing and able to provide help her (or her husband) |
| with ADLs if needed |
| - FUTURHLM, whether the child (or spouse or child) |
| is named by the male R as someone who would be |
| willing and able to provide help him (or his wife) |
| with ADLs if needed |
| - FUTURHLT, whether the child (or spouse or child) |
| is named by the either R as someone who would be |
| willing and able to provide help that respondent |
| (or spouse) with ADLs if needed |
| |
| The following variables are based on information from all |
| respondents: |
| |
| - MOVENRF, whether this child is named by female respondent |
| as the one she would move in with or closer to, if |
| that respondent thinks the probability of moving in |
| the next five years is at least 30% and, if she does |
| move, that she will try to move in with, or closer to, |
| one of her children |
| - MOVENRM, whether this child is named by male respondent |
| as the one he would move in with or closer to, if |
| that respondent thinks the probability of moving in |
| the next five years is at least 30% and, if he does |
| move, that he will try to move in with, or closer to, |
| one of his children |
| - WILLBENF, whether this child is named by female respondent|
| as a beneficiary in her will |
| - WILLBENM, whether this child is named by male respondent |
| as a beneficiary in his will |
| |
| The following variables are based on information from an only |
| or lead respondent about assistance given TO the child BY |
| the respondent(s): |
| |
| - HELPDEED, whether the parent(s) have ever given the |
| child a deed to a house |
| - HELP10YR, whether the parent(s) have given the child |
| $5000 or more in the last ten years |
| - HELP1YR, whether the parent(s) have given the child |
| $500 or more in the last twelve months ("), and if so: |
| - HELP1YRD, how much |
| - HELP1YRX, how much, imputing means for unfolding brackets |
| - CHLDCARE, whether the parent(s) have cared for a |
| grandchild -- a child of this child -- for a year |
| or longer |
| |
| The following variables are based on information from an only |
| or financial respondent: |
| |
| - DEEDHOME, whether the name of the child (or child of |
| the child) is on the deed or title to the home in |
| owned by the respondent(s) |
| - OWNRHOME, whether the child (or child of the child) |
| owns the home in which the respondent(s) live |
| |
| The following variables are based on information from an only |
| or financial respondent about assistance given BY the |
| child TO the respondent(s) |
| |
| - GIVEMEDI, whether or not the child, or the child's |
| spouse or children, have helped the parent(s) pay for |
| health care costs in the last 12 months, and if so: |
| - GIVEMEDD, how much that help amounted to |
| Note that if the respondent named multiple donors, |
| the total amount is divided by the number named |
| - GIVEFIN, whether or not the child, or the child's |
| spouse or children, gave $500 or more to the |
| respondent(s) in the previous calendar year |
| - GIVEFIND, the amount given last year, in Dollars |
| - GIVEFINC, category of amount given, open-ended (=0) or |
| unfolding (=1-8) or multiple amounts (=9) |
| - GIVEFINX, the amount given last year, in Dollars, with |
| means of bracketed amounts imputed if the dollar |
| amount was not given (see V1606C and V1606X, etc.) |
| - GIVENOW, whether the child also has given money this |
| calendar year |
| - GIVEFUT, whether the respondent thinks of this as income |
| s/he can count on in the future |
| - ADVISE_R, whether the parent(s) ask the child for help |
| in making major decisions |
| |
| The following variables are based on information from an only |
| or financial respondent about life insurance carried by |
| either that respondent or by his or her spouse. There are |
| four sets of three variables, according to whether the policy |
| is on the life of a Female or Male, and is Term or Whole: |
| |
| - BENETIF, whether the child is named as a beneficiary |
| of a term life insurance policy by an unmarried female |
| respondent, or by the wife in a married couple, and |
| if so: |
| - FVALTIF, the face value of that policy, and |
| - PREMTIF, the annual premium on that policy |
| In generating the above two variables, I took crude |
| account of the fact that in some cases there were |
| multiple people named as beneficiaries, allocating |
| a fraction of the total premium to the individual |
| beneficiary, assuming all beneficiaries get equal |
| amounts and allocating the same fraction of the |
| annual premium to each beneficiary. If the respondent |
| said that the beneficiaries are "all my children," I |
| counted only the female's children, assuming that is |
| more likely what was meant in the case of second |
| marriages where each respondent had children from |
| previous marriages. |
| |
| The remaining sets of insurance variables have names of the |
| following form: |
| |
| - xxxxTIM, for term insurance on the life of a male |
| - xxxxWIF, for cash-value insurance on the life of a female |
| - xxxxWIM, for cash-value insurance on the life of a male |
| |
| Finally, respondents who were asked Module 7 answered three |
| questions about whether they got assistance or advice |
| from anyone about financial affairs and making decisions, |
| and if so if any of their children do so. |
| |
| - V2195F, whether the child helps with managing day-to-day |
| financial affairs according to a female respondent |
| - V2195M, whether the child helps with managing day-to-day |
| financial affairs according to a male respondent |
| - V2198F, whether the child helps with managing the money |
| according to a female respondent |
| - V2198M, whether the child helps with managing the money |
| according to a male respondent |
| - V2201F, whether the child would be asked for advice |
| on financial matters, according to a female respondent |
| - V2201M, whether the child would be asked for advice |
| on financial matters, according to a male respondent |
*-------------------------------------------------------------------*;
libname AHEAD1 'V:\soc3\ahead\DATA\GAMMA ';
title 'APPENDX: Add variables from other files to PERSON file';
options ps=64 ls=72 pageno=1;
*
**
*** The first file management step is to pull variables from the
*** respondent-level file and add them to the household-level
*** file. This follows the pattern of EXAMPLE3, creating two
*** sets of respondent variables: one for female respondents,
*** the second for male respondents.
**
;
data hhfile1;
merge AHEAD1.AHGHH(keep=HHID ID1 V474A1 -- V474A10 V479A1 -- V479A10
V495 V499 V499C V499X V507 V508 V508C V508X V519 V520 V520C
V520X
V526 V527 V527C V527X V537 V538 V538C V538X V549 V748A1 --
V748A10
V749 V1107A1 -- V1107A10 V1151A1 -- V1151A8 V1603 V1606 V1606C
V1606X V1611 V1612 V1615 V1618 V1618C V1618X V1623 V1624 V1627
V1630 V1630C V1630X V1635 V1636 v1885
V1887 -- V1889 V1890A2
V1890A3 V1891A1 -- V1891A10 V1893 V1895 -- V1897 V1898A2
V1898A3
V1899A1 -- V1899A10 V1901 V1903 -- V1905 V1906A2 V1906A3
V1907A1 -- V1907A10 V1909 V1912 V1913 V1914 V1915A2 V1915A3
V1916A1 -- V1916A10 V1920A1 -- V1920A10 wthhpop wthhnorm)
AHEAD1.AHGRC(keep=HHID ID SEX TYPE V775 V783 V791 V799 V805 V823
V913
V924 V950 V1010 V1294A1 -- V1294A10 V1693A1 -- V1693A10
V2148 V2195 V2198 V2201);
by HHID;
array resp[*] ID V775 V783 V791 V799 V805 V823 V913 V924 V950 V1010
V1294A1 -- V1294A10 V1693A1 -- V1693A10 V2148 V2195 V2198
V2201;
numvars = dim(resp);
array spvar[500] _temporary_;
array respf[*] IDF V775F V783F V791F V799F V805F V823F
V913F V924F V950F V1010F
V1294A1F V1294A2F V1294A3F V1294A4F V1294A5F V1294A6F V1294A7F
V1294A8F V1294A9F V1294AXF V1693A1F V1693A2F V1693A3F V1693A4F
V1693A5F V1693A6F V1693A7F V1693A8F V1693A9F V1693AXF module7f
V2195F V2198F V2201F;
array respm[*] IDM V775M V783M V791M V799M V805M V823M
V913M V924M V950M V1010M
V1294A1M V1294A2M V1294A3M V1294A4M V1294A5M V1294A6M V1294A7M
V1294A8M V1294A9M V1294AXM V1693A1M V1693A2M V1693A3M V1693A4M
V1693A5M V1693A6M V1693A7M V1693A8M V1693A9M V1693AXM module7m
V2195M V2198M V2201M;
drop i numvars ID ID1 SEX TYPE V775 V783 V791 V799 V805 V823 V913
V924 V950 V1010 V1294A1 -- V1294A10 V1693A1 -- V1693A10 V2148
V2195 V2198 V2201;
do i=1 to numvars;
spvar[i] = lag(resp[i]);
end;
*
**
*** Note that "finrsex" and "famrsex" are indicators of the gender of
*** the respondents who supplied the financial and family
information
*** about married couples, since some of the questions about
children
*** were asked in terms of the relationship of the child to "you"
and
*** to "your spouse."
**
;
if first.HHID and last.HHID then do;
finrsex = SEX;
if SEX eq 1 then do i=1 to numvars;
respm[i] = resp[i];
respf[i] = .;
end;
else do i=1 to numvars;
respm[i] = .;
respf[i] = resp[i];
end;
end;
else if last.HHID then do;
if ID eq ID1 then finrsex = SEX;
else finrsex = 3 - SEX;
if SEX eq 1 then do i=1 to numvars;
respm[i] = resp[i];
respf[i] = spvar[i];
end;
else do i=1 to numvars;
respm[i] = spvar[i];
respf[i] = resp[i];
end;
end;
if last.HHID;
run;
*
**
*** The next step gets a count of children of the
*** respondent (or of each respondent in a couple)
*** needed to allocate some amounts when the
*** respondent said "all my children."
*
*** This follows the pattern of EXAMPLE4.
**
;
data hhfile2;
merge hhfile1(in=hhrec)
AHEAD1.AHGPX(keep=HHID LINEP IDFM idnfm V418 V421
V443 V445);
by HHID;
if hhrec;
drop LINEP IDFM IDNFM V418 V421 V443 V445;
if V418 eq . and V443 lt 0 then V443=1;
if V418 eq . and idnfm gt 0 and V445 lt 0 then V445=1;
retain ctchildf ctchildm famrsex;
if first.HHID then do;
ctchildf = 0;
ctchildm = 0;
if IDM eq IDFM then famrsex = 1; else famrsex = 2;
end;
if V418 in (1,2) or V443 in (1,2) then do;
if famrsex eq 1 then ctchildm = ctchildm + 1;
if famrsex eq 2 then ctchildf = ctchildf + 1;
end;
if V421 in (1,2) or V445 in (1,2) then do;
if famrsex eq 1 then ctchildf = ctchildf + 1;
if famrsex eq 2 then ctchildm = ctchildm + 1;
end;
if last.HHID then output;
run;
*
**
*** The next data management step is to merge Household-level
*** variables (including those merged onto the household
*** level from the Respondent-level file in the first step)
*** onto the Child/Other household member-level file.
**
;
data pfile1;
merge hhfile2(in=hhrec)
AHEAD1.AHGPX(in=chrec);
by HHID;
if chrec and hhrec;
drop i V775M V783M V791M V799M V805M V823M V913M V924M V950M V1010M
V775F V783F V791F V799F V805F V823F V913F V924F V950F V1010F
V1294A1M V1294A2M V1294A3M V1294A4M V1294A5M
V1294A6M V1294A7M V1294A8M V1294A9M V1294AXM
V1693A1M V1693A2M V1693A3M V1693A4M V1693A5M
V1693A6M V1693A7M V1693A8M V1693A9M V1693AXM
V1294A1F V1294A2F V1294A3F V1294A4F V1294A5F
V1294A6F V1294A7F V1294A8F V1294A9F V1294AXF
V1693A1F V1693A2F V1693A3F V1693A4F V1693A5F
V1693A6F V1693A7F V1693A8F V1693A9F V1693AXF
V474A1 -- V474A10 V479A1 -- V479A10 V495 V499 V499C V499X
V507 V508 V508C V508X V519 V520 V520C V520X V526 V526 V527C
V527X
V537 V538 V538C V538X V549 V748A1 -- V748A10 V749 V1107A1 --
V1107A10
V1151A1 -- V1151A8 V1603 V1606 V1606C V1606X V1611 V1612
V1615
V1618 V1618C V1618X V1623 V1624 V1627 V1630 V1630C V1630X
V1635
V1636 V1885 V1887 V1888 V1889 V1890A2 V1890A3 V1891A1 --
V1891A10
V1893 V1895 V1896 V1897 V1898A2 V1898A3 V1899A1 -- V1899A10
V1901 V1903 V1904 V1905 V1906A2 V1906A3 V1907A1 -- V1907A10
V1909 V1912 V1913 V1914 V1915A2 V1915A3 V1916A1 -- V1916A10
v1887a v1889a v1895a v1897a v1903a v1905a v1912a v1914a
V1920A1 -- V1920A10 ctchildf ctchildm ctgive giveall
finrsex famrsex child childf childm module7f module7m
V417 -- V423 V480 V483 V484 V485 V429 V487 V430 V488
V491 V492 V493 V442 -- V451 V456 V457 -- V461;
hhchid = 100*HHID + LINEP;
AGEP = .;
RELATE_M = .;
RELATE_F = .;
child = 0;
childm = 0;
childf = 0;
if V418 eq . and V443 lt 0 then V443=1;
if V418 eq . and idnfm gt 0 and V445 lt 0 then V445=1;
if LINEP le 39 then do;
child = 1;
SEXP = V442;
if famrsex eq 1 then do;
RELATE_M = V443;
RELATE_F = V445;
end;
else do;
RELATE_M = V445;
RELATE_F = V443;
end;
MARSTATP = V444;
if V446 ge 0 then AGEP = V446;
else if V447 ge 1900 then AGEP = 1994 - V447;
EDUCP = V449;
WORKP = V451;
NUMKIDSP = V450;
AGESPP = V459;
EDUCSPP = V460;
WORKSPP = V461;
V458C = V456;
if V456 eq 5 then
if V458 eq 5 then V458C = 1;
else if V458 eq 1 then V458C = 2;
else V458C = 5;
else if V456 eq 1 then
if V457 eq 5 then V458C = 3;
else if V457 eq 1 then V458C = 4;
else V458C = 6;
else if V457 eq 1 then V458C = 4;
else if V457 eq 5 then V458C = 7;
V489C = .;
end;
else do;
SEXP = V417;
if famrsex eq 1 then do;
RELATE_M = V418;
RELATE_F = V421;
end;
else do;
RELATE_M = V421;
RELATE_F = V418;
end;
MARSTATP = V419;
AGEP = V422;
EDUCP = V423;
WORKP = V480;
NUMKIDSP = V429;
AGESPP = V487;
EDUCSPP = V430;
WORKSPP = V488;
V481C = V481;
if V481 ge 0 then V481C = 0;
else if V483 eq 5 then
if V485 eq 5 then V481C = 1;
else if V485 eq 1 then V481C = 2;
else V481C = 5;
else if V483 eq 1 then
if V484 eq 5 then V481C = 3;
else if V484 eq 1 then V481C = 4;
else V481C = 6;
V489C = V489;
if V489 ge 0 then V489C = 0;
else if V491 eq 5 then
if V493 eq 5 then V489C = 1;
else if V493 eq 1 then V489C = 2;
else V489C = 5;
else if V491 eq 1 then
if V492 eq 5 then V489C = 3;
else if V492 eq 1 then V489C = 4;
else V489C = 6;
V458C = .;
end;
if RELATE_M in (1,2,3) then childm = 1;
if RELATE_F in (1,2,3) then childf = 1;
if childm or childf then child = 1;
array maler[9] V775M V783M V791M V799M V805M V823M V913M
V924M V950M;
array femaler[9] V775F V783F V791F V799F V805F V823F V913F
V924F V950F;
array adlhm[9] V775HM V783HM V791HM V799HM V805HM V823HM
V913HM V924HM V950HM;
array adlhf[9] V775HF V783HF V791HF V799HF V805HF V823HF
V913HF V924HF V950HF;
do i = 1 to 9;
if RELATE_M ne . then do;
if maler[i] eq LINEP then adlhm[i] = 1;
else adlhm[i] = 0;
end;
else adlhm[i] = .;
if RELATE_F ne . then do;
if femaler[i] eq LINEP then adlhf[i] = 1;
else adlhf[i] = 0;
end;
else adlhf[i] = .;
end;
adlhelpt = 0;
iadlhlpt = 0;
allhelpt = 0;
if RELATE_M ne . then do;
adlhelpm = 0;
do i = 1 to 6;
if adlhm[i] eq 1 then adlhelpm = adlhelpm + 1;
end;
adlhelpt = adlhelpm;
if V913HM eq 1 or V924HM eq 1 then iadlhlpm = 1;
else iadlhlpm = 0;
iadlhlpt = iadlhlpm;
allhelpm = adlhelpm + iadlhlpm + V950HM;
allhelpt = allhelpm;
end;
else do;
adlhelpm = .;
iadlhlpm = .;
allhelpm = .;
end;
if RELATE_F ne . then do;
adlhelpf = 0;
do i = 1 to 6;
if adlhf[i] eq 1 then adlhelpf = adlhelpf + 1;
end;
adlhelpt = adlhelpt + adlhelpf;
if V913HF eq 1 or V924HF eq 1 then iadlhlpf = 1;
else iadlhlpf = 0;
iadlhlpt = iadlhlpt + iadlhlpf;
allhelpf = adlhelpf + iadlhlpf + V950HF;
allhelpt = allhelpt + allhelpf;
end;
else do;
adlhelpf = .;
iadlhlpf = .;
allhelpf = .;
end;
*
**
*** The following variables apply only to children, since
*** other household members were not specifically identified
*** for these topics
**
;
if child then do;
if V549 eq LINEP then CHLDCARE = 1; else CHLDCARE = 0;
if V1010M eq LINEP then FUTURHLM = 1; else FUTURHLM = 0;
if V1010F eq LINEP then FUTURHLF = 1; else FUTURHLF = 0;
FUTURHLT = FUTURHLF + FUTURHLM;
array numben3[4] V1890A3 V1898A3 V1906A3 V1915A3;
array numben2[4] V1890A2 V1898A2 V1906A2 V1915A2;
array prem[4] V1887 V1895 V1903 V1912;
array fval[4] V1889 V1897 V1905 V1914;
array premper[4] v1887a v1895a v1903a v1912a;
array fvalper[4] v1889a v1897a v1905a v1914a;
array pper[4] V1888 V1896 V1904 V1913;
do i = 1 to 4;
premper[i] = prem[i];
fvalper[i] = fval[i];
if numben3[i] gt 0 then do;
if prem[i] gt 0 then premper[i] = prem[i]/3;
if fval[i] gt 0 then fvalper[i] = fval[i]/3;
end;
else if numben2[i] gt 0 then do;
if prem[i] gt 0 then premper[i] = prem[i]/2;
if fval[i] gt 0 then fvalper[i] = fval[i]/2;
end;
if prem[i] gt 0 then do;
if pper[i] eq 1 then premper[i] = 52 * premper[i];
else if pper[i] eq 2 then premper[i] = 24 * premper[i];
else if pper[i] eq 3 then premper[i] = 12 * premper[i];
else if pper[i] eq 4 then premper[i] = 4 * premper[i];
else if pper[i] eq 5 then premper[i] = 2 * premper[i];
end;
end;
array movef[10] V1294A1F V1294A2F V1294A3F V1294A4F V1294A5F
V1294A6F V1294A7F V1294A8F V1294A9F V1294AXF;
array willf[10] V1693A1F V1693A2F V1693A3F V1693A4F
V1693A5F V1693A6F V1693A7F V1693A8F V1693A9F V1693AXF;
array movem[10] V1294A1M V1294A2M V1294A3M V1294A4M V1294A5M
V1294A6M V1294A7M V1294A8M V1294A9M V1294AXM;
array willm[10] V1693A1M V1693A2M V1693A3M V1693A4M V1693A5M
V1693A6M V1693A7M V1693A8M V1693A9M V1693AXM;
if RELATE_M in(1,2,3) then do;
MOVENRM = 0;
WILLBENM = 0;
do i = 1 to 10;
if movem[i] eq LINEP then MOVENRM = 1;
if willm[i] eq LINEP or willm[i] eq 11 then WILLBENM = childm;
end;
end;
else do;
MOVENRM = .;
WILLBENM = .;
end;
if RELATE_F in(1,2,3) then do;
MOVENRF = 0;
WILLBENF = 0;
do i = 1 to 10;
if movef[i] eq LINEP then MOVENRF = 1;
if willf[i] eq LINEP or willf[i] eq 11 then WILLBENF = childf;
end;
end;
else do;
MOVENRF = .;
WILLBENF = .;
end;
array v474[10] V474A1 -- V474A10;
array v479[10] V479A1 -- V479A10;
array v495a[5] V495 V507 V519 V526 V537;
array v499a[5] V499 V508 V520 V527 V538;
array v499xa[5] V499X V508X V520X V527X V538X;
array v748[10] V748A1 -- V748A10;
array v1107[10] V1107A1 -- V1107A10;
array v1151[8] V1151A1 -- V1151A8;
array v1603a[3] V1603 V1615 V1627;
array v1606a[3] V1606 V1618 V1630;
array v1606ca[3] V1606C V1618C V1630C;
array v1606xa[3] V1606X V1618X V1630X;
array v1611a[3] V1611 V1623 V1635;
array v1612a[3] V1612 V1624 V1636;
array v1891[10] V1891A1 -- V1891A10;
array v1899[10] V1899A1 -- V1899A10;
array v1907[10] V1907A1 -- V1907A10;
array v1916[10] V1916A1 -- V1916A10;
array v1920[10] V1920A1 -- V1920A10;
HELPDEED = 0;
HELP10YR = 0;
HELP1YR = 0;
HELP1YRD = 0;
HELP1YRX = 0;
GIVEMEDI = 0;
GIVEMEDD = 0;
GIVEFIN = 0;
GIVEFIND = 0;
GIVEFINC = .;
GIVEFINX = 0;
GIVENOW = .;
GIVEFUT = .;
DEEDHOME = 0;
OWNRHOME = 0;
array insure[4] V1885 V1893 V1901 V1909;
array benefr[4] BENETIF BENEWIF BENETIM BENEWIM;
array benemr[4] BENETIM BENEWIM BENETIF BENEWIF;
array premfr[4] PREMTIF PREMWIF PREMTIM PREMWIM;
array premmr[4] PREMTIM PREMWIM PREMTIF PREMWIF;
array fvalfr[4] FVALTIF FVALWIF FVALTIM FVALWIM;
array fvalmr[4] FVALTIM FVALWIM FVALTIF FVALWIF;
do i = 1 to 4;
if finrsex eq 2 then do;
if insure[i] eq 1 then do;
benefr[i] = 0;
premfr[i] = 0;
fvalfr[i] = 0;
end;
else if insure[i] eq 5 then do;
if (i in (1,2) and RELATE_F in (1,2,3)) or
(i in (3,4) and RELATE_M in (1,2,3)) then do;
benefr[i] = .N;
premfr[i] = .N;
fvalfr[i] = .N;
end;
else do;
benefr[i] = .;
premfr[i] = .;
fvalfr[i] = .;
end;
end;
else do;
benefr[i] = insure[i];
premfr[i] = insure[i];
fvalfr[i] = insure[i];
end;
end;
else do;
if insure[i] eq 1 then do;
benemr[i] = 0;
premmr[i] = 0;
fvalmr[i] = 0;
end;
else if insure[i] eq 5 then do;
if (i in (1,2) and RELATE_M in (1,2,3)) or
(i in (3,4) and RELATE_F in (1,2,3)) then do;
benemr[i] = .N;
premmr[i] = .N;
fvalmr[i] = .N;
end;
else do;
benemr[i] = .;
premmr[i] = .;
fvalmr[i] = .;
end;
end;
else do;
benemr[i] = insure[i];
premmr[i] = insure[i];
fvalmr[i] = insure[i];
end;
end;
end;
ADVISE_R = 0;
ctgive = 0;
do i = 1 to 10;
if v474[i] eq LINEP or v474[i] eq 11 then HELPDEED = HELPDEED +
1;
if v479[i] eq LINEP or v479[i] eq 11 then HELP10YR = HELP10YR +
1;
if v748[i] eq LINEP then do;
GIVEMEDI = GIVEMEDI + 1;
if V749 ge 0 then GIVEMEDD = GIVEMEDD + V749; else GIVEMEDD =
V749;
end;
if v748[i] gt 0 then ctgive = ctgive + 1;
if v1107[i] eq LINEP then DEEDHOME = 1;
if v1891[i] eq LINEP then do;
if finrsex eq 2 then do;
BENETIF = 1;
PREMTIF = v1887a;
FVALTIF = v1889a;
end;
else do;
BENETIM = 1;
PREMTIM = v1887a;
FVALTIM = v1889a;
end;
end;
else if v1891[i] eq 11 then do;
if finrsex eq 2 and childf then do;
BENETIF = 1;
PREMTIF = v1887a/ctchildf;
FVALTIF = v1889a/ctchildf;
end;
else if finrsex eq 1 and childm then do;
BENETIM = 1;
PREMTIM = v1887a/ctchildm;
FVALTIM = v1889a/ctchildm;
end;
end;
if v1899[i] eq LINEP then do;
if finrsex eq 2 then do;
BENEWIF = 1;
PREMWIF = v1895a;
FVALWIF = v1897a;
end;
else do;
BENEWIM = 1;
PREMWIM = v1895a;
FVALWIM = v1897a;
end;
end;
else if v1899[i] eq 11 then do;
if finrsex eq 2 and childf then do;
BENEWIF = 1;
PREMWIF = v1895a/ctchildf;
FVALWIF = v1897a/ctchildf;
end;
else if finrsex eq 1 and childm then do;
BENEWIM = 1;
PREMWIM = v1895a/ctchildm;
FVALWIM = v1897a/ctchildm;
end;
end;
if v1907[i] eq LINEP then do;
if finrsex eq 2 then do;
BENETIM = 1;
PREMTIM = v1903a;
FVALTIM = v1905a;
end;
else do;
BENETIF = 1;
PREMTIF = v1903a;
FVALTIF = v1905a;
end;
end;
else if v1907[i] eq 11 then do;
if finrsex eq 2 and childm then do;
BENETIM = 1;
PREMTIM = v1903a/ctchildm;
FVALTIM = v1905a/ctchildm;
end;
else if finrsex eq 1 and childf then do;
BENETIF = 1;
PREMTIF = v1903a/ctchildf;
FVALTIF = v1905a/ctchildf;
end;
end;
if v1916[i] eq LINEP then do;
if finrsex eq 2 then do;
BENEWIM = 1;
PREMWIM = v1912a;
FVALWIM = v1914a;
end;
else do;
BENEWIF = 1;
PREMWIF = v1912a;
FVALWIF = v1914a;
end;
end;
else if v1916[i] eq 11 then do;
if finrsex eq 2 and childm then do;
BENEWIM = 1;
PREMWIM = v1912a/ctchildm;
FVALWIM = v1914a/ctchildm;
end;
else if finrsex eq 1 and childf then do;
BENEWIF = 1;
PREMWIF = v1912a/ctchildf;
FVALWIF = v1914a/ctchildf;
end;
end;
if v1920[i] eq LINEP or v1920[i] eq 11 then ADVISE_R = 1;
end;
if ctgive gt 1 and GIVEMEDD ge 0 then GIVEMEDD = GIVEMEDD/ctgive;
do i = 1 to 5;
if V495a[i] eq LINEP or V495a[i] eq 11 then do;
HELP1YR = HELP1YR + 1;
if HELP1YRD eq 0 then HELP1YRD = v499a[i];
else if HELP1YRD > 0 and v499a[i] > 0
then HELP1YRD = HELP1YRD + v499a[i];
if HELP1YRX eq 0 then HELP1YRX = v499xa[i];
else if HELP1YRX > 0 and v499xa[i] > 0
then HELP1YRX = HELP1YRX + v499xa[i];
end;
end;
do i = 1 to 8;
if v1151[i] eq LINEP then OWNRHOME = 1;
end;
giveall = 0;
do i = 1 to 3;
if v1603a[i] eq 11 and not giveall then do;
giveall = 1;
GIVEFIN = 1;
if GIVEFIND eq 0 then GIVEFIND = v1606a[i];
if GIVEFINC eq . then GIVEFINC = v1606ca[i];
if GIVEFINX eq 0 then GIVEFINX = v1606xa[i];
if GIVENOW eq . then GIVENOW = v1611a[i];
if GIVEFUT eq . then GIVEFUT = v1612a[i];
end;
else if V1603a[i] eq LINEP then do;
GIVEFIN = GIVEFIN + 1;
if giveall then do;
GIVEFIND = v1606a[i];
GIVEFINC = v1606ca[i];
GIVEFINX = v1606xa[i];
GIVENOW = v1611a[i];
GIVEFUT = v1612a[i];
end;
else do;
if GIVEFIND eq 0 then GIVEFIND = v1606a[i];
else if v1606a[i] > 0 and GIVEFIND > 0
then GIVEFIND = GIVEFIND + v1606a[i];
if GIVEFINC eq . then GIVEFINC = V1606ca[i];
else GIVEFINC = 9;
if GIVEFINX eq 0 then GIVEFINX = v1606xa[i];
else if v1606xa[i] > 0 and GIVEFINX > 0
then GIVEFINX = GIVEFINX + v1606xa[i];
if GIVENOW eq . then GIVENOW = v1611a[i];
if GIVEFUT eq . then GIVEFUT = v1612a[i];
end;
end;
end;
if module7f eq 1 then do;
if V2195F eq LINEP then V2195F = 1;
else V2195F = 0;
if V2198F eq LINEP then V2198F = 1;
else V2198F = 0;
if V2201F eq LINEP then V2201F = 1;
else V2201F = 0;
end;
else do;
V2195F = .;
V2198F = .;
V2201F = .;
end;
if module7m eq 1 then do;
if V2195M eq LINEP then V2195M = 1;
else V2195M = 0;
if V2198M eq LINEP then V2198M = 1;
else V2198M = 0;
if V2201M eq LINEP then V2201M = 1;
else V2201M = 0;
end;
else do;
V2195M = .;
V2198M = .;
V2201M = .;
end;
end;
*
**
*** Set the above variables to INAP (.) for non-children
**
;
else do;
CHLDCARE = .;
FUTURHLF = .;
FUTURHLM = .;
FUTURHLT = .;
MOVENRM = .;
WILLBENM = .;
MOVENRF = .;
WILLBENF = .;
HELPDEED = .;
HELP10YR = .;
HELP1YR = .;
HELP1YRX = .;
GIVEMEDI = .;
GIVEMEDD = .;
DEEDHOME = .;
OWNRHOME = .;
BENETIF = .;
BENEWIF = .;
BENETIM = .;
BENEWIM = .;
PREMTIF = .;
PREMWIF = .;
PREMTIM = .;
PREMWIM = .;
FVALTIF = .;
FVALWIF = .;
FVALTIM = .;
FVALWIM = .;
ADVISE_R = .;
HELPDEED = .;
HELP10YR = .;
HELP1YR = .;
HELP1YRX = .;
CHLDCARE = .;
GIVEMEDI = .;
GIVEMEDD = .;
GIVEFIN = .;
GIVEFIND = .;
GIVEFINC = .;
GIVEFINX = .;
GIVENOW = .;
GIVEFUT = .;
DEEDHOME = .;
OWNRHOME = .;
V2195M = .;
V2198M = .;
V2201M = .;
V2195F = .;
V2198F = .;
V2201F = .;
end;
label RELATE_M = 'Relationship to male R'
RELATE_F = 'Relationship to female R'
SEXP = 'Sex of child/other hh member'
MARSTATP = 'Marital status'
AGEP = 'Age of child/other hh member'
EDUCP = 'Education of child/other hh member'
WORKP = 'Work status of child/other hh member'
NUMKIDSP = '# of children of child/hh member'
AGESPP = 'Age of spouse of child/hh member'
EDUCSPP = 'Education of spouse of child/hh member'
WORKSPP = 'Work status of spouse of child/hh member'
V481C = 'MD category for D11, hh member earnings'
V489C = 'MD category for D18, sp member earnings'
V458C = 'Category for D30-32, child hh income'
V775HF = 'Help female R: walking'
V783HF = 'Help female R: dressing'
V791HF = 'Help female R: bathing'
V799HF = 'Help female R: eating'
V805HF = 'Help female R: getting in/out of bed'
V823HF = 'Help female R: toileting'
V913HF = 'Help female R: IADLs first helper'
V924HF = 'Help female R: IADLs second helper'
V950HF = 'Help female R: manage money'
FUTURHLF = 'Female R reports would help if needed'
ADLHELPF = 'Help female R: number ADLs'
IADLHLPF = 'Help female R: IADLs'
ALLHELPF = 'Help female R: number ADLs, IADLs'
V775HM = 'Help male R: walking'
V783HM = 'Help male R: dressing'
V791HM = 'Help male R: bathing'
V799HM = 'Help male R: eating'
V805HM = 'Help male R: getting in/out of bed'
V823HM = 'Help male R: toileting'
V913HM = 'Help male R: IADLs first helper'
V924HM = 'Help male R: IADLs second helper'
V950HM = 'Help male R: manage money'
FUTURHLM = 'Male R reports would help if needed'
ADLHELPM = 'Help male R: number ADLs'
IADLHLPM = 'Help male R: IADLs'
ALLHELPM = 'Help male: number ADLs, IADLs'
ADLHELPT = 'Help either R: number ADLs'
IADLHLPT = 'Help either R: IADLs'
ALLHELPT = 'Help either R: number ADLs, IADLs'
FUTURHLT = 'Either R reports would help if needed'
MOVENRM = 'Male R expects to move near'
MOVENRF = 'Female R expects to move near'
WILLBENM = 'Male R names in will'
WILLBENF = 'Female R names in will'
HELPDEED = 'R gave deed to house'
HELP10YR = 'R gave $5000+ in last 10 years'
HELP1YR = 'R gave $500+ in last 12 months'
HELP1YRD = 'Amount given by R in last 12 months'
HELP1YRX = 'Amount given by R in last 12 months, imp'
CHLDCARE = 'R cared for grandchild 1+ years'
GIVEMEDI = 'Helped R with medical expenses'
GIVEMEDD = 'Dollar amount medical expenses paid'
GIVEFIN = 'Financial assistance to R last year'
GIVEFIND = 'Amount assistance to R last year'
GIVEFINC = 'Bracket code for amount assistance'
GIVEFINX = 'Amount assistance to R last year, imp'
GIVENOW = 'Assistance continues this year'
GIVEFUT = 'Assistance expected in future'
DEEDHOME = 'Named on title to R''s home'
OWNRHOME = 'Owns R''s home'
BENETIM = 'Beneficiary of term ins by male R'
PREMTIM = 'Annual premium, term ins from male R'
FVALTIM = 'Face value, term ins from male R'
BENETIF = 'Beneficiary of term ins by female R'
PREMTIF = 'Annual premium, term ins from female R'
FVALTIF = 'Face value, term ins from female R'
BENEWIM = 'Beneficiary of whole ins by male R'
PREMWIM = 'Annual premium, whole ins from male R'
FVALWIM = 'Face value, whole ins from male R'
BENEWIF = 'Beneficiary of whole ins by female R'
PREMWIF = 'Annual premium, whole ins from female R'
FVALWIF = 'Face value, whole ins from female R'
ADVISE_R = 'R consults on major decisions'
V2195F = 'Module 7: manages finances for fem R'
V2198F = 'Module 7: manages investments for fem R'
V2201F = 'Module 7: fem R consults on investments'
V2195M = 'Module 7: manages finances for male R'
V2198M = 'Module 7: manages investments for male R'
V2201M = 'Module 7: male R consults on investments';
run;
*
**
*** The next file management step is to add the helper-level
*** variables to the merged household-level file created in
*** the previous step.
**
;
proc sort data=pfile1 out=pfile2;
by HHCHID;
run;
data helper1;
set AHEAD1.AHGHP;
HHCHID = 100*HHID;
if LINEHP ge 0 then HHCHID = HHCHID + LINEHP;
run;
proc sort data=helper1 out=helper2;
by HHCHID;
run;
data AHEAD1.AHGPX;
merge helper2 pfile2(in=chrec);
by HHCHID;
if chrec;
retain whohelpm whohelpf TIMEHELP MDTIMEHL PAIDHELP MEDCHELP
DLLRHELP MDDLLRHL G100HELP;
if first.HHCHID then do;
whohelpm = 0;
whohelpf = 0;
TIMEHELP = 0;
MDTIMEHL = 0;
PAIDHELP = 0;
MEDCHELP = 0;
DLLRHELP = 0;
MDDLLRHL = 0;
G100HELP = 0;
end;
if LINEHP gt 0 then do;
if ID eq IDM then whohelpm = 10 * whohelpm + RELATEP;
if ID eq IDF then whohelpf = (whohelpf + RELATEP)/10;
if V993 gt 0 then do;
if V992 eq 1 then TIMEHELP = TIMEHELP + 7 * V993;
else if V992 eq 2 then TIMEHELP = TIMEHELP + 3.5 * V993;
else if V992 eq 3 then TIMEHELP = TIMEHELP + V993;
else if V992 eq 4 then TIMEHELP = TIMEHELP + 1;
end;
else MDTIMEHL = MDTIMEHL + 1;
if V994 eq 1 then PAIDHELP = PAIDHELP + 1;
if V995 eq 1 then MEDCHELP = MEDCHELP + 1;
if V997 eq 1 then monthly = V996;
else if V997 eq 2 then monthly = 4 * V996;
else if V997 eq 3 then monthly = 30 * V996;
else if V997 eq 5 then monthly = V996/12;
else monthly = .;
if V997 ge 0 and V996 ge 0 then do;
if V994 eq 1 then DLLRHELP = DLLRHELP + monthly;
end;
else MDDLLRHL = MDDLLRHL + 1;
if monthly ge 100 or V998 eq 1 then G100HELP = G100HELP + 1;
end;
if last.HHCHID;
WHOHELPT = whohelpm + whohelpf;
if WHOHELPT eq 0 then do;
PAIDHELP = .;
DLLRHELP = .;
G100HELP = .;
end;
if PAIDHELP le 0 then MEDCHELP = .;
label IDF = 'Female respondent ID'
IDM = 'Male respondent ID'
WHOHELPT = 'String of RELATEPs, helpers of either R'
TIMEHELP = 'Total time helped per week'
MDTIMEHL = 'Number of helpers with MD on time'
PAIDHELP = 'Whether paid for help (count)'
MEDCHELP = 'If paid, if Medicare helps (count)'
DLLRHELP = 'Total paid per month'
MDDLLRHL = 'Number of helpers with MD on pay'
G100HELP = 'Whether paid at least $100/month';
drop monthly ID LINEHP RELATEP IWN V990 -- GRKIDREL HHCHID
whohelpm whohelpf X1;
run;
proc contents data=AHEAD1.AHGPX;
title 'Listing of variables in revised child/other hh member file';
run;