Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Jun 30, 2020 12:07 PM
| Last Modified: Jun 30, 2020 12:27 PM(314 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 ).