Jun 30, 2020 12:07 PM
| Last Modified: Jun 30, 2020 12:27 PM(109 views)
I am trying to script a fit X by Y with a by variable, then fit each with a polynomial (degree = 2) and then extract the "summary of fit" data (specifically the R Square and number of observations) to a data table. As an example I was working with the Car Physical Data sample set. For example use Weight as the Y, Horsepower as the X, and Type as the By. Then fit with each group with a 2nd order poly. extract all summary of fit diagnostics using make combined data table. I know how to do it with the gui but need to script it to perform much larger operation.
I suggest that you actually get the result you want interactively. Then click the red triangle for the result for one of the By groups and select Save Script > To Script Window. Now just change the Where( :by = xxx ) to By( :by ).