안녕하세요, 데이터 테이블에서 PLS 출력 창에서 VIP 값과 Centered 및 Scaled 데이터에 대한 계수를 추출하고 싶습니다.
JSL을 통해 가능합니까?
감사해요
마테오
안녕,
나는 이것이 당신이 원하는 것을 할 것이라고 생각합니다.
마우스 오른쪽 단추를 클릭하고 편집-->트리 구조 표시를 선택하여 출력의 보고서 섹션을 찾을 수 있습니다.
이 예제에서는 Baltic 샘플 테이블을 사용했습니다.
Edit--Show Tree StructureEdit--Show Tree Structure편집--트리 구조 표시
TableBox(7) VIP tableTableBox(7) VIP table 테이블박스(7) VIP 테이블
Tables --> JMP Query Builder를 사용하여 테이블을 조인했습니다.
다음은 전체 스크립트입니다.
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 플랫폼에서 VIF가 아닌 VIP를 찾고 있었습니다. VIP와 계수가 모두 포함된 테이블을 찾지 못했습니다.
어쨌든 나는 해결 방법을 알아 냈다고 생각합니다. 계수와 VIP는 두 개의 별도 테이블 상자에 있으므로 따로 추출하겠습니다.
감사해요
마테오
안녕 마이크, 고마워. 트리 구조에서 형제 개요 상자에서 VIP가 아닌 계수만 있는 테이블 상자를 식별할 수 있었습니다.
데이터를 추출하려는 프레임박스와 연결된 테이블을 찾을 수 없습니다(VIP 대 계수).
감사해요
마테오
안녕 마이크, 고마워. 트리 구조에서 VIP가 아닌 계수가 있는 테이블 상자를 식별할 수 있었습니다.VIP 대 계수가 포함된 프레임 상자 뒤에 있는 테이블에 액세스할 수 없는 것 같습니다.