Abstract
This chapter covers methods to compare means across groups of study participants. Means can be the averages of continuous variables, e.g., hours of sleep when a drug is given or proportions of dichotomous variables, e.g., the proportions of students accepted by college admission. Nonparametric methods may be appropriate if the distribution of a continuous variable is skewed. In this case the nonparametric test (e.g., wilcox.test()) may be more appropriate than parametric test (e.g., t.test()). Comparisons of proportions can be made by prop.test() or chisq.test(). If the sample size is small, fisher.test() is more appropriate than chisq.test(). More generally, loglinear modeling using loglin() can address mutliway contingency tables. We use loglin() to test a mediation effect.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Wickens used the term ‘mediated’ but we believe “moderated” is a better fit because mediation relationships typically imply temporal causation which is not available in this example. Either way, it is really about the conditional independence hypothesis in a 3-way contingency table.
- 2.
Fisher’s test is versatile; fisher.test() is not limited to 2 ×2 tables, it can handle tables more complex than a 2 ×2 table.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2012 Springer Science+Business Media, LLC
About this chapter
Cite this chapter
Li, Y., Baron, J. (2012). Statistics for Comparing Means and Proportions. In: Behavioral Research Data Analysis with R. Use R!. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-1238-0_3
Download citation
DOI: https://doi.org/10.1007/978-1-4614-1238-0_3
Published:
Publisher Name: Springer, New York, NY
Print ISBN: 978-1-4614-1237-3
Online ISBN: 978-1-4614-1238-0
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)