如何编写校准曲线脚本您好,我的脚本编写水平非常基础,希望您能帮助我。
如何编写脚本来实现以下目标?
我有一张表格,其中包含校准剂的已知浓度。 在每次测定(每个测定一个表)中,我都有几个未知物的信号以及校准器的信号,它基本上是每个测定的内部校准曲线。
是否可以创建一个脚本,从已知浓度表中获取值,根据特定测定(测定表)的信号绘制它们,然后使用线性回归来计算未知物的浓度?
先谢谢您的帮助!
回复:如何编写校准曲线脚本太棒了! 我对你感激不尽,马克。
回复:如何编写校准曲线脚本
Names Default to Here( 1 );
// check for sufficient tables
n tables = N Table();
If( n tables < 2,
Throw( "Two data tables are required for this analysis" )
);
tables = List();
For( t = 1, t <= n tables, t++,
Insert Into( tables, Eval( Data Table( t ) << Get Name ) );
);
// identify the calibration and unknown data tables
dlg = New Window( "Assay Unknown Samples", << Modal,
H List Box(
lb = List Box( tables ),
Line Up Box( N Col( 2 ),
Button Box( "Calibrator Table",
sel = lb << Get Selected;
cal lb << Append( sel );
),
cal lb = List Box( {},
N Lines( 1 )
),
Button Box( "Unknown Table",
sel = lb << Get Selected;
unk lb << Append( sel );
),
unk lb = List Box( {},
N Lines( 1 )
)
)
),
H List Box(
Button Box( "OK",
cal table = cal lb << Get Items;
Show( cal table );
unk table = unk lb << Get Items;
Show( unk table );
),
Button Box( "Cancel" )
)
);
If( dlg["Button"] == -1,
Throw( "User cancelled" )
);
// unload the dialog
cal table = Data Table( cal table[1] );
unk table = Data Table( unk table[1] );
// include AU 2 values for calibrators from calibration table
combined = cal table << Join( With( unk table ),
Copy formula( 0 ),
Select With( :Sample, :Peps, :AU 1 ),
Select( :AU 2 ),
By Matching Columns( :Peps = :Peps ),
Drop Multiples( 0, 0 ),
Include Nonmatches( 0, 1 ),
Preserve Main Table Order( 0 )
);
Close( cal table, No Save );
Close( unk table, No Save );
// distinquish peps
Current Data Table( combined );
combined << New Column( "Status", "Character", "Nominal" );
For Each Row(
:Status = If( 1 <= Num( Regex( :Peps, "\w{3}(\d+)", "\1" ) ) <= 29, "Calibrator", "Unknown" );
);
// placeholders for matching information
combined
<< New Column( "Predicted AU 2", "Numeric", "Continuous" )
<< New Column( "Lower 95%", "Numeric", "Continuous" )
<< New Column( "Upper 95%", "Numeric", "Continuous" );
// handle each sample set separatelySummarize( sample = By( combined:Sample ) );
Summarize( sample list = By( combined:Sample ) );
For( s = 1, s <= N Items( sample list ), s++,
// isolate sample
combined
<< Select Where( :Sample == sample list[s] )
<< Invert Row Selection
<< Exclude;
// fit the calibration curve for this sample
dlg = combined << Fit Model(
Y( :AU 1 ),
Effects( :AU 2 ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Where( :Status == "Calibrator" )
);
fit = dlg << Run;
// access report layer
fit rep = fit << Report;
title = fit rep[OutlineBox(1)] << Get Title;
fit rep[OutlineBox(1)] << Set Title( title || ", Sample = " || sample list[s] );
// determine the assay for the unknown samples from the calibration curve
For Each Row(
If( Not( Excluded( Row State( Row() ) ) ),
fit << Inverse Prediction( Response( :AU 1[] ) );
);
);
// remove extraneous string column box that interferes with making combined data table
(fit rep << XPath( "//StringColBox[StringColBoxHeader=\!"Type of CI\!"]")) << Delete;
// extract the assays into a new data table
assays = fit rep["Inverse Prediction"][TableBox(1)] << Make Combined Data Table;
// fit << Close Window;
// prepare predicted values for join
assays
<< Delete Columns( Column( assays, 1 ) )
<< New Column( "Sample", "Character", "NominaL" )
<< New Column( "Peps", "Character", "NominaL" );
Current Data Table( combined );
r = 1;
For Each Row(
If( Not( Excluded( Row State( Row() ) ) ),
assays:Sample[r] = combined:Sample;
assays:Peps[r] = combined:Peps;
r++;
);
);
combined << Clear Row States;
combined << Update(
With( assays ),
Match Columns(
:Sample = :Sample,
:Peps = :Peps
)
);
Close( assays, No Save );
);
回复:如何编写校准曲线脚本这是最后的请求,我保证!
我应该如何重写这部分,以便脚本更加通用,并且可以应用于任何样本集,无论它们的名称如何? 例如,不要写:
样本=列表(“001-AAA”,“002-AAA”,“003-AAA”,“004-AAA”);
我们可以编写代码来对示例列进行摘要并获取这些条目来制作列表吗?
如果能够使用双变量函数绘制校准曲线并最终显示它们,以便我们可以直观地看到所执行的拟合,那就太好了。
回复:如何编写校准曲线脚本完美的!
谢谢你所做的一切,马克!
回复:如何编写校准曲线脚本该索引现在仅用于迭代计数。 在迭代之前,特定样本标签将被捕获在列表中。
// handle each sample set separately
sample = List( "001-AAA", "002-AAA", "003-AAA" );
For( s = 1, s <= 3, s++,
// isolate sample
combined
<< Select Where( :Sample == sample[s] )
<< Invert Row Selection
<< Exclude;
回复:如何编写校准曲线脚本我想你误解了我。 我所说的疑惑,是指我不明白代码的功能。 我对编码知之甚少,我不敢怀疑你的代码!我只是想了解你并向你学习。
我想我理解了第一个例子。
在第二个示例中,如果样本也有文本名称而不是数字,那么代码将如何更改? 例如,我们没有样本 1、2 和 3,而是样本 001-AAA、002-AAA 和 003-AAA?
回复:如何编写校准曲线脚本你怀疑我的代码? 好吧,这是你的特权。
第一个示例在不使用列公式属性的情况下填充新列。
For Each Row(
:Status = If( 1 <= Num( Regex( :Peps, "\w{3}(\d+)", "\1" ) ) <= 29, "Calibrator", "Unknown" );
);
这对于每一行()函数迭代当前数据表的行。 它自动处理索引行。 所以分配是按行进行的。 作业的右侧是如果()功能。 第一个参数被解释为布尔表达式。 如果此表达式的计算结果为 true,则计算并返回第二个参数(“Calibrator”)。 否则,将计算并返回第三个参数(“未知”)。 第一个参数确定 Peps 数是否在 1 到 29 的范围内。 使用正则表达式提取数字字符串并将其转换为数字。 正则表达式匹配由三个单词字符后跟一个或多个数字字符组成的模式。 反向引用返回唯一的捕获组。
第二个示例迭代数据集中的三个样本。
For( s = 1, s <= 3, s++,
// isolate sample
ss = Char( s );
combined
<< Select Where( :Sample == ss )
<< Invert Row Selection
<< Exclude;
它使用转换为字符串的整数索引来匹配数据列属性。 它向组合数据表发送级联消息,以 (1) 选择当前样本的所有行,(2) 将选择更改为非当前样本的所有行,以及 (3) 排除这些行。 这种方法通常比对数据表进行子集化然后将数据表与结果连接起来更简单、更快速。
回复:如何编写校准曲线脚本它工作完美! 谢谢。
我想我明白每一行代码在做什么。 我对这些确实有一些疑问:
<SPAN class="token function">For Each Row</SPAN><SPAN class="token punctuation">(</SPAN>
<SPAN class="token punctuation">:</SPAN>Status <SPAN class="token operator">=</SPAN> <SPAN class="token function">If</SPAN><SPAN class="token punctuation">(</SPAN> <SPAN class="token number">1</SPAN> <SPAN class="token operator"><=</SPAN> <SPAN class="token function">Num</SPAN><SPAN class="token punctuation">(</SPAN> <SPAN class="token function">Regex</SPAN><SPAN class="token punctuation">(</SPAN> <SPAN class="token punctuation">:</SPAN>Peps<SPAN class="token punctuation">,</SPAN> <SPAN class="token string">"\w{3}(\d+)"</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token string">"\1"</SPAN> <SPAN class="token punctuation">)</SPAN> <SPAN class="token punctuation">)</SPAN> <SPAN class="token operator"><=</SPAN> <SPAN class="token number">29</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token string">"Calibrator"</SPAN><SPAN class="token punctuation">,</SPAN> <SPAN class="token string">"Unknown"</SPAN> <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">;</SPAN><SPAN class="token function">For</SPAN><SPAN class="token punctuation">(</SPAN> s <SPAN class="token operator">=</SPAN> <SPAN class="token number">1</SPAN><SPAN class="token punctuation">,</SPAN> s <SPAN class="token operator"><=</SPAN> <SPAN class="token number">3</SPAN><SPAN class="token punctuation">,</SPAN> s<SPAN class="token operator">++</SPAN><SPAN class="token punctuation">,</SPAN>
<SPAN class="token comment">// isolate sample</SPAN>
ss <SPAN class="token operator">=</SPAN> <SPAN class="token function">Char</SPAN><SPAN class="token punctuation">(</SPAN> s <SPAN class="token punctuation">)</SPAN><SPAN class="token punctuation">;</SPAN>
combined
<SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN><SPAN class="token messages"> Select Where</SPAN><SPAN class="token punctuation">(</SPAN> <SPAN class="token punctuation">:</SPAN>Sample <SPAN class="token operator">==</SPAN> ss <SPAN class="token punctuation">)</SPAN>
<SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN><SPAN class="token messages"> Invert Row Selection
</SPAN><SPAN class="token operator"><</SPAN><SPAN class="token operator"><</SPAN><SPAN class="token messages"> Exclude</SPAN><SPAN class="token punctuation">;</SPAN>
请你向我解释一下好吗?
回复:如何编写校准曲线脚本Names Default to Here( 1 );
// check for sufficient tables
n tables = N Table();
If( n tables < 2,
Throw( "Two data tables are required for this analysis" )
);
tables = List();
For( t = 1, t <= n tables, t++,
Insert Into( tables, Eval( Data Table( t ) << Get Name ) );
);
// identify the calibration and unknown data tables
dlg = New Window( "Assay Unknown Samples", << Modal,
H List Box(
lb = List Box( tables ),
Line Up Box( N Col( 2 ),
Button Box( "Calibrator Table",
sel = lb << Get Selected;
cal lb << Append( sel );
),
cal lb = List Box( {},
N Lines( 1 )
),
Button Box( "Unknown Table",
sel = lb << Get Selected;
unk lb << Append( sel );
),
unk lb = List Box( {},
N Lines( 1 )
)
)
),
H List Box(
Button Box( "OK",
cal table = cal lb << Get Items;
Show( cal table );
unk table = unk lb << Get Items;
Show( unk table );
),
Button Box( "Cancel" )
)
);
If( dlg["Button"] == -1,
Throw( "User cancelled" )
);
// unload the dialog
cal table = Data Table( cal table[1] );
unk table = Data Table( unk table[1] );
// include AU 2 values for calibrators from calibration table
combined = cal table << Join( With( unk table ),
Copy formula( 0 ),
Select With( :Sample, :Peps, :AU 1 ),
Select( :AU 2 ),
By Matching Columns( :Peps = :Peps ),
Drop Multiples( 0, 0 ),
Include Nonmatches( 0, 1 ),
Preserve Main Table Order( 0 )
);
Close( cal table, No Save );
Close( unk table, No Save );
// distinquish peps
Current Data Table( combined );
combined << New Column( "Status", "Character", "Nominal" );
For Each Row(
:Status = If( 1 <= Num( Regex( :Peps, "\w{3}(\d+)", "\1" ) ) <= 29, "Calibrator", "Unknown" );
);
// placeholders for matching information
combined
<< New Column( "Predicted AU 2", "Numeric", "Continuous" )
<< New Column( "Lower 95%", "Numeric", "Continuous" )
<< New Column( "Upper 95%", "Numeric", "Continuous" );
// handle each sample set separately
For( s = 1, s <= 3, s++,
// isolate sample
ss = Char( s );
combined
<< Select Where( :Sample == ss )
<< Invert Row Selection
<< Exclude;
// fit the calibration curve for this sample
dlg = combined << Fit Model(
Y( :AU 1 ),
Effects( :AU 2 ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Where( :Status == "Calibrator" )
);
fit = dlg << Run;
// determine the assay for the unknown samples from the calibration curve
For Each Row(
If( Not( Excluded( Row State( Row() ) ) ),
fit << Inverse Prediction( Response( :AU 1[] ) );
);
);
// access report layer
fit rep = fit << Report;
// remove extraneous string column box that interferes with making combined data table
(fit rep << XPath( "//StringColBox[StringColBoxHeader=\!"Type of CI\!"]")) << Delete;
// extract the assays into a new data table
assays = fit rep["Inverse Prediction"][TableBox(1)] << Make Combined Data Table;
fit << Close Window;
// prepare predicted values for join
assays
<< Delete Columns( Column( assays, 1 ) )
<< New Column( "Sample", "Character", "NominaL" )
<< New Column( "Peps", "Character", "NominaL" );
Current Data Table( combined );
r = 1;
For Each Row(
If( Not( Excluded( Row State( Row() ) ) ),
assays:Sample[r] = combined:Sample;
assays:Peps[r] = combined:Peps;
r++;
);
);
combined << Clear Row States;
combined << Update(
With( assays ),
Match Columns(
:Sample = :Sample,
:Peps = :Peps
)
);
Close( assays, No Save );
);回复:如何编写校准曲线脚本是的,他们有 29 个 pep 作为内部校准器。 这些特定的 29 个 peps 应从校准表中获取 AU 2 值,然后每组校准与样本编号相关的其余 peps。
我认为我在同一篇文章中询问了两个不同的事情,这让这变得更加混乱。 我对此感到抱歉。
回复:如何编写校准曲线脚本那么这三个样本集应该分开处理吗?
回复:如何编写校准曲线脚本我想我说得太早了。 有一个问题马克。 现在,脚本正在将所有 AU 2 值从 calib 表提取到校准器的 unk 表中,这很好。 但是,新表使用了所有分配给拟合模型中的校准品名称的数据,并且从该模型(将样品 1、2 和 3 中的校准品汇集在一起)预测未知数,对吗?
我需要的是每个样本的拟合模型,并且该样本的未知数仅通过与该样本相关的拟合模型来确定。
回复:如何编写校准曲线脚本太棒了! 非常感谢马克!
回复:如何编写校准曲线脚本好的,谢谢您的澄清。
Names Default to Here( 1 );
// check for sufficient tables
n tables = N Table();
If( n tables < 2,
Throw( "Two data tables are required for this analysis" )
);
tables = List();
For( t = 1, t <= n tables, t++,
Insert Into( tables, Eval( Data Table( t ) << Get Name ) );
);
// identify the calibration and unknown data tables
dlg = New Window( "Assay Unknown Samples", << Modal,
H List Box(
lb = List Box( tables ),
Line Up Box( N Col( 2 ),
Button Box( "Calibrator Table",
sel = lb << Get Selected;
cal lb << Append( sel );
),
cal lb = List Box( {},
N Lines( 1 )
),
Button Box( "Unknown Table",
sel = lb << Get Selected;
unk lb << Append( sel );
),
unk lb = List Box( {},
N Lines( 1 )
)
)
),
H List Box(
Button Box( "OK",
cal table = cal lb << Get Items;
Show( cal table );
unk table = unk lb << Get Items;
Show( unk table );
),
Button Box( "Cancel" )
)
);
If( dlg["Button"] == -1,
Throw( "User cancelled" )
);
// unload the dialog
cal table = Data Table( cal table[1] );
unk table = Data Table( unk table[1] );
// include AU 2 values for calibrators from calibration table
combined = cal table << Join(
With( unk table ),
Copy formula( 0 ),
Select With( :Sample, :Peps, :AU 1 ),
Select( :AU 2 ),
By Matching Columns( :Peps = :Peps ),
Drop Multiples( 0, 0 ),
Include Nonmatches( 0, 1 ),
Preserve Main Table Order( 0 )
);
Close( cal table, No Save );
Close( unk table, No Save );
// distinquish peps
Current Data Table( combined );
combined << New Column( "Status", "Character", "Nominal" );
For Each Row(
:Status = If( 1 <= Num( Regex( :Peps, "\w{3}(\d+)", "\1" ) ) <= 29, "Calibrator", "Unknown" );
);
// fit the calibration curve
dlg = combined << Fit Model(
Y( :AU 1 ),
Effects( :AU 2 ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Where( :Status == "Calibrator" )
);
fit = dlg << Run;
// determine the assay for the unknown samples from the calibration curve
For Each Row(
fit << Inverse Prediction( Response( :AU 1[] ) );
);
// extract the assays into a new data table
assays = Report( fit )["Inverse Prediction"][TableBox(1)] << Make Combined Data Table;
fit << Close Window;
assays << Delete Columns( Column( assays, 1 ) );
// add the assays to the unknown table
final = combined << Join(
With( assays ),
Copy formula( 0 ),
By Matching Columns( :AU 1 = :Specified AU 1 ),
Drop Multiples( 0, 0 ),
Include Nonmatches( 1, 0 ),
Preserve Main Table Order( 1 )
);
Close( combined, No Save );
Close( assays, No Save );
final << Sort(
By( :Peps, :Sample ),
Order( Ascending, Ascending ),
Replace Table
);
由于 AU 1 的随机测量,一些预测的 AU 2 值丢失。
回复:如何编写校准曲线脚本它确实工作得很好。 它完成了我请求帮助的任务。 但我最初的帖子有两个部分。 首先是了解如何编写校准脚本,就像您向我展示的那样。
第二个与第一个无关,因此它将是一个完全不同的脚本,执行以下操作:
未知表有 3 个样本,每个样本分析了 74 个 Peps。 我想用其中 29 个 Peps 来校准其他 45 个。 我想通过从校准表中获取 AU 2 值来做到这一点。 因此,脚本应该从校准表中获取 AU 2 值,并将它们与未知表中每个样本的 1-29 Peps 连接起来,之后应该为每个样本制作校准曲线(线性回归)并属性 AU 2值为余数 45 Peps。
谢谢你对我的包容!
我知道这些值不相关,这些是随机生成的值,目的是学习如何编写脚本。
回复:如何编写校准曲线脚本我很困惑。
首先,它有效吗? 它起到作用了吗?
其次,是的,校准完全是使用校准表中的 AU 1 和 AU 2 值进行的。 这不正确吗?
第三,未知表中没有 AU 2 值。 您的意思是使用预测的未知 AU 2 值吗?
第四,这是对校准定义的更改还是预测 AU 后的新要求(后续步骤) 2 在未知表中?
五、什么是Sample? 它与佩普有什么关系?
第六,Pep1 至 Pep29 校准品表中的 AU 1 不应该相关吗? 他们不是:

我可能错过了一些非常重要和非常基本的东西。
回复:如何编写校准曲线脚本谢谢马克,现在可以了。
据我了解,查看脚本,这是使用校准器表中的 AU 1 和 AU 2 值进行直接校准,是吗?
我们如何重新排列它,以便校准器是校准器表中指定的 AU 1 值与未知表中指定的 AU 2(使其成为每个样品的不同校准器),然后预测其余组件的 AU 2 值在样本中?
回复:如何编写校准曲线脚本是版本问题。 我打开 JMP 13,(1) 该函数不再突出显示,(2) 在脚本索引中找不到该函数。
我讨厌发生这种事!
尝试这个解决方法:
Names Default to Here( 1 );
// find all open data tables
/* for JMP 14 and later:
tables = Get Data Table List();
*/
n tables = N Table();
If( n tables < 2,
Throw( "Two data tables are required for this analysis" )
);
tables = List();
For( t = 1, t <= n tables, t++,
Insert Into( tables, Eval( Data Table( t ) << Get Name ) );
);
// present open tables for assignment as calibration or unknown.
dlg = New Window( "Assay Unknown Samples", << Modal,
H List Box(
lb = List Box( tables ),
Line Up Box( N Col( 2 ),
Button Box( "Calibrator Table",
sel = lb << Get Selected;
cal lb << Append( sel );
),
cal lb = List Box( {},
N Lines( 1 )
),
Button Box( "Unknown Table",
sel = lb << Get Selected;
unk lb << Append( sel );
),
unk lb = List Box( {},
N Lines( 1 )
)
)
),
H List Box(
Button Box( "OK",
cal table = cal lb << Get Items;
Show( cal table );
unk table = unk lb << Get Items;
Show( unk table );
),
Button Box( "Cancel" )
)
);
If( dlg["Button"] == -1,
Throw( "User cancelled" )
);
// unload dialog
cal table = Data Table( cal table[1] );
unk table = Data Table( unk table[1] );
// perform the linear calibration
dlg = cal table << Fit Model(
Y( :AU 1 ),
Effects( :AU 2 ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" )
);
fit = dlg << Run;
// perform inverse prediction on unknown
Current Data Table( unk table );
For Each Row(
fit << Inverse Prediction( Response( :AU 1[] ) );
);
// unload unknown assays
assays = Report( fit )["Inverse Prediction"][TableBox(1)] << Make Combined Data Table;
fit << Close Window;
assays << Delete Columns( Column( assays, 1 ) );
// join with unknown table
unk table << Join(
With( assays ),
By Row Number
);
Close( assays, No Save );
// plot predictions with 95% confidence intervals versus actual
unk table << Graph Builder(
Size( 534, 454 ),
Show Control Panel( 0 ),
Variables(
X( :AU 1 ),
Y( :Lower 95% ),
Y( :Upper 95%, Position( 1 ) ),
Y( :Predicted AU 2, Position( 1 ) )
),
Elements(
Bar( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 8 ), Bar Style( "Interval" ) )
),
SendToReport(
Dispatch( {}, "AU 1", ScaleBox, {Format( "Best", 12 )} ),
Dispatch( {}, "Lower 95%", ScaleBox, {Format( "Fixed Dec", 12, 0 )} )
)
);回复:如何编写校准曲线脚本也许是 JMP 版本问题(我有 JMP 13.1),但脚本不起作用。 我使用了 JSL 调试器,一开始就出现错误:名称未解析:在访问或评估“获取数据表列表”时获取数据表列表,获取数据表列表() /*###*/
回复:如何编写校准曲线脚本我想我理解了基本问题,但我可能错过了一个细节。 在打开两个数据表(校准表和未知表)的情况下尝试此脚本:
Names Default to Here( 1 );
// find all open data tables
tables = Get Data Table List();
If( N Items( tables ) < 2,
Throw( "Two data tables are required for this analysis" )
);
dlg = New Window( "Assay Unknown Samples", << Modal,
H List Box(
lb = List Box( tables ),
Line Up Box( N Col( 2 ),
Button Box( "Calibrator Table",
sel = lb << Get Selected;
cal lb << Append( sel );
),
cal lb = List Box( {},
N Lines( 1 )
),
Button Box( "Unknown Table",
sel = lb << Get Selected;
unk lb << Append( sel );
),
unk lb = List Box( {},
N Lines( 1 )
)
)
),
H List Box(
Button Box( "OK",
cal table = cal lb << Get Items;
Show( cal table );
unk table = unk lb << Get Items;
Show( unk table );
),
Button Box( "Cancel" )
)
);
If( dlg["Button"] == -1,
Throw( "User cancelled" )
);
// unload dialog
cal table = Data Table( cal table[1] );
unk table = Data Table( unk table[1] );
// perform the linear calibration
dlg = cal table << Fit Model(
Y( :AU 1 ),
Effects( :AU 2 ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" )
);
fit = dlg << Run;
// perform inverse prediction on unknown
Current Data Table( unk table );
For Each Row(
fit << Inverse Prediction( Response( :AU 1[] ) );
);
// unload unknown assays
assays = Report( fit )["Inverse Prediction"][TableBox(1)] << Make Combined Data Table;
fit << Close Window;
assays << Delete Columns( Column( assays, 1 ) );
// join with unknown table
unk table << Join(
With( assays ),
By Row Number
);
Close( assays, No Save );
// plot predictions with 95% confidence intervals versus actual
unk table << Graph Builder(
Size( 534, 454 ),
Show Control Panel( 0 ),
Variables(
X( :AU 1 ),
Y( :Lower 95% ),
Y( :Upper 95%, Position( 1 ) ),
Y( :Predicted AU 2, Position( 1 ) )
),
Elements(
Bar( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 8 ), Bar Style( "Interval" ) )
),
SendToReport(
Dispatch( {}, "AU 1", ScaleBox, {Format( "Best", 12 )} ),
Dispatch( {}, "Lower 95%", ScaleBox, {Format( "Fixed Dec", 12, 0 )} )
)
);
该脚本并不灵活,但它是一个开始。
回复:如何编写校准曲线脚本这是两个示例表。 一是校准表。 另一个表具有测量值 (AU 1),需要校准以获得未知值 (AU 2)。 让事情变得有点复杂的是,该表包含 3 个不同样品的测量结果,这 3 个样品中的每一个还包含用于制造校准器的组件。 所以在每个样本中我们都有一个内部校准器,可以这么说。
如果知道如何编写一个完全忽略我们有内部校准器这一事实的校准脚本(校准器表上的内容的简单简单线性回归并使用表达式从样本表中获取未知数),那就太好了。 如果知道如何编写使用每个样本(样本表)中校准器组件的测量值 (AU 1) 的校准脚本,将其与校准器表中的已知值 (AU 2) 进行绘制并计算,那就更好了该特定样本的未知数,并对样本表中存在的每个样本执行相同的操作。
英语不是我的母语,所以如果您需要我说得更清楚,请告诉我。
我希望你可以帮助我。
干杯。
回复:如何编写校准曲线脚本感谢您验证分析方法和过程。 继续剧本!
您能提供数据样本吗? 您可以使用通用名称(匿名数据)。 这样我就能理解脚本应该从数据表中得到什么。
回复:如何编写校准曲线脚本谢谢马克。
我已按照您提到的步骤来获得自定义逆预测。 是的,这是一个线性回归。
我的问题是我可以输入的未知数有限。 提出脚本问题时考虑到我有数千个未知数,并且我认为编写该过程的脚本将允许我获得所有这些未知数的值。
回复:如何编写校准曲线脚本我建议您首先学习如何使用 JMP 交互式地执行此分析。 看帮助>图书>预测和专业建模> 章节关于拟合曲线。 它将解释如何使用该平台来实现您的目的。 它包含一些示例,可在您尝试分析自己的数据之前指导您并帮助您进行练习。
您目前使用什么型号的校准曲线? 你提到了线性回归。 如果是这种情况,请单击“拟合曲线”旁边的红色三角形并选择多项式>拟合线性。 现在单击“线性”旁边的红色三角形并选择自定义逆预测。 将出现一个对话框,您可以在其中输入未知响应。
首先以交互方式使用“拟合曲线”平台,以确保此分析适当并产生您想要的结果。 然后我们可以帮助编写脚本。