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
- :
- Perform a Bivariate Analysis on a sorted column

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

Aug 2, 2017 1:27 PM
(1110 views)

So I am doing a Bivariate analysis for Current versus Area. I have a column with different IDs like 26,35, etc. and want to perform an analysis for each one and have it show on different plots but in the same GUI that I've put together. Any help would be really appreciated!

You will see below that Column 3 is the Column I sorted!

```
dt = Current Data Table();
//Change the Max Ic to Max Jc and organize table by reticle
dt << sort( by( Column( 3 ) ), Replace Table );
Column1 = Column( dt, "Corrected Area (um^2)" );
Column2 = Column( dt, "Max Ic (mA)" );
Column3 = New Column( "Max Jc (mA/um^2)" );
Column3 << set values( (Column2 << get as matrix) * 100 );
Column3 << set name( "Max Jc (mA/um^2)" );
//Obtain the Max Ic
MaxIc = Col Max( Column2 );
Save Text File( "$Python.py", str( MaxIc ), Mode( "Append" ) );
//Save Text File("$Python.py", MaxIc, Mode("Append") );
//allows manipulation to columns to go unaltered between runs
Close( dt, Save( filepath ) );
//Call CreateBivariate to do a bivariate (two variable) analysis
//list allows you to do more analysis
status = List( 0, 0 );
New Window( "Custom Analysis",
H List Box(
V List Box(
Panel Box( "Controls",
Text Box( "Choose Analysis" ),
choice = Check Box(
{"Distribution", "Fit Line"},
current = choice << Get( 1 );
xParam = Column1; //Corrected Area
yParam = Column2; //Max Ic
//Get the distribution
If( And( current, Not( status[1] ) ),
dt << Append(
dt = V List Box(
bivDistribution = Distribution( Y( Eval( yParam ) ), X( Eval( xParam ) ), )
)
);
status[1] = 1; //mark as present
);
//Perform a Bivariate Analysis
current = choice << Get( 2 );
If( And( current, Not( status[2] ) ),
dt << Append(
dt = V List Box(
bivPlatform = Bivariate(
Y( Eval( yParam ) ),
X( Eval( xParam ) ),
Fit Line( {Line Color( {213, 72, 87} )} ),
Fit Line( {Line Color( {57, 177, 67} )} ),
)
)
);
status[2] = 1; //mark as present
);
)
);
),
dt = V List Box()
)
);
```

1 ACCEPTED SOLUTION

Accepted Solutions

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

Aug 3, 2017 7:26 AM
(2137 views)

Solution

Sorting the data set might benefit you but it is unnecessary for the Distribution or Bivariate platforms to work.

Include the **By( Column( 3 ) )** argument to the **Bivariate()** function call in your script.

Learn it once, use it forever!

6 REPLIES

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

Aug 3, 2017 6:44 AM
(1090 views)

Can you use column 3 in the Bivariate By role? That way would be the simplest and use the built-in platform behavior.

Why are you sorting the data?

I would recommend using a different name for the variable that stores the reference to the vertical list box than the name that you used for the variable to store the data table reference.

Anyway, hope this suggestion helps.

Learn it once, use it forever!

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

Aug 3, 2017 7:04 AM
(1088 views)

Reticle: 26 in one column and Max Ic in another column

Reticle:25 in that column and it's respective Max Ic

So I want to perform separate bivariate analysis depending on what reticle

it is!

Thanks,

Tyler

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

Aug 3, 2017 7:26 AM
(2138 views)

Sorting the data set might benefit you but it is unnecessary for the Distribution or Bivariate platforms to work.

Include the **By( Column( 3 ) )** argument to the **Bivariate()** function call in your script.

Learn it once, use it forever!

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

Aug 3, 2017 8:27 AM
(1081 views)

That worked perfectly!!! Very simple fix! Last question you don't have to answer, how could I save all of those images to a png?

I have tried:

dt <<**save picture****(**"T:\W\Wintermute\50 Sandbox\Gingrich\69977JM",png**)**,

But it gives me an Error log?

Thanks,

Tyler

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

Aug 4, 2017 7:39 AM
(1051 views)

Is it possible to sort by two columns? It works for column(3) so far, and incredibly well, thanks again for the help--but can I do ( by(column3) || by(column4) )

Thanks,

Tyler

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

Aug 4, 2017 7:54 AM
(1048 views)