|
National Center for Chronic Disease Prevention and Health Promotion Health-Related Quality of Life
|
|
|
|
|
|||||||||
Below are SAS, SPSS, and SUDAAN syntax to appropriately recode and/or create the following Healthy Days variables:
-Self-rated health (including the derived measure of the percent of
persons with fair to poor self-rated health)
-Physically unhealthy days
-Mentally unhealthy days
-Unhealthy days (sum of physically and mentally unhealthy days not to
exceed 30 days)
-Activity limitation days
Self-rated health
(including the derived measure of percent fair->poor self-rated
health);
if (genhlth in(1,2,3,4,5)) then do;
if (genhlth in(4,5))
then fairpoor=100;
else fairpoor=0;
end;
else genhlth=.;
label fairpoor="Percent fair->poor self-rated health";
Physically and mentally unhealthy days and recent activity limitation days;
* Convert values of 88 to zero and out-of-range values to missing.;
* If the number of physical health days not good equals zero, and;
* if the number of mental health days not good equals zero, and;
* if the number of recent activity limitation days is missing (skip
pattern),;
* then change (impute) the number of recent activity limitation days to
zero days.;
array qoldays physhlth menthlth poorhlth;
do over qoldays;
select;
when (qoldays eq 88) qoldays=0;
when ((qoldays lt 0) or qoldays gt 30)) qoldays=.
otherwise;
end;
end;
if ((physhlth eq 0) and
(menthlth eq 0) and
(poorhlth eq .)) then poorhlth=0;
* Derived measure: Unhealthy days;
if ((physhlth ne .) and
(menthlth ne .))
then unhealth=min(30,sum(physhlth,menthlth));
else unhealth=.;
label unhealth="# Unhealthy days in past 30 days";
* Derived measure: Percent with frequent mental distress;
select;
when (14 <= menthlth <= 30) frqmentd=100;
when ( 0 <= menthlth <= 13) frqmentd=0;
otherwise frqmentd=.;
end;
label frqmentd="Percent with frequent mental distress";
**Computed measure: Percent fair to poor health**
Use self-rated health variable (GENHLTH); recode into 2 categories: (1)
excellent, very good, good; (2) fair, poor*
RECODE
GENHLTH
(MISSING=SYSMIS)(1 thru 3=0) (4 thru 5=100) (ELSE=SYSMIS) INTO FAIRPOOR .
VARIABLE LABELS FAIRPOOR 'percent fair poor'.
EXECUTE .
**Physically and mentally unhealthy days, and recent activity limitation days** **(recoding to account for zero days (coded as 88 in BRFSS), missing values, data entry errors/outliers)**
RECODE
PHYSHLTH
(88=0) (77=SYSMIS) (99=SYSMIS) (LOWEST THRU -1=SYSMIS)
(31 THRU HIGHEST=SYSMIS)(ELSE=Copy) INTO PHYSR .
VARIABLE LABELS PHYSR 'physically unhealthy days'.
EXECUTE .RECODE
MENTHLTH
(88=0) (77=SYSMIS) (99=SYSMIS) (LOWEST THRU -1=SYSMIS)
(31 THRU HIGHEST=SYSMIS)(ELSE=Copy) INTO MENTR.
VARIABLE LABELS MENTR 'mentally unhealthy days'.
EXECUTE .
**Activity limitation days**
**Note: If physically unhealthy days is zero (0) and mentally unhealthy days is zero (0), the question on activity limitation days (due to poor physical or mental health) is skipped. We impute a zero (0) for this value. Please note original coding for the missing (skipped) value, since it might be coded as a MISSING, SYSMIS, or sometimes as a ".00" value. Imputing zero days is only valid when mentally unhealthy days and physically unhealthy days are both zero.**
**The example below assumes SYSMIS displays skipped cases; 88 displays persons asked the question, but who responded zero days; 77 displays persons who were asked the question but were unsure; and 99 displays persons who were asked the question but refused to answer it.**
RECODE
POORHLTH
(88=0) (77=SYSMIS)(99=SYSMIS)(SYSMIS=0)(ELSE=Copy) INTO PORHLTHR .
VARIABLE LABELS PORHLTHR 'activity limitation days'.
EXECUTE .
**Computed measure: Unhealthy days**
**(If either value of physically unhealthy days or mentally unhealthy days is missing, this computes the resulting appropriate missing value.)**
COMPUTE SUMDAYS=PHYSR+MENTR.
VARIABLE LABELS SUMDAYS 'sum of phys ment days'.
EXECUTE.
**recoding maximum value of SUMDAYS to 30, since 30 days is the logical maximum value of overall unhealthy days; see page 9 of the technical monograph, Measuring Healthy Days (CDC 2000), for additional information on overlap**
RECODE
SUMDAYS
(SYSMIS=SYSMIS) (0 thru 30=Copy) (31 thru Highest=30) INTO UNHLTH.
VARIABLE LABELS UNHLTH 'sum of phys ment days recoded so max <31'.
EXECUTE.
**Computed measure: Percent with frequent mental distress**
RECODE
MENTR
(0 thru 13=0) (14 thru Highest=100) (ELSE=SYSMIS) INTO MENTDIST.
VARIABLE LABELS MENTDIST 'frequent mental distress'.
EXECUTE .
**SUDAAN code (using SPSS data sets as well as SAS data sets: Check your version of SUDAAN for the version of SAS data set it can read);***Note for SAS and SPSS users:
To account for the complex sample survey design in BRFSS (=WR=sampling with replacement), use the following design and weight variables from, for example, the 2000 BRFSS data set: _STSTR = the sampling stratum and sort the SAS or SPSS data set by the design variables, _STSTR and _PSU, in the SUDAAN NEST statement, in preparation for analysis with SUDAAN. SUDAAN examples: 1. If you were interested in the mean number of physically unhealthy days (PHYSHLTH), mentally unhealthy days (MENTHLTH), unhealthy days (UNHLTH), and activity limitation days (POORHLTH), use the following SUDAAN code:
2. If you were interested in the percentage of persons with fair to poor health (FAIRPOOR), use the following SUDAAN code:
3. If you were interested in the mean number of unhealthy days by sex, income, and age group, you would use the following SUDAAN code:
|
Privacy Policy | Accessibility This page last reviewed January 03, 2005 United
States Department of Health and Human Services |