您好,我想在数据表中从 PLS 输出窗口中提取 VIP 值以及居中和缩放数据的系数。
通过 JSL 可以吗?
谢谢
马泰奥
你好,
我想这会满足你的需求。
您可以通过右键单击并选择“编辑”-->“显示树结构”来找到任何输出的报告部分。
我在本示例中使用了波罗的海样本表。
Edit--Show Tree StructureEdit--Show Tree Structure编辑--显示树结构
TableBox(7) VIP tableTableBox(7) VIP tableTableBox(7) VIP桌
我使用表 --> JMP 查询生成器连接表。
这是完整的脚本。
Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Baltic.jmp" );
P = Partial Least Squares(
Y( :ls, :ha, :dt ),
X(
:v1,
:v2,
:v3,
:v4,
:v5,
:v6,
:v7,
:v8,
:v9,
:v10,
:v11,
:v12,
:v13,
:v14,
:v15,
:v16,
:v17,
:v18,
:v19,
:v20,
:v21,
:v22,
:v23,
:v24,
:v25,
:v26,
:v27
),
Validation Method( Name( "Leave-One-Out" ), Initial Number of Factors( 15 ) ),
Fit(
Method( NIPALS ),
Number of Factors( 7 ),
Variable Importance Plot( 1 ),
VIP vs Coefficients Plots( 1 )
),
SendToReport(
Dispatch(
{"NIPALS Fit with 7 Factors"},
"Model Coefficients for Centered and Scaled Data",
OutlineBox,
{Close( 0 )}
),
Dispatch(
{"NIPALS Fit with 7 Factors", "Variable Importance Plot"},
"Variable Importance Table",
OutlineBox,
{Close( 0 )}
)
)
);
pls_rpt = p << report; //Get the report
//Find the specific section of report by right-clicking Edit-->show properties
//pls_rpt[Outline Box( 9 )] << Close; //Close the outline box; for example
//pls_rpt[Outline Box( 12 )] << Close; //Close the outline box; not necessary
coef_tbl = pls_rpt[Table Box( 5 )];
VIP_tbl = pls_rpt[Table Box( 7 )];
coef_tbl << Make Into Data Table(Invisible);
tbl_1# = Current Data Table()<< Set Name("Coefficients_Tbl");
VIP_tbl<<MAKE into="" data="https://community.jmp.com/" table=""> "_MEMORY_", "VIP_Tbl" => "_MEMORY_"] ),
QueryName( "SQLQuery2" ),
Select(
Column( "VIP", "t1", Numeric Format( "Fixed Dec", "4", "NO", "" ) ),
Column( "Coefficient", "t2" ),
Column( "ls", "t2", Numeric Format( "Fixed Dec", "4", "NO", "" ) ),
Column( "ha", "t2", Numeric Format( "Fixed Dec", "4", "NO", "" ) ),
Column( "dt", "t2", Numeric Format( "Fixed Dec", "4", "NO", "" ) )
),
From(
Table( "VIP_Tbl", Alias( "t1" ) ),
Table(
"Coefficients_Tbl",
Alias( "t2" ),
Join(
Type( Left Outer ),
EQ( Column( "X", "t1" ), Column( "Coefficient", "t2" ) )
)
)
)
) << Run;
Close( tbl_1#, NoSave );
Close( tbl_2#, NoSave );</MAKE>
干杯,
斯坦
实际上我在PLS平台下寻找VIP,而不是VIF。 我找不到同时包含 VIP 和系数的表。
无论如何,我想我找到了解决方法。 系数和 VIP 位于两个单独的表框中,因此我将分别提取它们。
谢谢
马泰奥
你好,迈克,谢谢。 在树结构中,我能够在同级大纲框中识别出仅包含系数但不包含 VIP 的表格框。
我找不到与我想从中提取数据的框架框相关的任何表格(VIP 与系数)。
谢谢
马泰奥
你好,迈克,谢谢。 在树结构中,我能够识别带有系数的表格框,但不能识别 VIP。看起来包含 VIP 与系数的框架盒后面的表无法访问。