Description Usage Arguments Value Author(s) See Also Examples
View source: R/ageStdCrossTab.R
This function calculates age-standardized cross-tab frequencies for two variables
1 | ageStdCrossTab(dat,mar=2,agedist,age,var,strata)
|
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) |
Data frame including the only the age-adjusted row/column percents
Maret Maliniak
1 2 3 4 5 6 7 | df <- example.data
mytable <- ageStdCrossTab(dat=df,
mar=2,
agedist="YEARS00",
age="age92m",
var="bmicat92",
strata="sex")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.