turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Extracting VIP vs Coefficients for Centered and Sc...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 4, 2017 9:52 AM
(3078 views)

Hello, I would like to extract, in a data table, the values for VIP and Coefficients for Centered and Scaled Data from the PLS output window.

Is this possible through JSL?

thanks

Matteo

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 8, 2017 7:38 AM
(5916 views)

Solution

Hi,

I think this will do you what you want.

You can find the report section of any output by right-clicking and select Edit-->Show Tree Structure.

I used the Baltic sample table for this example.

I joined the tables using Tables --> JMP Query Builder.

Here is the full script.

```
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 Table(Invisible);
tbl_2# = Current Data Table()<< Set Name("VIP_Tbl");
New SQL Query(
Version( 130 ),
Connection( "JMP" ),
JMP Tables( ["Coefficients_Tbl" => "_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 );
```

Cheers,

Stan

7 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 4, 2017 12:50 PM
(3075 views)

M

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 5, 2017 1:02 AM
(3061 views)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 5, 2017 8:00 AM
(3053 views)

M

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 5, 2017 8:26 AM
(3051 views)

Actually I was looking for VIP , not VIF, under PLS platform. I've not been able to find a table containing both VIP and coefficients.

In any case I think I figured out a workaround. Coefficients and VIPs are in two separate table boxes, so I will just extract them separately.

thanks

Matteo

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 5, 2017 1:06 AM
(3060 views)

Hello Mike, thanks. In the tree structure I was able to identify a tablebox with just coefficients but not the VIPs, in a sibling outlinebox.

I cannot find any table associated with the framebox I would like to extract data from (VIP vs coefficients).

thanks

Matteo

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 8, 2017 7:38 AM
(5917 views)

Hi,

I think this will do you what you want.

You can find the report section of any output by right-clicking and select Edit-->Show Tree Structure.

I used the Baltic sample table for this example.

I joined the tables using Tables --> JMP Query Builder.

Here is the full script.

```
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 Table(Invisible);
tbl_2# = Current Data Table()<< Set Name("VIP_Tbl");
New SQL Query(
Version( 130 ),
Connection( "JMP" ),
JMP Tables( ["Coefficients_Tbl" => "_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 );
```

Cheers,

Stan

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Mar 10, 2017 11:29 AM
(2943 views)