cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP 19 is here! See the new features at jmp.com/new.
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
%3CLINGO-SUB%20id%3D%22lingo-sub-86610%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%EA%B7%B8%EB%9E%98%ED%94%84%20%EB%B9%8C%EB%8D%94%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%9C%20%EC%82%AC%EC%9A%A9%EC%9E%90%20%EC%A0%95%EC%9D%98%20%EC%98%A4%EB%A5%98%20%EB%A7%89%EB%8C%80%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-86610%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%EB%82%98%EB%8A%94%20%EA%B7%B8%EB%9E%98%ED%94%84%20%EB%B9%8C%EB%8D%94%EB%A5%BC%20%EC%A2%8B%EC%95%84%ED%95%98%EC%A7%80%EB%A7%8C%20%EC%89%AC%EC%9A%B4%20%EB%B6%84%EC%84%9D%EC%9D%B4%20%ED%95%84%EC%9A%94%ED%95%9C%20%EC%9C%A0%ED%98%95%EC%9D%B4%20%EC%9E%88%EC%A7%80%EB%A7%8C%20%EC%95%84%EC%95%84%EB%8A%94%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4.%20%EA%B7%B8%EB%9E%98%ED%94%84%20%EB%B9%8C%EB%8D%94%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%201%20%ED%91%9C%EC%A4%80%20%ED%8E%B8%EC%B0%A8%20%EC%98%A4%EC%B0%A8%20%EB%A7%89%EB%8C%80%EB%A5%BC%20%EC%89%BD%EA%B2%8C%20%EC%B6%94%EA%B0%80%20%ED%95%A0%20%EC%88%98%20%EC%9E%88%EC%A7%80%EB%A7%8C%203%20%ED%91%9C%EC%A4%80%20%ED%8E%B8%EC%B0%A8%20%EC%98%A4%EC%B0%A8%20%EB%A7%89%EB%8C%80%EA%B0%80%20%ED%95%84%EC%9A%94%ED%95%9C%20%EA%B7%9C%EC%A0%95%20%EC%9E%91%EC%97%85%EC%9D%84%ED%95%98%EA%B3%A0%20%EC%9E%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%20%EB%93%9C%EB%A1%AD%20%EB%8B%A4%EC%9A%B4%20%EB%A9%94%EB%89%B4%EB%A1%9C%20%EC%A1%B0%EC%A0%95%ED%95%A0%20%EC%88%98%20%EC%9E%88%EB%8B%A4%EB%A9%B4%20%EC%A2%8B%EC%9D%84%20%EA%B2%83%EC%9E%85%EB%8B%88%EB%8B%A4.%20%EB%8B%B9%EC%8B%A0%EC%9D%80%20%EB%AA%A8%EB%91%90%20%EC%89%BD%EA%B2%8C%20%ED%95%B4%EA%B2%B0%ED%95%A0%20%EC%88%98%20%EC%9E%88%EB%8A%94%EC%A7%80%20%EC%95%8C%EA%B3%A0%20%EC%9E%88%EC%8A%B5%EB%8B%88%EA%B9%8C%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%EA%B3%A0%EB%A7%99%EC%8A%B5%EB%8B%88%EB%8B%A4%2C%3C%2FP%3E%3CP%3E%EB%B0%94%EC%9D%B4%EC%98%A4%20%EB%AF%B8%EC%BC%80%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-86623%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%EA%B7%B8%EB%9E%98%ED%94%84%20%EB%B9%8C%EB%8D%94%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%20%EC%82%AC%EC%9A%A9%EC%9E%90%20%EC%A0%95%EC%9D%98%20%EC%98%A4%EB%A5%98%20%EB%A7%89%EB%8C%80%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-86623%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%EA%B7%B8%EB%9F%AC%EB%82%98%20%ED%8F%89%EA%B7%A0%EA%B0%92%EC%9D%B4%20%ED%98%84%EC%9E%AC%20%ED%8F%89%EA%B7%A0%EA%B3%BC%20%EA%B0%99%EC%A7%80%EB%A7%8C%20STD%EA%B0%80%20%ED%98%84%EC%9E%AC%20STD%EC%9D%98%203%20%EB%B0%B0%EC%9D%B8%20Y%20%EB%B3%80%EC%88%98%EB%A5%BC%20%ED%91%9C%EC%A4%80%ED%99%94%ED%95%98%EB%A9%B4%20%EC%98%A4%EB%A5%98%20%EB%A7%89%EB%8C%80%EC%97%90%20%EB%8C%80%ED%95%9C%20STD%EB%A5%BC%20%EB%B3%80%EA%B2%BD%ED%95%A0%20%EC%88%98%EC%9E%88%EB%8A%94%20%EC%98%B5%EC%85%98%EC%9D%B4%20%ED%91%9C%EC%8B%9C%EB%90%98%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4.%20%EA%B7%B8%EB%9F%AC%EB%A9%B4%20%EC%9B%90%ED%95%98%EB%8A%94%20%EC%B0%A8%ED%8A%B8%EB%A5%BC%20%EC%96%BB%EC%9D%84%20%EC%88%98%20%EC%9E%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%26nbsp%3B%20%EB%8B%A4%EC%9D%8C%EC%9D%80%20%EB%82%B4%EA%B0%80%20%EB%A7%90%ED%95%98%EB%8A%94%20%EB%82%B4%EC%9A%A9%EC%9D%84%20%EB%B3%B4%EC%97%AC%EC%A3%BC%EA%B8%B0%20%EC%9C%84%ED%95%B4%20Transform%20%EA%B3%B5%EC%8B%9D%EC%9D%84%20%EC%82%AC%EC%9A%A9%ED%95%98%EB%8A%94%20%EC%98%88%EB%A5%BC%20%EB%B3%B4%EC%97%AC%EC%A4%8D%EB%8B%88%EB%8B%A4.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22errorbars.PNG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F14964i1A747AE359C5DD57%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22errorbars.PNG%22%20alt%3D%22errorbars.PNG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2FBig%20Class.jmp%22%20)%3B%0AGraph%20Builder(%0A%20Variables(%0A%20%20X(%20%3Asex%20)%2C%0A%20%20Y(%20%3Aweight%20)%2C%0A%20%20Y(%0A%20%20%20Transform%20Column(%0A%20%20%20%20%22Transform%5Bweight%5D%22%2C%0A%20%20%20%20Formula(%0A%20%20%20%20%20inSTDs%20%3D%20Abs(%20%3Aweight%20-%20Col%20Mean(%20%3Aweight%2C%20%3Asex%20)%20)%20%2F%0A%20%20%20%20%20Col%20Std%20Dev(%20%3Aweight%2C%20%3Asex%20)%3B%0A%20%20%20%20%20If(%20%3Aweight%20%26gt%3B%3D%20Col%20Mean(%20%3Aweight%2C%20%3Asex%20)%2C%0A%20%20%20%20%20%20Col%20Mean(%20%3Aweight%2C%20%3Asex%20)%20%2B%203%20*%20inSTDs%20*%0A%20%20%20%20%20%20Col%20Std%20Dev(%20%3Aweight%2C%20%3Asex%20)%2C%0A%20%20%20%20%20%20Col%20Mean(%20%3Aweight%2C%20%3Asex%20)%20-%203%20*%20inSTDs%20*%0A%20%20%20%20%20%20Col%20Std%20Dev(%20%3Aweight%2C%20%3Asex%20)%0A%20%20%20%20%20)%3B%0A%20%20%20%20)%0A%20%20%20)%2C%0A%20%20%20Position(%201%20)%0A%20%20)%0A%20)%2C%0A%20Elements(%0A%20%20Line(%0A%20%20%20X%2C%0A%20%20%20Y(%201%20)%2C%0A%20%20%20Y(%202%20)%2C%0A%20%20%20Legend(%204%20)%2C%0A%20%20%20Error%20Bars(%20%22Standard%20Deviation%22%20)%0A%20%20)%0A%20)%0A)%3B%0A%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
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

Recommended Articles