Skip to content

Error using mtab2df when tab_model contains a stan_lmer model #2

@gidonc

Description

@gidonc

Converting sjPlot::tab_model regression tables using mtab2df fails with error when the regression table contains a stan_lmer model
For example

library(rstanarm)
f1 <- stan_lmer(Sepal.Length ~ Sepal.Width + (1|Species), iris)
m_table1 <- sjPlot::tab_model(f1)
sjtable2df::mtab2df(mtab=m_table1, n_models = 1)
Error in `[.data.table\`(stats_table, suppress_rows, `:=`((colnum), "")) : 
  LHS of := appears to be column positions but are outside [1,ncol] range. New columns can only be added by name.`

mtab2df successfully converts tab_model regression tables containing lmer models, which are nearly identical in structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions