Skip to content

Fix failing *marginaleffects* test #1048

@strengejacke

Description

@strengejacke
library(testthat)
library(parameters)
x <- lm(Sepal.Width ~ Species * Petal.Length, data = iris)
model <- marginaleffects::avg_slopes(x, newdata = insight::get_datagrid(x, by = "Species"), variables = "Petal.Length")
out <- parameters(model)
expect_identical(nrow(out), 1L)
cols <- c("Parameter", "Comparison", "Coefficient", "SE", "Statistic", "p", "S", "CI", "CI_low", "CI_high")
expect_true(all(cols %in% colnames(out)))
#> Error: all(cols %in% colnames(out)) is not TRUE
#> 
#> `actual`:   FALSE
#> `expected`: TRUE

Created on 2024-11-26 with reprex v2.1.1

@vincentarelbundock The column "Comparison" is no longer available in the latest marginaleffects update, is that correct?

Metadata

Metadata

Assignees

Labels

Bug 🐛Something isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions