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

- JMP User Community
- :
- Discussions
- :
- Can the Sunmary of these steps be done in a matrix using JSL?

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

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Feb 20, 2020 12:05 AM
(943 views)

For example, in this file "Big Class.jmp", only the "sex"="F" is screened, the average "height" of the male is calculated for each age, and then the sum of the average height of the several.

Can't appear text specification in matrix?If so, should replace the "sex"="F" with "sex"=1 first?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

I'm not quite sure what you want to accomplish, so I'm guessing a little. If you want to avoid table operations for some reason, you may be able to take advantage of 'Summarize()'. Use 'Help > Scripting Index' for more details.

So, for example:

```
NamesDefaultToHere(1);
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
// Because we use two 'By' variables, exg will be a list of lists.
// exm contains the mean of each group speciifed by the combination of 'By' variable levels
Summarize( dt1, exg = By( :age, :sex ), exm = Mean( :height ) );
// Sum the means for all the female groups to get 367.7
s = Sum(exm[Loc(exg[2], "F")]);
```

3 REPLIES 3

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Can the Sunmary of these steps be done in a matrix using JSL?

Created:
Feb 20, 2020 12:13 AM
| Last Modified: Feb 20, 2020 12:19 AM
(942 views)
| Posted in reply to message from lwx228 02-20-2020

I can only do so now, but do not know how to operate in the matrix, Thanks!

As long as the sum of the average heights is obtained during the JSL run, it does not need to be displayed in the table.

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

I'm not quite sure what you want to accomplish, so I'm guessing a little. If you want to avoid table operations for some reason, you may be able to take advantage of 'Summarize()'. Use 'Help > Scripting Index' for more details.

So, for example:

```
NamesDefaultToHere(1);
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
// Because we use two 'By' variables, exg will be a list of lists.
// exm contains the mean of each group speciifed by the combination of 'By' variable levels
Summarize( dt1, exg = By( :age, :sex ), exm = Mean( :height ) );
// Sum the means for all the female groups to get 367.7
s = Sum(exm[Loc(exg[2], "F")]);
```

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Can the Sunmary of these steps be done in a matrix using JSL?

This method should be used frequently.

Thank ian!

Article Labels

There are no labels assigned to this post.