format model parameters in APA style
Usage
apa_parameters(
fit,
predictor_parameters = c("Coefficient", "SE", "Std_Coefficient", "t", "df_error", "p"),
starred = NULL,
bolded = NULL,
parameter_formatter = NULL,
t_with_df = TRUE
)
# S3 method for class 'lm'
apa_parameters(
fit,
predictor_parameters = c("Parameter", "Coefficient", "SE", "Std_Coefficient", "t", "p"),
starred = NA,
bolded = NA,
parameter_formatter = NULL,
t_with_df = TRUE
)
# S3 method for class 'list'
apa_parameters(
fit,
predictor_parameters = c("Parameter", "Coefficient", "SE", "Std_Coefficient", "t", "p"),
starred = NA,
bolded = NA,
parameter_formatter = NULL,
t_with_df = TRUE
)
Arguments
- fit
model fit object
- predictor_parameters
predictor parameters to display. If named vector, column names will be vector names
- starred
columns to star with significant p_values
- bolded
columns to bold, if significant
- parameter_formatter
parameter_formatter object to format columns. If NULL, the default parameter_formatter is used.
- t_with_df
if TRUE, the t column will be displayed with degrees of freedom in parentheses. If FALSE, only the t value is displayed.
Examples
lm(mpg ~ cyl + wt, data = mtcars) |>
apa_parameters() |>
apa_flextable()
Variable
B
SE
β
t(29)
p
Constant
39.69
1.71
.00
23.14
<.001
Cyl
−1.51
0.41
−.45
−3.64
.001
Wt
−3.19
0.76
−.52
−4.22
<.001