Hi @MarkJSchwab,
It does appear <<Freq was added as an optional argument in JMP 15, so for earlier versions of JMP you will need to do something else.
Here's a solution from jmp wizard @brady_brady:
:height - Mean( :height[(:height << get datatable) << get rows where( :age == 14 )] )
It's worth taking a moment to unpack this formula because there are some methods I bet you will find valuable to use later.
(:height << get datatable) << get rows where( :age == 14 )
will return the matrix of row entries in which :age==14. Importantly, you can modify the get rows where() function to match whatever lookup you wish, including the second ask I believe you have of including another variable. For example:
(:height << get datatable) << get rows where( :age == 14 & :sex == "F"
Now that we have a matrix of rows that match your condition, Brady uses this matrix to subscript :height.
height[(:height << get datatable) << get rows where( :age == 14 & :sex == "F" )]
This will return the matrix of the values of :height for each of those rows, in this case, the heights of the 14yo female students: [61, 62, 65, 63, 62]
Finally, the Mean() function is wrapped around this matrix, which returns the mean you need to calculate your centered variable:
mean(:height[(:height << get datatable) << get rows where( :age == 14 & :sex == "F" )])
This solution more flexible, tolerant of missing data, and works for earlier versions of jmp, so all together a better solution I think. Thanks, @brady_brady!
@julian