| model_table | R Documentation |
Generates an APA-formatted HTML table of model estimates that opens in the RStudio Viewer. Provides publication-ready tables with proper formatting for Bayesian model results.
model_table(
object,
selector,
digits = 3,
caption = NULL,
show_chains = TRUE,
show_neff = FALSE
)
object |
A |
selector |
Optional character string specifying variable name or block to display. If missing, creates separate tables for each variable. |
digits |
Integer specifying number of decimal places. Default is 3. |
caption |
Optional character string for table caption. |
show_chains |
Logical indicating whether to show chain information. Default is TRUE. |
show_neff |
Logical indicating whether to show effective sample size. Default is FALSE. |
The function creates APA-style tables with the following features:
Proper coefficient formatting with confidence intervals
Organized sections for different parameter types
Publication-ready styling
Responsive design for different screen sizes
Tables are displayed in the RStudio Viewer pane and can be exported or copied.
Invisibly returns the HTML content. Primary purpose is displaying in Viewer.
# Generate Data
mydata <- rblimp_sim(
c(
'x ~ normal(0, 1)',
'y ~ normal(10 + 0.5*x, 1)'
),
n = 100,
seed = 10972
)
# Fit model
model <- rblimp(
'y ~ x',
mydata,
seed = 10972,
burn = 1000,
iter = 1000
)
# Create APA table for all variables
model_table(model)
# Create table for specific variable
model_table(model, "y")
# Customize formatting
model_table(model, digits = 2, caption = "Bayesian Model Results")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.