Regression In loop


I am trying to find price elasticity of a set of products. For this I have 2 categorical variables. Country and Product ID. Since price elasticity is for a individual product, I need to loop through the group of rows created by combination of Country and Product ID.
How can I run the regression in loop to collect the regression coefficients for every single Product ID.


Hi there!

For Loop you have Group Loop Start node that should do it. You can put both Country and Product ID in it. For finish you got Loop End node. In between I leave to you :slight_smile:

Good luck!


Thanks Ivan. I did accomplish that along with capturing the variables for every loop using Constant Value node.

1 Like

Hi Niki,

you are welcome :slight_smile:


I have the same issue. I did the loop but in the Loop End I’m not getting the column by which the regression was grouped. Is that configured in Constant Value Column?
I would be grateful for help.

Hello @Jadzia,

and welcome to KNIME Community!

Yes, you can use Constant Value Column and configure it to take value from flow variable (all your grouping columns will be available as flow variables). But maybe easier you can use Variable to Table Column node.

If you don’t know about flow variable and how to use them see here for more:


1 Like