I have a 100 Unknowns to calculate from a linear fit. I followed the instructions for "Inverse Prediction" shown here:
That worked fine, but using this method, I can only (manually) input 8 Unknowns at a time. Is there another way to do this (like there is in Prism)? Or is there a script that can do it? Prism method: https://www.graphpad.com/support/faq/prism-3-calculating-unknown-concentrations-using-a-standard-cur...
I think that a script would provide the best solution. Are the standards and unknowns in the same data table or separate data tables? Better still, can you provide an example of a typical data set with both the standards and unknowns?
I've attached some sample data to this note--standard and unknowns are in the same data table.
In this example, I have a standard curve with two points 10 and 150 in duplicate. I want to interpolate the Unknowns [here gDNA pg/uL] which I've left blank.
This script will perform the inverse prediction for each chip ID separately.
Names Default to Here( 1 ); dt = Current Data Table(); Column( 2 ) << Data Type( "Numeric" ) << Modeling Type( "Continuous" ); Column( 3 ) << Data Type( "Numeric" ) << Modeling Type( "Continuous" ); dt << New Column( "Lower 95%", "Numeric", "Continuous" ) << New Column( "Upper 95%", "Numeric", "Continuous" ); Summarize( chip = By( :Chip ID ) ); n groups = N Items( chip ); For( c = 1, c <= n groups, c++, data = dt << Get Rows Where( :Chip ID == chip[c] ); dt << Select Where( :Chip ID != chip[c] ) << Exclude; fls = dt << Fit Model( Y( :Median Electrode ), Effects( :Name( "gDNA pg/uL" ) ), Personality( "Standard Least Squares" ), Emphasis( "Minimal Report" ), Run ); unknown = :Median Electrode[data::data[N Row(data)-2]]; Eval( Substitute( Expr( fls << Inverse Prediction( Term Value( Name( "gDNA pg/uL" )(.) ), Response( rrr ) ) ), Expr( rrr ), unknown ) ); inv pred report = Report( fls )["Inverse Prediction"]; inv pred = inv pred report[NumberColBox(2)] << Get As Matrix; lower = inv pred report[NumberColBox(3)] << Get As Matrix; upper = inv pred report[NumberColBox(4)] << Get As Matrix; fls << Close Window; For( i = 1, i < N Row( data ) - 3, i++, Column( 2 )[data[i+2]] = inv pred[i]; Column( 4 )[data[i+2]] = lower[i]; Column( 5 )[data[i+2]] = upper[i]; ); dt << Exclude << Clear Select; );
Note: it will fail unless you remove the empty rows at the end. One of the standards is missing the value 10 for the known concentration.
Just wanted to reiterate how awesome this script is. As a new JMP user, I really appriciate your effort.
There are no labels assigned to this post.