Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Stepwise tool throwing error after Count Regression

anishgrandhi
7 - Meteor

Hi All,

 

I get the following error after using Stepwise tool -

 

Ayx Stepwise error.png

 

The workflow is attached the post. The data is basically a survey data where participants answer yes or no. Yes is marked as 1 or else it is 0. We want to predict the variable Case. We use SAS code for this analysis but I am trying to replicate the process in Alteryx.

 

SAS Code.png

 

Is there a better way to do this/ what mistake am I doing here?

3 REPLIES 3
CharlieS
17 - Castor
17 - Castor

Hi @anishgrandhi 

 

I can help with what's causing the error and how to resolve it, but for suggestions beyond that, we might need to call in some support.

 

Troubleshooting steps:

- What's sending the error? You can see in the error message that Tool #5 inside the Stepwise tool is the source. If we right click > open the Stepwise tool (read: macro), we can find the lines of R code that control this specific message:

 

 

} else if (!(any(class(orig.model)[1] %in% c("glm", "svyglm", "lm", "rxLogit", "rxGlm", "rxLinMod")))) {
  stop.Alteryx("Stepwise variable selection is only relevant for models created using the Linear, Logistic, and Count Regression tools.")

 

 

- Now that we know that that's the list of model objects that are accepted, we need to find out what is being sent by the Count Regression tool. This Community post shows how you can use an R tool to display the model object properties. When I add this to the the workflow, this is what we see:

 

20200709-CountStepwise.PNG

 

- Ah, the "glm.nb" is not in the approved list. What's the ".nb"? That's the negative binomial model type you selected on the Count Regression tool. Change that to Poisson and the Stepwise tool is happy. 

 

 

 

It's interesting that if the "Quasi-Poisson" option is selected, there's a specific error message in the Stepwise tool saying "Stepwise methods do not work for models in the quasipoisson family". Which tells me that maybe the error handing in the Stepwise tool should be updated for Negative Binomial selections. 

anishgrandhi
7 - Meteor

This helps with understanding why the error message was thrown. Any improvements in the later versions of Alteryx? We are currently using 2019.2.

CharlieS
17 - Castor
17 - Castor

I just tested this workflow in Designer 2020.2.3.27789 and received all the same results. 

Labels