How to delimit the range of my calculation in a JMP column with different numbers of participants?Hi,
I have an example enclosed in this post. I would like to calculate the Difference of Scores (Column 4) between Column 3 and Column 2 and then calculate the Mean of that difference per participant (Column 5).
The problem is that I cannot use simply the formula "PostTest - PreTest" because I need to delimit its range (per participant). Furthermore, I have got different numbers of participants because of missing data, so I cannot use simply the formula "Mean(Difference of Scores)".
How can I perform those calculations, please? (In case the solution is more complex please add it in that file, please)
Subject PreTest PostTest Difference of Scores (= PostTest - PreTest) Mean(Difference of Scores)
100 1 5 4
100 3 7 4
100 8 7 -1
100 ... ... ...
100
200 10 10 0
200 9 2 -7
200 6 4 -2
...
Thank you!
Re: How to delimit the range of my calculation in a JMP column with different numbers of participantYes, Mark (@Mark_Bailey), it works in that example! Great!
Re: How to delimit the range of my calculation in a JMP column with different numbers of participantThe second argument acts as a By variable, the same way as a column acts in the By role in launching an platform.
See Help > Scripting Index > Functions > Col Mean for more details about the syntax and arguments.
Yes, you can use more than one data column in the By role for Col Mean().
Your new computation is more complex than the one you originally asked about. Using column formulas and data tables, I think the solution is to break it up into two levels. First compute the squared difference in the original data table, then use Tables > Summarize to get the sum and N, then add a new formula to compute the final index.
Re: How to delimit the range of my calculation in a JMP column with different numbers of participantHi @Mark_Bailey,
Thank you for your post.
In the Col Mean(parameter 1, parameter 2), does the second parameter work as a filter? If so, it is possible to add more filters such as parameter 3 and so on..?
In this example of difference of scores, there is no problem to use "ProTest - PreTest". Yes, it can be done using a single formula.
However, if I have a operation which requires to be delimited for each participant such as the equation enclosed in this post, how can I do?
In that equation, while is the same participant, JMP needs to calculate the squared difference between two columns per row (i) and then divide by the total number of trials (N) per participant.
I must implement that equation for a large number of participants (more than 100).
Thank you!
Re: How to delimit the range of my calculation in a JMP column with different numbers of participantI think you want this function:
Col Mean(:Difference of Scores, :Subject)