cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-421457%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%EB%88%84%EC%A0%81%20%EA%B3%A4%EC%B6%A9%20%EC%9D%BC%EC%88%98%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-421457%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%EC%95%88%EB%85%95%ED%95%98%EC%8B%AD%EB%8B%88%EA%B9%8C%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%EC%B9%98%EB%A3%8C%EB%8B%B9%20%EB%88%84%EC%A0%81%20%EA%B3%A4%EC%B6%A9%20%EC%9D%BC%EC%88%98%EB%A5%BC%20%EA%B3%84%EC%82%B0%ED%95%98%EB%8A%94%20%EB%8D%B0%20%EB%8F%84%EC%9B%80%EC%9D%B4%20%ED%95%84%EC%9A%94%ED%95%A9%EB%8B%88%EB%8B%A4.%20%ED%8A%B9%EC%A0%95%20%ED%96%89%EC%9D%98%20%ED%8F%89%EA%B7%A0%EA%B3%BC%20%EB%91%90%20%ED%8A%B9%EC%A0%95%20%ED%96%89%EC%9D%98%20%EC%B0%A8%EC%9D%B4%EB%A5%BC%20%EA%B3%84%EC%82%B0%ED%95%98%EB%8A%94%20%EA%B2%83%EA%B3%BC%20%EA%B4%80%EB%A0%A8%EC%9D%B4%20%EC%9E%88%EC%9C%BC%EB%AF%80%EB%A1%9C%20%EC%96%B4%EB%96%BB%EA%B2%8C%20%ED%95%B4%EC%95%BC%20%ED%95%98%EB%8A%94%EC%A7%80%20%EB%AA%A8%EB%A5%B4%EA%B2%A0%EC%8A%B5%EB%8B%88%EB%8B%A4.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%EB%88%84%EC%A0%81%20%EA%B3%A4%EC%B6%A9%20%EC%9D%BC%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O-LABS%20id%3D%22lingo-labs-421457%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3E%ED%95%B4%EC%84%9D%ED%95%99%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%EB%8D%B0%EC%9D%B4%ED%84%B0%20%ED%85%8C%EC%9D%B4%EB%B8%94%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8C%85%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%0A%20%0A%20%0A%20%20%3CLINGO-SUB%20id%3D%22lingo-sub-421874%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20%EB%88%84%EC%A0%81%20%EA%B3%A4%EC%B6%A9%20%EC%9D%BC%EC%88%98%3C%2FLINGO-SUB%3E%0A%20%20%3CLINGO-BODY%20id%3D%22lingo-body-421874%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%0A%20%20%20%3CP%3E%EC%9D%B4%20%EB%B0%A9%EB%B2%95%EC%9D%B4%20%EC%95%84%EC%A3%BC%20%ED%9A%A8%EA%B3%BC%EC%A0%81%EC%9D%B4%EB%84%A4%EC%9A%94.%20%EC%A0%95%EB%A7%90%20%EA%B0%90%EC%82%AC%ED%95%A9%EB%8B%88%EB%8B%A4.%20%EB%8F%84%EC%99%80%EC%A3%BC%EC%85%94%EC%84%9C%20%EC%A0%95%EB%A7%90%20%EA%B0%90%EC%82%AC%ED%95%A9%EB%8B%88%EB%8B%A4.%3C%2FP%3E%0A%20%20%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
bordini
Level III

Cumulative Insect-Days

Hello,

 

I need help calculating something called Cumulative Insect-Days per treatment. I don't know how to do that as it involves calculating the mean of specific rows and the difference between two specific rows.

 

Cumulative insect-days = [ (Xi + Xi+1) * average(Y+Yi+1) ] + (Yi+1)

Xi and Xi+1 are adjacent points in time

Yi and Yi+1 are corresponding insect numbers

 

I have done these calculations in Excel (attached), but I need to do them in JMP as I have several columns and rows of data. Formula is in excel.

 

Thank you,

 

Bordini

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Cumulative Insect-Days

Here is the formula that will create the values you want

If( Row() == 1,
	val = :"Cumulative insect-days"n;
	lastVal = val;
,
	val = Mean( :Number of Insects, Lag( :Number of Insects ) ) * (:Date of Year - Lag( :Date of Year )) + lastVal;
	lastVal = val;
);
val;

txnelson_0-1632791159185.png

 

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Cumulative Insect-Days

Here is the formula that will create the values you want

If( Row() == 1,
	val = :"Cumulative insect-days"n;
	lastVal = val;
,
	val = Mean( :Number of Insects, Lag( :Number of Insects ) ) * (:Date of Year - Lag( :Date of Year )) + lastVal;
	lastVal = val;
);
val;

txnelson_0-1632791159185.png

 

Jim
bordini
Level III

Re: Cumulative Insect-Days

This approach works nicely. Thank you very much. I appreciate your help.

Recommended Articles