turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- General Programming
- /
- How to group by in a JSL fit model script?

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-16-2014 05:24 PM

linfit=Fit Model(

Y( T ),

Effects( ts 2 ),

Personality( Standard Least Squares ),

Run model

);

linfit<<prediction formula;

I have a simple script using a fit model that saves the prediction formula to my current data table. It looks at a basketball player's points scored on a given night vs. what the opponent's defense typically allows. In the table, there are multiple players and duplicate values for each player. Instead of fitting a linear regression for all players and using one prediction formula, I'd like to fit a linear regression for each individual player, so that there are multiple prediction formulas within one column. When I let JMP create the script for me, the script just runs over and over with a "where player = X" clause for each player. The players change on a regular basis so this can't be used. I thought I could just add a "Group by(layers)," line after Effects(ts 2) but that isn't grouping anything for me. How do I go about using group by in a fit model script?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to mattdh88

09-16-2014 05:39 PM