Is it possible to do calculations across rows. How for instance do I:
Although the JMP data table is not a "free-form" spreadsheet like an Excel sheet (e.g a column can only contain data of a single data type and formulas are applied to the entire column) all of the above is possible.
The column formula :A[1] / :B[2] applies that particular ratio to all rows.
The column formula :A / :B[Row() + 1] give each row the ratio between the current value of A with the next row value of B.
The column formula Col Std Dev( :A, :B ) gives the standard deviation of values in A for each level of B. More complex criteria can be acccomplished but may involve an intermediate column that categorize B.
Use the Transpose command in the Tables menu.
With JSL script you'll have many more options than the above examples based on column formulas.
This are not specific answers but here are some potentially helpful ideas to get you started:
Although the JMP data table is not a "free-form" spreadsheet like an Excel sheet (e.g a column can only contain data of a single data type and formulas are applied to the entire column) all of the above is possible.
The column formula :A[1] / :B[2] applies that particular ratio to all rows.
The column formula :A / :B[Row() + 1] give each row the ratio between the current value of A with the next row value of B.
The column formula Col Std Dev( :A, :B ) gives the standard deviation of values in A for each level of B. More complex criteria can be acccomplished but may involve an intermediate column that categorize B.
Use the Transpose command in the Tables menu.
With JSL script you'll have many more options than the above examples based on column formulas.
@MS:
Thank you for your reply. That helped me a great deal. However I have run into a new problem:
I need a function to return the row number of a row in which a cell in a give column meets a certain criteria. E.g.:
Use the get rows where capability:
dt = open("$sample_data\Big Class.jmp");
match_rows = dt << get rows where(:sex == "F");
print(match_rows);
[1, 2, 3, 4, 5, 9, 10, 11, 16, 17, 18, 19, 20, 28, 29, 35, 36, 38]
The match_rows variable is a matrix that you can reference by the index. I.e. match_rows[1] is the first element, etc.
@PMroz:
Thank you. I'm sorry, but I'm not experienced in the scripting side of JMP. I don't quite understand your answer. Is there any way to do perform the above mentioned actions directly in the Formula editor?