tidymodels / broom

Convert statistical analysis objects from R into tidy format
https://broom.tidymodels.org
Other
1.43k stars 302 forks source link

No tidy method for objects of class npregression #1185

Closed cretecht closed 7 months ago

cretecht commented 7 months ago

I'm running specr and np, here's the code:

kde.reg <- function(formula, data){
  bw <- npregbw(formula=as.formula(formula),
                data = data,
                nmulti = 5,
                ckertype = "epanechnikov", ukertype = "liracine",
                regtype="lc", bwmethod="cv.aic")
  npreg(bw)
}

test_specs <- setup(data = test_df,
                    y = c("y1", "y2"),
                    x = c("x1", "x2", "x3"),
                    model = "kde.reg"
                    )

summary(test_specs, rows = 50)
test_results <- specr(test_specs)

I encounter the tidy error because specr calls tidy at some point. The traceback call has tidy.default(x, conf.int = TRUE), then the error follows it. Is there some way to resolve this issue?

simonpcouch commented 7 months ago

Thanks for the issue! This issue sounds like it would be better addressed in the specr package; I'd recommend opening an issue there.

github-actions[bot] commented 6 months ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.