Logistic Regression in Knime R Snippet returning incorrect coefficients

,

I’ve got a serious problem with the logistic regression results from an R snippet node which is leading to some incorrect and downright embarrassing likelihood conclusions. Here are the correct results I’ve verified with colleagues and ran on multiple computers in R Studio. Notice the negative intercept and coefficient:

But running this in an R Snippet produces these same numbers but without the negative sign:

This is a HUGE problem because the next step after this is to exponentiate that coefficient. If it’s not accurately including the negative sign when it’s supposed to, that leads to a very wrong exponentiated odds ratio and incredibly bad advice given to end users. This is beyond bad and has already caused me a little bit of embarrassment. Please advise.

This isn’t a fix, but have you tried the Knime logistic regression nodes?

1 Like

@austinrecords can you provide a sample workflow? One showing this problem.

2 Likes

Thanks for responding, rfeigel. I attempted using the Knime logistic regression learner and it correctly matches the intercept (top row) but unfortunately gets the coefficient row (bottom row) wrong. It’s negative now at least, but still wrong. As a huge fan of Knime, this troubles me.

Thanks for responding, mlauber71. Unfortunately I cannot post the workflow at this time. It is too massive and contains a ton of data for my job. If I get time, I’ll try to pull out just this piece and scramble the data so I can have a workflow to post here.