Turn on suggestions

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

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Re: Graph Builder. Show Standardized column with exclusions and grouping

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
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Dec 19, 2018 11:00 AM
(409 views)

I'm trying to show a standardized value that is standardized for each X using graph builder. I would also like it to update on exclusions (recalc the mean and stdDev). The problem with this script is that it doesn't do either. I could make two charts using a summary table but even then, summary tables don't update on exclusion.

```
Names default to here(1);
dt = open("$SAMPLE_DATA\Big Class.jmp");
dt << Select Where(:height < 60) << exclude(1);
dt << Clear select;
dt << Graph Builder(
Size( 528, 448 ),
Show Control Panel( 0 ),
Variables(
X( :age ),
Y( :height ),
Y(
Transform Column(
"Standardize[height]",
Formula( Col Standardize( :height ) )
)
)
),
);
```

I want each age group to be centered on 0.

Anyone have a good idea?

- Tags:
- graph builder

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted
Solution

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

Col Standardize seems not to support optional by arguments. And the Col Stat() functions generally ignore row states.

Try this:

```
Names Default To Here(1);
dt = Open("$SAMPLE_DATA\Big Class.jmp");
dt << Graph Builder(
Size(528, 448),
Show Control Panel(0),
Variables(
X(:age),
Y(:height),
Y(
Transform Column(
"Standardize[height]",
Formula((:height - Col Mean(:height, :age, Excluded(Row State()))) / Col Std Dev(:height, :age, Excluded(Row State())))
)
)
)
);
```

2 REPLIES 2

Highlighted
Solution

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

Col Standardize seems not to support optional by arguments. And the Col Stat() functions generally ignore row states.

Try this:

```
Names Default To Here(1);
dt = Open("$SAMPLE_DATA\Big Class.jmp");
dt << Graph Builder(
Size(528, 448),
Show Control Panel(0),
Variables(
X(:age),
Y(:height),
Y(
Transform Column(
"Standardize[height]",
Formula((:height - Col Mean(:height, :age, Excluded(Row State()))) / Col Std Dev(:height, :age, Excluded(Row State())))
)
)
)
);
```

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

Re: Graph Builder. Show Standardized column with exclusions and grouping

Brilliant mate. This is exactly what I want.