cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
BioMikey
Level I

Custom Error Bars Using the Graph Builder

I love the graph builder, but there is one type of analysis that should be easy, but alas is not. I can easily use the graph builder to add 1 standard deviation error bars, but I am doing some regulatory work that requires 3 standard deviation error bars. It sure would be nice if I could adjust that with a drop down menu. Do you all know of an easy fix for that?

 

Thank you,

BioMike

1 REPLY 1
txnelson
Super User

Re: Custom Error Bars Using the Graph Builder

I do not see an option that will allow you to change the STD for the error bars, however, if you standardize the Y variable to where the mean is equal to the current mean, but the STD is 3 times the size of the current STD, then you will get the chart you want.  Below is an example showing the use of a Transform formula to show you what I am talking about

errorbars.PNG

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
	Variables(
		X( :sex ),
		Y( :weight ),
		Y(
			Transform Column(
				"Transform[weight]",
				Formula(
					inSTDs = Abs( :weight - Col Mean( :weight, :sex ) ) /
					Col Std Dev( :weight, :sex );
					If( :weight >= Col Mean( :weight, :sex ),
						Col Mean( :weight, :sex ) + 3 * inSTDs *
						Col Std Dev( :weight, :sex ),
						Col Mean( :weight, :sex ) - 3 * inSTDs *
						Col Std Dev( :weight, :sex )
					);
				)
			),
			Position( 1 )
		)
	),
	Elements(
		Line(
			X,
			Y( 1 ),
			Y( 2 ),
			Legend( 4 ),
			Error Bars( "Standard Deviation" )
		)
	)
);
Jim