Recreating APA Manual Table 7.19 in R with apa7

Demonstration of the apa7 package, a flextable extension package
R
APA Style
Author
Affiliation
Published

September 29, 2025

Making tables in APA style (Part 19 of 24)

In this 24-part series, each of the tables in Chapter 7 of the Publication Manual of the American Psychological Association (7th Edition) is recreated with apa7, flextable, easystats, and tidyverse functions.

NoteHighlights
  • Presenting a sequence of regression models
library(apa7)
library(flextable)
library(ftExtra)
library(tidyverse)
library(easystats)
set_flextable_defaults(theme_fun = theme_apa, 
                       font.family = "Times New Roman")

Figure 1

Screenshot of the APA Manual’s Table 7.19

In the recreated table, the hanging indent for Modified latent change was omitted because the text is shorter than Simplex contemporaneous, which does not have a hanging indent.

```{r}
#| label: tbl-719
#| tbl-cap: "Comparison of Fit Indices in Models Fitted to Simulated Data Across Longitudinal Mediation Model Types"
#| apa-note: "AIC and BIC differences are relative to the simplex 
#|   lagged model. RMSEA = root-mean-square error of 
#|   approximation; CI = confidence interval; 
#|   AIC = Akaike information criterion; 
#|   BIC = Bayesian information criterion."

# Make data
d <- tibble(
             Model = c("Simplex lagged",
                       "Simplex contemporaneous",
                       "Latent growth",
                       "Modified latent change"),
  `&chi;^2^_Value` = c(63.3, 58, 65, 26.2),
     `&chi;^2^_df` = c(28L, 29L, 33L, 33L),
      `&chi;^2^_p` = c(1e-04, 0.001, 1e-04, 0.79),
       RMSEA_Value = c(0.044, 0.04, 0.039, 0),
    `RMSEA_95% CI` = c("[.030, .059]", "[.024, .054]",
                       "[.025, .053]", "[.000, .020]"),
           RMSEA_p = c(0.72, 0.87, 0.9, 0.999),
               AIC = c(13479, 13472, 13471, 13432),
               BIC = c(13658, 13646, 13627, 13588),
      `deltaAIC` = c(NA, -7L, -8L, -47L),
      `deltaBIC` = c(NA, -12L, -31L, -70L)
) 

# Format data
d_formatted <- d |> 
  mutate(RMSEA_Value = align_chr(
    RMSEA_Value, 
    accuracy = .001, 
    trim_leading_zeros = TRUE))

# Make table
d_formatted |> 
  apa_flextable(font_size = 11) |> 
  width(width = c(1.80, .45, .35, .45, .05, .40, 
                   .85, .35, .50, .50, .40, .40)) 
```

Table 1

Comparison of Fit Indices in Models Fitted to Simulated Data Across Longitudinal Mediation Model Types

Model

χ2

RMSEA

AIC

BIC

ΔAIC

ΔBIC

Value

df

p

Value

95% CI

p

Simplex lagged

63.30

28

<.001

.044

[.030, .059]

 .72

13,479

13,658

Simplex contemporaneous

58.00

29

 .001

.040

[.024, .054]

 .87

13,472

13,646

 −7

−12

Latent growth

65.00

33

<.001

.039

[.025, .053]

 .90

13,471

13,627

 −8

−31

Modified latent change

26.20

33

 .79 

.000

[.000, .020]

>.99

13,432

13,588

−47

−70

Note. AIC and BIC differences are relative to the simplex lagged model. RMSEA = root-mean-square error of approximation; CI = confidence interval; AIC = Akaike information criterion; BIC = Bayesian information criterion.

Citation

BibTeX citation:
@misc{schneider2025,
  author = {Schneider, W. Joel},
  title = {Recreating {APA} {Manual} {Table} 7.19 in {R} with Apa7},
  date = {2025-09-29},
  url = {https://wjschne.github.io/posts/apatables/apa719.html},
  langid = {en}
}
For attribution, please cite this work as:
Schneider, W. J. (2025, September 29). Recreating APA Manual Table 7.19 in R with apa7. Schneirographs. https://wjschne.github.io/posts/apatables/apa719.html