ageStdCrossTab: Age-standardized frequencies

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ageStdCrossTab.R

Description

This function calculates age-standardized cross-tab frequencies for two variables

Usage

1
ageStdCrossTab(dat,mar=2,agedist,age,var,strata)

Arguments

dat

data frame used for the analysis

mar

1= row percents, 2=column percents (default)

agedist

Age-specific standardized weights. See documentaion on ?nutweightlist for details

age

Character vector for your age at baseline variable. This could be "AGE_INT" or "AGE92M", etc.

var

Character vector for the primary frequency variable (typically formatted as the row variables)

strata

Character/factor vector for the strata variable for which you need frequencies (typically formatted as your column variable)

Value

Data frame including the only the age-adjusted row/column percents

Author(s)

Maret Maliniak

See Also

weightlist

Examples

1
2
3
4
5
6
7
df <- example.data
mytable <- ageStdCrossTab(dat=df,
                         mar=2,
                         agedist="YEARS00",
                         age="age92m",
                         var="bmicat92",
                         strata="sex")

buddha2490/BERG documentation built on Feb. 7, 2020, 6:01 p.m.