Learn R Programming

DBERlibR (version 0.1.3)

one_way_repeated_anova: One-way Repeated Measures ANOVA

Description

This function automatically merges pre, post, and post2 datasets, and then runs the one-way repeated measures ANOVA with assumptions check all at once. Please make sure to name data files accurately (i.e., “data_treat_pre.csv”, “data_treat_post.csv”, and “data_treat_post2.csv”) and have them saved in the working directory.

Usage

one_way_repeated_anova(
  treat_pre_csv_data,
  treat_post_csv_data,
  treat_post2_csv_data,
  m_cutoff = 0.15
)

Value

This function returns a tibble() including the following information:

  • n_students_deleted: Number of students deleted from the data for analysis based on the percentage obtained via the argument of m_cutoff

  • descriptive_statistics: Descriptive statistics

  • boxplots: Boxplots - visual presentation of the descriptive statistics

  • shapiro_wilk_test: Shapiro-Wilk test results to determine normality of residuals

  • normal_qq_plot: The normal q-q plot to visually inspect the normality of residuals

  • one_way_repeated_anova: Results of the one-way repeated measures ANOVA

  • one_way_repeated_anova_pwc: Pairwise t-test results for the one-way repeated measures ANOVA

  • friedman_test: Results of the friedman test

  • friedman_pwc: Pairwise t-test results for the Friedman test

Arguments

treat_pre_csv_data

This function requires a csv file with treatment group's pre-test data. Its name (e.g., "data_treat_pre.csv") can be passed as an argument. Make sure to set the folder with the data file(s) as the working directory.

treat_post_csv_data

This function requires a csv file with treatment group's post-test data. Its name (e.g., "data_treat_post.csv") can be passed as an argument. Make sure to set the folder with the data file(s) as the working directory.

treat_post2_csv_data

This function requires a csv file with treatment group's post2-test. Its name (e.g., "data_treat_post2.csv") can be passed as an argument. Make sure to set the folder with the data file(s) as the working directory.

m_cutoff

This package will treat skipped answers as incorrect. However, too many skipped answers may skew the results of the data analysis. User can can provide a cutoff for the proportion of skipped answers. For example, if the user enters 0.1, students who skipped more than 10 percent of the answers will be excluded from the data analysis to prevent skewed results. The default of 0.15 is commonly applied as a rule of thumb.

Examples

Run this code
# Run the following codes directly in the console panel. The plots
# generated through the link above may be displaced depending on the screen
# resolution.
one_way_repeated_anova(treat_pre_csv_data =
       system.file("extdata", "data_treat_pre.csv", package = "DBERlibR"),
       treat_post_csv_data =
       system.file("extdata", "data_treat_post.csv", package = "DBERlibR"),
       treat_post2_csv_data =
       system.file("extdata", "data_treat_post2.csv", package = "DBERlibR"),
       m_cutoff = 0.15)

Run the code above in your browser using DataLab