Chapter 14 Simple statistics and contingency tables

  • Univariate statistics (1 variable)
    • mean(x): Mean
    • sd(x): Standarddeviation
    • var(x): Variance
    • median(x): Median
    • min(x): Minimum
    • max(x): Maximum


  • Bivariate statistics (2 variables)
    • cov(): Covariance
    • cor(): Correlation
    • cor(x,y,method="kendall") # Kendall’s 0
    • ?cor: Check helpfile


  • Contingency tables
    • table(x): Onedimensional contingency table
    • table(x,y): Twodimensional contingency table
    • prop.table(table(x)): Onedimensional contingency table with proportions
    • 100*prop.table(table(x)): Onedimensional contingency table with proportions in percent