Creates a table of means and standard deviations for a 2-way ANOVA design in APA style

apa.2way.table(iv1, iv2, dv, data, filename = NA, table.number = NA,
  show.conf.interval = FALSE, show.marginal.means = FALSE,
  landscape = TRUE)

Arguments

iv1

Name of independent variable 1 column in data frame

iv2

Name of independent variable 2 column in data frame

dv

Name of dependent variable column in data frame

data

Project data frame name

filename

(optional) Output filename document filename (must end in .rtf or .doc only)

table.number

Integer to use in table number output line

show.conf.interval

(TRUE/FALSE) Display confidence intervals in table. Negates show.marginal.means = TRUE.

show.marginal.means

(TRUE/FALSE) Show marginal means in output. Only used if show.conf.interval = FALSE.

landscape

(TRUE/FALSE) Make RTF file landscape

Value

APA table object

Examples

# Example 2: 2-way from Fidler & Thompson (2001) apa.2way.table(iv1=a,iv2=b,dv=dv,data=fidler_thompson,landscape=TRUE, filename="ex2_desc_table.doc")
#> #> #> Means and standard deviations for dv as a function of a 2(a) X 4(b) design #> #> b #> 1 2 3 4 #> a M SD M SD M SD M SD #> 1 1.00 1.00 2.00 1.00 3.00 1.00 3.00 1.00 #> 2 2.00 1.00 3.00 1.00 2.00 1.00 4.00 1.00 #> #> Note. M and SD represent mean and standard deviation, respectively. #>
# Example 3: 2-way from Field et al. (2012) Discovery Statistics Using R apa.2way.table(iv1=gender,iv2=alcohol,dv=attractiveness,data=goggles,filename="ex3_desc_table.doc")
#> #> #> Means and standard deviations for attractiveness as a function of a 2(gender) X 3(alcohol) design #> #> alcohol #> None 2 Pints 4 Pints #> gender M SD M SD M SD #> Female 60.62 4.96 62.50 6.55 57.50 7.07 #> Male 66.88 10.33 66.88 12.52 35.62 10.84 #> #> Note. M and SD represent mean and standard deviation, respectively. #>