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
- :
- How to sort/order bivariate JMP charts based on R-...

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 22, 2016 4:06 AM
(2370 views)

5 REPLIES

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

Mar 22, 2016 4:58 AM
(2193 views)

I would take a look at the Response Screening platform:

http://www.jmp.com/support/help/Response_Screening.shtml

which is designed for this kind of thing.

But, if you want to stick with your current method, you can use the kind of approach shown below. Do 'File > New > New Script', copy the code, then 'Edit > Run Script'.

NamesDefaultToHere(1);

// Make some data

nr = 25; // Numer of rows

nc = 21; // Number of columns

m = J(nr, nc, RandomNormal());

cNames = {"Y"}; For(c=2, c<=nc, c++, InsertInto(cNames, "X"||Char(c-1)));

dt = AsTable(m, << ColumnNames(cNames));

dt << setName("Many Xs");

// 'Traditional' Fit Y By X . . .

// (1) Launch the platform invisibly

biv = dt << Bivariate(Y(cNames[1]), X(cNames[2::NItems(cNames)]), FitLine, Invisible);

// (2) Get the R Squared values into an invisible table

dt2 = Report(biv[1])[TableBox(1)] << makeCombinedDataTable(Invisible(1));

r2Del = dt2 << getRowsWhere(:Column 1 != "RSquare");

dt2 << deleteRows(r2del);

dt2 << Sort(By(:Column 2), Order(Descending), ReplaceTable);

// (3) Get the ordering of the Xs by R Squared

xOrder = Column(dt2, "X") << getValues;

// (4) Close the invisible report and table

Report(biv[1]) << closeWindow;

Close(dt2, NoSave);

// (5) Launch the platform with the correct order of Xs

biv = dt << Bivariate(Y(cNames[1]), X(Eval(xOrder)), FitLine);

// Response Screening Platform . . .

Wait(3);

rs = dt << Response Screening( Y(cNames[1]), X(cNames[2::NItems(cNames)]) );

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

Mar 31, 2016 10:42 AM
(2193 views)

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

Mar 28, 2016 4:53 PM
(2193 views)

Hi shwetakuvlsi1,

Are you familiar with the option to "Order by Goodness of Fit". Using this on sample data such as Football.jmp has the best R-squared at the top and the worst at the bottom.

Here's the sample script to take a look.

dt = Open

("$SAMPLE_DATA/Football.jmp");

dt <<

Fit Group(Bivariate

(Y(:Height), X(:Weight), Fit Line),Bivariate

(Y(:Height), X(:LegPress), Fit Line),Bivariate

(Y(:Height), X(:Neck), Fit Line),Bivariate

(Y(:Height), X(:Squat), Fit Line),Bivariate

(Y(:Height), X(:Fat), Fit Line),Bivariate

(Y(:Height), X(:Bench), Fit Line),Bivariate

(Y(:Height), X(:Speed), Fit Line),<<

{Arrange in Rows(1), Order by Goodness of Fit},

);

As you have 100's of X's you may want to even turn things into a tabular format using the make combined data table.

And then you can select the R-Squared value:

Regards,

Nate

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

Mar 29, 2016 12:27 AM
(2193 views)

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

Mar 31, 2016 10:42 AM
(2193 views)