Table 1
Input parameters for %svy_freqs macro.
| PARAMETER | DESCRIPTION |
|---|---|
| _data | name of input dataset |
| _factors | list of categorical variables separated by space |
| _cat_type | type of analysis for categorical variables i.e., COL for column percentages, ROW for row percentages, PREV for prevalence percentages |
| _contvars | list of continuous variables separated by space |
| _cont_type | type of analysis for continuous variables i.e., MEAN or MEDIAN |
| _byvar | name of categorical by-group variable which can have any number of categories/levels |
| _outcome | (optional) name of third variable for which cross-tabulations are needed e.g., lbxha, for Hepatitis A, but must be specified if prevalence analysis is being performed |
| _outvalue | (optional) value label of third variable to compute prevalence cross-tabulation but must be specified if _outcome is specified e.g., Positive, in the case of prevalence of Hepatitis A. |
| _strata | (optional) survey stratification variable |
| _cluster | (optional) survey clustering variable |
| _weight | (optional) survey weighting variable |
| _domain | (optional) domain variable for sub-population analysis |
| _domainvalue | (optional) value of domain/sub-population of interest (should be numeric). Required if _domain is specified |
| _varmethod | (optional) value for variance estimation method namely Taylor (the default) or replication-based variance estimation methods including JK or BRR |
| _varmethod_opts | (optional) options for variance estimation method, e.g., jkcoef = 1 df = 25 for JK |
| _rep_weights_values | (optional) values for REPWEIGHTS statement, but may be specified with replication-based variance estimation method is JK or BRR |
| _missval_lab | (optional) value label for missing values. If missing data have a format, it should be provided, otherwise macro assumes the default format “.” |
| _missval_opts | (optional) options for handling missing data within proc survey statement, e.g., “MISSING” or “NOMCAR”. If no option is specified all missing observations are excluded from the analysis |
| _idvar | name of unique identifying variable |
| _condition | (optional) any conditional statements to create and or fine-tune the final analysis dataset specified using one IF statement |
| _outdir | path for directory/folder where output is saved |
| _tablename | short name of output table |
| _tabletitle | title of output table |
| _surveyname | abbreviation for survey/study to be included in the output |
| _print | variable for displaying/suppressing the output table on the output window which takes the values (NO = suppress output, YES = show output) |
Table 2
Participants’ socio-demographic characteristics by sex (Col %), N = 522π.
| CHARACTERISTIC£ | MALE | FEMALE | TOTAL€ | ||||||
|---|---|---|---|---|---|---|---|---|---|
| UNWEIGHTED N@ | WEIGHTED % (OR MEDIAN)¥ | 95% CL (OR IQR)$ | UNWEIGHTED N | WEIGHTED % (OR MEDIAN) | 95% CL (OR IQR) | UNWEIGHTED N | WEIGHTED % (OR MEDIAN) | 95% CL (OR IQR) | |
| Age in years at screening | |||||||||
| 20–39 | 46 | 12.7 | (7.9–17.5) | 6 | 19.2 | (2.8–35.6) | 52 | 13.3 | (8.6–18.0) |
| 40–59 | 114 | 25.2 | (19.9–30.5) | 24 | 61.8 | (38.2–85.3) | 138 | 28.3 | (21.4–35.2) |
| >= 6060 | 326 | 62.1 | (56.0–68.1) | 6 | 19.1 | (2.2–35.9) | 332 | 58.4 | (51.5–65.4) |
| Total | 486 | 100 | (__–__) | 36 | 100 | (__–__) | 522 | 100 | (__–__) |
| Race/Hispanic origin | |||||||||
| Mexican American | 23 | 2.6 | (0.7–4.5) | 0 | . | (.–.) | 23 | 2.4 | (0.7–4.1) |
| Other Hispanic | 25 | 3.2 | (1.6–4.8) | 2 | 2.9 | (0.0–7.5) | 27 | 3.2 | (1.5–4.8) |
| Non-Hispanic White | 296 | 80.1 | (74.0–86.2) | 16 | 68.3 | (52.4–84.3) | 312 | 79.1 | (73.1–85.2) |
| Non-Hispanic Black | 115 | 10.2 | (6.4–14.0) | 17 | 27.7 | (14.3–41.1) | 132 | 11.6 | (7.8–15.5) |
| Other Race | 27 | 3.9 | (1.5–6.2) | 1 | 1.1 | (0.0–3.6) | 28 | 3.6 | (1.5–5.8) |
| Total | 486 | 100 | (__–__) | 36 | 100 | (__–__) | 522 | 100 | (__–__) |
| Served in a foreign country | |||||||||
| Yes | 261 | 52.4 | (46.2–58.6) | 14 | 36.8 | (18.7–54.9) | 275 | 51.1 | (45.7–56.5) |
| No | 224 | 47.6 | (41.4–53.8) | 22 | 63.2 | (45.1–81.3) | 246 | 48.9 | (43.5 –54.3) |
| Missing | 1 | 0.6 | (0.0–2.0) | 0 | . | (.–.) | 1 | 0.6 | (0.0–1.8) |
| Total | 486 | 100 | (__–__) | 36 | 100 | (__–__) | 522 | 100 | (.–.) |
| Hepatitis A antibody | |||||||||
| Positive | 205 | 37.7 | (34.0–41.4) | 15 | 39.7 | (18.0–61.3) | 220 | 37.9 | (34.8–40.9) |
| Negative | 268 | 62.3 | (58.6–66.0) | 20 | 60.3 | (38.7–82.0) | 288 | 62.1 | (59.1–65.2) |
| Missing | 13 | 1.7 | (0.7–2.7) | 1 | 2.1 | (0.0–6.0) | 14 | 1.7 | (0.8–2.7) |
| Total | 486 | 100 | (__–__) | 36 | 100 | (__–__) | 522 | 100 | (__–__) |
| Median age in years at screening | 486 | 64.2 | (51.3–73.0) | 36 | 50.3 | (41.1–53.8) | 522 | 63.5 | (49.5–72.2) |
[i] π = Analysis domain sample size.
€ = By-group variable.
£ = column for listing factor variables labels and corresponding categories.
@ = column for listing raw frequencies.
¥ = column for listing weighted column/row/prevalence % (for categorical factors) or median/mean (for continuous factors).
$ = column for weighted 95% confidence interval (for column/row/prevalence/mean % estimates) or interquartile range, IQR (for median estimates).
Table 3
Socio-demographic characteristics by Hepatitis A status (Row %), N = 522.
| CHARACTERISTIC | POSITIVE | NEGATIVE | MISSING | ||||||
|---|---|---|---|---|---|---|---|---|---|
| UNWEIGHTED N/N | WEIGHTED % (OR MEDIAN) | 95% CL (OR IQR) | UNWEIGHTED N/N | WEIGHTED % (OR MEDIAN) | 95% CL (OR IQR) | UNWEIGHTED N/N | WEIGHTED % (OR MEDIAN) | 95% CL (OR IQR) | |
| Gender | |||||||||
| Male | 205/486 | 37.1 | (33.6–40.6) | 268/486 | 61.2 | (57.3–65.2) | 13/486 | 1.7 | (0.7–2.7) |
| Female | 15/36 | 38.9 | (17.3–60.4) | 20/36 | 59.0 | (38.2–79.9) | 1/36 | 2.1 | (0.0–6.0) |
| Total | 220/522 | 37.2 | (34.4–40.1) | 288/522 | 61.0 | (57.7–64.4) | 14/522 | 1.7 | (0.8–2.7) |
| Age in years at screening | |||||||||
| 20–39 | 39/52 | 82.4 | (72.6–92.2) | 12/52 | 16.9 | (7.1–26.7) | 1/52 | 0.7 | (0.0–2.3) |
| 40–59 | 50/138 | 30.8 | (23.1–38.5) | 85/138 | 67.9 | (59.7–76.1) | 3/138 | 1.3 | (0.0–2.6) |
| >= 6060 | 131/332 | 30.1 | (25.3–34.9) | 191/332 | 67.7 | (62.4–73.1) | 10/332 | 2.2 | (0.4–3.9) |
| Total | 220/522 | 37.2 | (34.4–40.1) | 288/522 | 61.0 | (57.7–64.4) | 14/522 | 1.7 | (0.8–2.7) |
| Race/Hispanic origin | |||||||||
| Mexican American | 14/23 | 67.1 | (41.3–92.8) | 9/23 | 32.9 | (7.2–58.7) | 0/23 | . | (.–.) |
| Other Hispanic | 17/27 | 62.1 | (30.6–93.6) | 9/27 | 34.5 | (5.5–63.6) | 1/27 | 3.3 | (0.0–11.2) |
| Non-Hispanic White | 114/312 | 33.7 | (30.3–37.2) | 193/312 | 65.1 | (61.1–69.0) | 5/312 | 1.2 | (0.0–2.3) |
| Non-Hispanic Black | 59/132 | 44.1 | (35.7–52.4) | 67/132 | 51.5 | (42.8–60.1) | 6/132 | 4.5 | (1.1–7.8) |
| Other Race-Racial | 16/28 | 49.6 | (23.2–76.1) | 10/28 | 45.2 | (15.1–75.2) | 2/28 | 5.2 | (0.0–11.6) |
| Total | 220/522 | 37.2 | (34.4–40.1) | 288/522 | 61.0 | (57.7–64.4) | 14/522 | 1.7 | (0.8–2.7) |
| Served in a foreign country | |||||||||
| Yes | 134/275 | 47.3 | (41.2–53.4) | 130/275 | 50.0 | (43.5–56.6) | 11/275 | 2.7 | (0.9–4.6) |
| No | 86/246 | 27.2 | (18.4–35.9) | 157/246 | 72.1 | (63.1–81.1) | 3/246 | 0.7 | (0.0–1.7) |
| Missing | 0/1 | . | (.–.) | 1/1 | 100 | (.–.) | 0/1 | . | (.–.) |
| Total | 220/522 | 37.2 | (34.4–40.1) | 288/522 | 61.0 | (57.7–64.4) | 14/522 | 1.7 | (0.8–2.7) |
Table 4
Distribution of Hepatitis A prevalence by selected socio-demographic characteristics and sex (Prevalence %), N = 522.
| CHARACTERISTIC | MALE | FEMALE | TOTAL | ||||||
|---|---|---|---|---|---|---|---|---|---|
| UNWEIGHTED N/N | WEIGHTED PREV. % | 95% CL | UNWEIGHTED N/N | WEIGHTED PREV. % | 95% CL | UNWEIGHTED N/N | WEIGHTED PREV. % | 95% CL | |
| Age in years at screening | |||||||||
| 20–39 | 36/46 | 86.4 | (76.0–96.7) | 3/6 | 53.3 | (1.0–100) | 39/52 | 82.4 | (72.6–92.2) |
| 40–59 | 42/114 | 31.4 | (22.4–40.3) | 8/24 | 28.4 | (7.5–49.3) | 50/138 | 30.8 | (23.1–38.5) |
| >= 6060 | 127/326 | 29.3 | (24.8–33.7) | 4/6 | 58.3 | (7.9–100) | 131/332 | 30.1 | (25.3–34.9) |
| Total | 205/486 | 37.1 | (33.6–40.6) | 15/36 | 38.9 | (17.3–60.4) | 220/522 | 37.2 | (34.4–40.1) |
| Race/Hispanic origin | |||||||||
| Mexican American | 14/23 | 67.1 | (41.3–92.8) | 0/0 | . | (.–.) | 14/23 | 67.1 | (41.3–92.8) |
| Other Hispanic | 15/25 | 58.9 | (24.9–93.0) | 2/2 | 100 | (.–.) | 17/27 | 62.1 | (30.6–93.6) |
| Non-Hispanic White | 108/296 | 33.6 | (29.2–37.9) | 6/16 | 36.0 | (9.1–62.8) | 114/312 | 33.7 | (30.3–37.2) |
| Non-Hispanic Black | 53/115 | 45.8 | (35.6–55.9) | 6/17 | 37.2 | (14.3–60.2) | 59/132 | 44.1 | (35.7–52.4) |
| Other Race | 15/27 | 48.3 | (21.5–75.2) | 1/1 | 100 | (.–.) | 16/28 | 49.6 | (23.2–76.1) |
| Total | 205/486 | 37.1 | (33.6–40.6) | 15/36 | 38.9 | (17.3–60.4) | 220/522 | 37.2 | (34.4–40.1) |
| Served in a foreign country | |||||||||
| Yes | 127/261 | 46.6 | (39.8–53.3) | 7/14 | 58.2 | (29.1–87.3) | 134/275 | 47.3 | (41.2–53.4) |
| No | 78/224 | 27.1 | (17.9–36.3) | 8/22 | 27.6 | (2.1–53.1) | 86/246 | 27.2 | (18.4–35.9) |
| Missing | 0/1 | . | (.–.) | 0/0 | . | (.–.) | 0/1 | . | (.–.) |
| Total | 205/486 | 37.1 | (33.6–40.6) | 15/36 | 38.9 | (17.3–60.4) | 220/522 | 37.2 | (34.4–40.1) |


Example 1
Sample %svy_freqs macro call to output column percentages.


Example 2
Sample %svy_freqs macro call to output row percentages.


Example 3
Sample %svy_freqs macro call to output prevalence percentages.
