cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
travislr11
Level I

AUDPC

I conduct research within the agricultural field and I use excel like most people to organize my data. However, a common analysis is the area under the disease progress curve (AUDPC) to track the changes of the disease throughout the growing season. Is there any way to calculate the total area under a line graph without fitting a trend line/regression analysis. 

3 REPLIES 3
Thierry_S
Super User

Re: AUDPC

Hi,

The only way you could achieve this is by calculating the Polygon Area defined by your data points and the floor of the graph.

area = Polygon Area( {0, 0}, {0, 10}, {10, 10}, {10, 0} );

NOTE: 1) you can use this function in a formula. 2)It is critical to include the origins of the polygon as shown in the simple example above.

Best,

TS

 

Thierry R. Sornasse
travislr11
Level I

Re: AUDPC

Thierry,

 

Thank you for the response. I am assuming the formula you posted is to be applied within the Excel software? Or is there a method for using this within the JMP software?

 

Best,

ian_jmp
Staff

Re: AUDPC

The formula posted is for JMP rather than Excel. Building on the reply from @Thierry_S you can do this kind of thing in JSL, the scripting language for JMP:

NamesDefaultToHere(1);

// Some simple data
dt =
New Table( "AUDPC Example",
	Add Rows( 4 ),
	New Column( "x", Numeric, "Continuous", Set Values( [0, 1, 2, 3] )),
	New Column( "y", Numeric, "Continuous", Set Values( [3, 4, 4.5, 5] ))
);

// A graph
gb = dt << Graph Builder(
	Size( 526, 454 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables( X( :x ), Y( :y ) ),
	Elements( Line( X, Y, Legend( 5 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"x",
			ScaleBox,
			{Min( -1 ), Max( 4 ), Inc( 0.5 ), Minor Ticks( 0 ),
			Add Ref Line( 0, "Dashed", "Red", "", 1 ),
			Add Ref Line( 3, "Dashed", "Red", "", 1 )}
		),
		Dispatch(
			{},
			"y",
			ScaleBox,
			{Format( "Best", 12 ), Min( -1 ), Max( 6 ), Inc( 1 ), Minor Ticks( 1 ),
			Add Ref Line( 0, "Dashed", "Red", "", 1 ),
			Add Ref Line( 1, "Dashed", "Red", "", 1 )}
		)
	)
);

// Start here . . .
dt = CurrentDataTable();
// Get the x and y values
xVals = Column(dt, "x") << getValues;
yVals = Column(dt, "y") << getValues;
// Insert two points that define the base of the polygon at the value y = 0
baseLine = [0];
xVals2 = VConcat(xVals[1], xVals, xVals[NRow(xVals)]);
yVals2 = VConcat(baseLine, yVals, baseline);
// Get the area
a2 = PolygonArea(xVals2, yVals2);
Print(a2);
// Insert two points that define the base of the polygon at the value y = 1
baseLine = [1];
xVals3 = VConcat(xVals[1], xVals, xVals[NRow(xVals)]);
yVals3 = VConcat(baseLine, yVals, baseline);
// Get the area
a3 = PolygonArea(xVals3, yVals3);
Print(a3);

Do 'File > New > New Script', cut and paste the code above into the window that appears, then do 'Edit > Run Script'. I understand that you may not want to learn JSL. Note that this gives the area 'under' the polygon defined by the data values. You may or may not want the area under some kind of fitted curve, but this is possible too.