JMP Script for inverse predictionHello everyone,
I want to automate my data analysis, therefore I wanted to write myself a script to make things easier.
Basically, I want to take my standards to generate a standard curve using 4P fit. (Columns 1, 2, 3 are triplicates of those standards, so I want to have an average value)
Afterwards, I want to use the inverse prediction formula that has been generated by the 4P fit and apply it to the remaining samples (Columns 4 to 12, they are also in triplicates. e.i. columns 4, 5, 6 take average and apply inverse prediction)
Reason why I stack all my data is that it makes a lot easier to take all this data and put it in the official report.
Thank you in advance !
Robert
Re: JMP Script for inverse predictionWhat the error message is saying, is that the name "Standard Average" or whatever name you used does not exist. So apparently, there is not a column in your data table named "Standard Average". In looking at your script, the column named "Average" is created on line 7 and then it is referenced when running the "Fit Curve" platform on line 11. So if the sole issue is that you want to call the column "Standard Average" rather than "Average", then you have to change the name of the column when it is created in the "New Column" message, so that you can reference the column with its different name in the "Fit Curve" platform..
Re: JMP Script for inverse predictionIt says name unresolved..
Re: JMP Script for inverse predictionWhat error message is in the log?
Have you just tried changing line 7 to see if what you are thinking might fix the problem does fix the problem?
Re: JMP Script for inverse predictionI have managed to correct my script and it does produce me the last "hcp" column results according to inverse prediction.
The next question I have is why when I change my column names, hcp column no longer produces inverse prediction for me, is there a mistake in my script ?
i.e.
Script line 11:
fc=dt<
If I change the name of my my column from "average" to lets say Standard Average, I no longer get my predictions in the hcp column. I do change my column name in the line 7 as well to Standard Average before running the script.
Thanks
Re: JMP Script for inverse predictionI am not exactly sure of what you are asking for. There are 2 guesses as to what you are looking for;
1. You want the mean of 3 columns separately for each row.
TheMean = Mean( :A, :B, :C)
2. You want to find the average of all of the data for 3 columns:
TheMean = ( Col Sum( :A ) + Col Sum( :B ) + Col Sum( :C ) ) /
( Col Number( :A ) + Col Number( :B ) + Col Number( :C ) );
The above piece of code could be shortened to
TheMean = Mean( Col Mean( :A ), Col Mean( :B ), Col Mean( :C ) );
if the number of data points are equal in each of the columns
Re: JMP Script for inverse predictionAlso, could someone help me with the script for the mean formula.
I can't get it to work for me.
What I want to do is to take 3 columns and get an average of 3 columns across all rows. JMP script guide doesn't provide the script for it...
Re: JMP Script for inverse predictionI would change the methodology you are using to create the new columns to using the function
Clone Formula Column()
Definition and an example(I copied it into this response) is available in the Scripting Index
Help==>Scripting Index==>Data Table Cols==>Clone Formula Column
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" );
dt << New Column( "Day 1",
Formula( (:BP 8M + :BP 12M + :BP 6M) / 3 )
);
list1 = {:BP 8W, :BP 8F};
list2 = {:BP 12W, :BP 12F};
list3 = {:BP 6W, :BP 6F};
dt <<
Clone Formula Column(
"Day 1",
2,
Substitute Column Reference( :BP 8M, list1 ),
Substitute Column Reference( :BP 12M, list2 ),
Substitute Column Reference( :BP 6M, list3 )
);Re: JMP Script for inverse predictionHello again,
So I did correct this mistake, but it still doesn't generate me the last column with inverse predicted values for my other samples... So I suppose that there is a mistake or I am missing a line with the part where I want to get the inverse prediction formula and set it for hcp column.
Regards
Rob
Re: JMP Script for inverse predictionThe Scripting Index for "Save Inverse Prediction Formula" specifies the following structure to produce the new column
fc=dt<<FIT curve=""></FIT>
Re: JMP Script for inverse predictionSorry for that !
So my problem is that my script does not work fully. For some reason it does not give me the inverse prediction in the hcp column (when I check the formula in the hcp column it is emty for some reason)
Re: JMP Script for inverse predictionWhat is the question you are asking?
I understand what you want to do, and I see the script. Doesn't the script work? Do you want to set the script up to be automated by running the JMP Scheduler?
I am not sure what you are asking.