I am having a problem getting the chisq_hat function to work. I put in price and pieces, which are both numerical values and it always gives me an error. Here is the code chunk I used and the resulting error. Any ideas on how to get it to work?
Chisq_hat <- lego_population %>%
specify(formula = price ~ pieces) %>%
hypothesize(null = "independence") %>%
calculate(stat = "Chisq")
Error: A chi-square statistic is not well-defined for a numeric response variable (price) and a numeric explanatory variable (pieces).