Preliminaries

You can find the solutions for this exercise as well as the following ones in the exercises folder in the workshop material. You can also navigate the workshop material online (including exercises and solutions).

You can copy code from the exercise and solution files by clicking on the small blue clipboard icon in the upper right corner of the boxes showing the code.

Exercises

In this exercise you will typeset the results of statistical analyses that may not yet be supported by apa_print() out of the box.

Exercise 1

Create tidy data.frames for the results of the following robust regression analysis.

data(coleman, package = "robustbase")
robust_lm <- lmrob(Y ~ ., data=coleman)
Use the functions broom::tidy() and broom::glance().



Exercise 2

Typset the tidy data.frames of robust regression analysis.

Use, for example, the following functions

  • apa_num()
  • apa_p()
  • apa_df()
  • apa_interval()



Exercise 3

Put the results together using apa_glue_results() and add_glue_to_apa_results().
Use sanitize_terms() to quickly ensure valid sublist names.



Bonus

Bonus 1

Make the tidy data.frame, which contains the regression coefficients, more presentable.

  • Remove an redundant columns, and
  • Use the function variable_lables() to assign labels to each column.



Bonus 2

Write a function that performs all of the above processing steps, so it can be swiftly applied to many regression results.



Solutions

After you have tried yourself, feel free to have a look at our solutions.