BookmarkSubscribeRSS Feed
Choose Language Hide Translation Bar
vince_faller
Super User

Graph Builder. Show Standardized column with exclusions and grouping

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?

Vince Faller - Predictum
0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User ms
Super User

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

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
ms
Super User ms
Super User

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

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())))
            )
        )
    )
);
Highlighted
vince_faller
Super User

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

Brilliant mate.  This is exactly what I want.  

Vince Faller - Predictum
0 Kudos