How to make a formula (Delta / %Delta) in JMP<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hi everyone, need some help..
From JMP sample data (Raleigh Temps) shown below, I had added the last 2 columns and made a calculation in excel based on the formula for "Delta in Temp" by month as "=C2-$C$2, =C3-$C$2, =C4-$C$2 and so on.." and for "% Delta in Temp" as "=G2/C2" (% formatted).
Now, I would like to do the same in JMP. Could someone show me how to make the formula or script in JMP? Thanks in advance
| Month | Year | Temperature | Month/Year | Predicted Temperature | Month Number | Delta in Temp | % Delta in Temp |
| 1 | 1980 | 48.92 | Jan-80 | 88.1859485 | 1 | 0 | 0% |
| 2 | 1980 | 48.02 | Feb-80 | 72.8224002 | 2 | -0.9 | -2% |
| 3 | 1980 | 56.84 | Mar-80 | 54.8639501 | 3 | 7.92 | 14% |
| 4 | 1980 | 75.74 | Apr-80 | 50.8215145 | 4 | 26.82 | 35% |
| 5 | 1980 | 81.86 | May-80 | 64.41169 | 5 | 32.94 | 40% |
| 6 | 1980 | 86.54 | Jun-80 | 83.139732 | 6 | 37.62 | 43% |
| 7 | 1980 | 89.24 | Jul-80 | 89.7871649 | 7 | 40.32 | 45% |
| 8 | 1980 | 90.86 | Aug-80 | 78.2423697 | 8 | 41.94 | 46% |
| 9 | 1980 | 84.2 | Sep-80 | 59.1195778 | 9 | 35.28 | 42% |
| 10 | 1980 | 69.62 | Oct-80 | 50.0001959 | 10 | 20.7 | 30% |
| 11 | 1980 | 60.98 | Nov-80 | 59.2685416 | 11 | 12.06 | 20% |
| 12 | 1980 | 52.16 | Dec-80 | 78.4033407 | 12 | 3.24 | 6% |
| 1 | 1981 | 45.86 | Jan-81 | 89.8121471 | 13 | 0 | 0% |
| 2 | 1981 | 56.84 | Feb-81 | 83.0057568 | 14 | 10.98 | 19% |
| 3 | 1981 | 59.18 | Mar-81 | 64.2419337 | 15 | 13.32 | 23% |
| 4 | 1981 | 74.48 | Apr-81 | 50.7720502 | 16 | 28.62 | 38% |
| 5 | 1981 | 75.74 | May-81 | 54.9802551 | 17 | 29.88 | 39% |
| 6 | 1981 | 88.7 | Jun-81 | 72.9975442 | 18 | 42.84 | 48% |
| 7 | 1981 | 89.42 | Jul-81 | 88.258905 | 19 | 43.56 | 49% |
| 8 | 1981 | 83.84 | Aug-81 | 86.7331128 | 20 | 37.98 | 45% |
| 9 | 1981 | 79.34 | Sep-81 | 69.8229738 | 21 | 33.48 | 42% |
| 10 | 1981 | 69.44 | Oct-81 | 53.0755919 | 22 | 23.58 | 34% |
| 11 | 1981 | 62.24 | Nov-81 | 51.8884328 | 23 | 16.38 | 26% |
| 12 | 1981 | 48.56 | Dec-81 | 67.352965 | 24 | 2.7 | 6% |
| 1 | 1982 | 44.06 | Jan-82 | 85.251169 | 25 | 0 | 0% |
| 2 | 1982 | 55.04 | Feb-82 | 89.1275186 | 26 | 10.98 | 20% |
| 3 | 1982 | 62.96 | Mar-82 | 75.4181158 | 27 | 18.9 | 30% |
| 4 | 1982 | 69.62 | Apr-82 | 56.7273223 | 28 | 25.56 | 37% |
| 5 | 1982 | 83.84 | May-82 | 50.2393675 | 29 | 39.78 | 47% |
| 6 | 1982 | 84.02 | Jun-82 | 61.9192471 | 30 | 39.96 | 48% |
| 7 | 1982 | 88.34 | Jul-82 | 81.0285336 | 31 | 44.28 | 50% |
| 8 | 1982 | 86.36 | Aug-82 | 89.9982372 | 32 | 42.3 | 49% |
| 9 | 1982 | 80.96 | Sep-82 | 80.5816537 | 33 | 36.9 | 46% |
| 10 | 1982 | 71.06 | Oct-82 | 61.4363466 | 34 | 27 | 38% |
| 11 | 1982 | 63.5 | Nov-82 | 50.1644229 | 35 | 19.44 | 31% |
| 12 | 1982 | 57.02 | Dec-82 | 57.1292373 | 36 | 12.96 | 23% |
Re: How to make a formula (Delta / %Delta) in JMPDate and Time Functions might help you get the hours you need from the date.
Re: How to make a formula (Delta / %Delta) in JMPThanks for all your helps! My question has been answered and did tried it on JMP. Thanks again.
Here's a new set of data table below where basically do the same thing, ie, get the Delta in Data by Event Date. However, I have 3 serial numbers and 2 variables under LOC.
First, would like to convert the Event Date into Hours. Then take the Delta in Data by Hours by Serial no and Loc.
Really appreciated your quick reply.
| EVENT_DATE | SERIAL NO. | LOC | DATA |
| 05/04/2015 9:50 PM | 1 | 0 | 422 |
| 05/04/2015 9:50 PM | 1 | 1 | 389 |
| 05/05/2015 11:54 AM | 1 | 0 | 423 |
| 05/05/2015 11:54 AM | 1 | 1 | 387 |
| 05/06/2015 2:01 AM | 1 | 0 | 423 |
| 05/06/2015 2:01 AM | 1 | 1 | 385 |
| 05/06/2015 4:11 PM | 1 | 0 | 422 |
| 05/06/2015 4:11 PM | 1 | 1 | 386 |
| 05/07/2015 6:08 AM | 1 | 0 | 424 |
| 05/07/2015 6:08 AM | 1 | 1 | 387 |
| 05/07/2015 7:47 PM | 1 | 0 | 428 |
| 05/07/2015 7:47 PM | 1 | 1 | 389 |
| 05/08/2015 9:22 AM | 1 | 0 | 425 |
| 05/08/2015 9:22 AM | 1 | 1 | 389 |
| 05/04/2015 9:28 PM | 2 | 0 | 564 |
| 05/04/2015 9:28 PM | 2 | 1 | 454 |
| 05/05/2015 10:33 AM | 2 | 0 | 564 |
| 05/05/2015 10:33 AM | 2 | 1 | 456 |
| 05/05/2015 11:29 PM | 2 | 0 | 565 |
| 05/05/2015 11:29 PM | 2 | 1 | 455 |
| 05/06/2015 12:49 PM | 2 | 0 | 567 |
| 05/06/2015 12:49 PM | 2 | 1 | 454 |
| 05/07/2015 2:15 AM | 2 | 0 | 567 |
| 05/07/2015 2:15 AM | 2 | 1 | 454 |
| 05/07/2015 3:44 PM | 2 | 0 | 567 |
| 05/07/2015 3:44 PM | 2 | 1 | 454 |
| 05/08/2015 5:11 AM | 2 | 0 | 566 |
| 05/08/2015 5:11 AM | 2 | 1 | 454 |
| 05/08/2015 6:36 PM | 2 | 0 | 567 |
| 05/08/2015 6:36 PM | 2 | 1 | 452 |
| 05/04/2015 9:42 PM | 3 | 0 | 422 |
| 05/04/2015 9:42 PM | 3 | 1 | 506 |
| 05/05/2015 11:37 AM | 3 | 0 | 421 |
| 05/05/2015 11:37 AM | 3 | 1 | 505 |
| 05/06/2015 1:34 AM | 3 | 0 | 422 |
| 05/06/2015 1:34 AM | 3 | 1 | 502 |
| 05/06/2015 3:32 PM | 3 | 0 | 421 |
| 05/06/2015 3:32 PM | 3 | 1 | 502 |
| 05/07/2015 5:31 AM | 3 | 0 | 423 |
| 05/07/2015 5:31 AM | 3 | 1 | 508 |
| 05/07/2015 7:28 PM | 3 | 0 | 421 |
| 05/07/2015 7:28 PM | 3 | 1 | 502 |
| 05/08/2015 9:25 AM | 3 | 0 | 421 |
| 05/08/2015 9:25 AM | 3 | 1 | 503 |
Re: How to make a formula (Delta / %Delta) in JMPIt's not really different from Jeff's solution, but I like this:

Re: How to make a formula (Delta / %Delta) in JMPI just realized that you were resetting your Delta at the beginning of every year. In this case you'll need to index your subscript based on the month in the current row. Like this:

-Jeff
Re: How to make a formula (Delta / %Delta) in JMPAnd the percentage change may not make sense, especially as the temperature gets close to zero. Zero Fahrenheit does not happen often in Raleigh. But same idea, without needing a subscript.
Re: How to make a formula (Delta / %Delta) in JMPYou use a subscript on a column reference to index into a specific row. In your case, row 1.
So the formula for Delta in Temp looks like this:

-Jeff
Re: How to make a formula (Delta / %Delta) in JMPI am also a beginner and need to know how to do it. As far as I know it is something related to functions"row" or "evaluate" but that's all I guess.
Probably a developer or a guru from SAS will lift you up.
Please also let me know when you've got it.
many thanks