Hi,
I'm trying to fit data in group and get slope and R squared number. I'm using Fishing data set as an example here.
I stacked the data so that the summary will be outputted easily as one single column then I need to spread the columns again.
So I did
fishing_stacked = dt << Stack(
columns(
:Fish Caught,
:Live Bait,
:Fishing Poles,
:Camper,
:People,
:Children,
:Fished
),
Source Label Column( "Label" ),
Stacked Data Column( "Data" )
);

I want to group the data by Validation column and fit (Y axis = Fish cought )and X axis are "Live Bait, Fishing Poles, Camper ...." and get the slope value and R squared number as new columns.
Here is the previous post but I don't know how to apply it to my data set.
https://community.jmp.com/t5/Discussions/Save-Parameter-Estimates-of-Linear-Regression-with-by-Variable/td-p/13123