Examples

To duplicate as many examples from SAS’s publication Proc Tabulate by Example, by Lauren E. Haworth, 1st Edition.

Example 1.3

data = read.table("http://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data",
        sep=",",header=F,col.names=c("age", "type_employer", "fnlwgt", "education", 
                "education_num","marital", "occupation", "relationship", "race","sex",
                "capital_gain", "capital_loss", "hr_per_week","country", "income"),
        fill=FALSE,strip.white=T)
html5(summary_table(sex ~ age + income + education_num, data),
      fragment=TRUE, inline="lancet.css", caption = "HTML5 Table Lancet Style", id="tbl4"
      )
HTML5 Table Lancet Style
NFemaleMaleTest Statistic
1077121790
age32561253546293848F1,32559 = 331.36,P = 0.0001
income : >50K325610
.
109
10.9 117910771
0
.
306
30.6 666221790
χ2
1
=
1518.89,
P = 0.0002
education_num325619101291013F1,32559 = 1.29,P = 0.2571
N is the number of non-missing value. 1Kruskal-Wallis test. 2Pearson test