15
Developing Custom Platforms within JMP ® Using JSL and R to Enable Additional Analysis Mark Ewing Statistician Eastman Chemical Company

Developing Custom Platforms within JMP® Using JSL and R to

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Developing Custom Platforms within JMP® Using JSL and R to

Developing Custom

Platforms within

JMP® Using JSL and R to

Enable Additional Analysis

Mark Ewing

Statistician

Eastman Chemical Company

Page 2: Developing Custom Platforms within JMP® Using JSL and R to

A Brief History of R

R is based on the S language – the basis of S-PLUS

Has always been free (as in speech and beer), open

source software

First developed in 1997, the first stable release was in

2000

In 2009 SAS announced plans to offer R integration into

their software (specifically JMP® 9) compatible with

version 2.9.1 and later of R

Page 3: Developing Custom Platforms within JMP® Using JSL and R to

Why Link JMP and R?

R is used at many universities in training new

statisticians and analysts

Many bleeding edge statistical techniques are available

in R through it's package system

JMP® has a beautiful user interface and powerful,

interactive graphical platforms

Page 4: Developing Custom Platforms within JMP® Using JSL and R to

Change Point Analysis

When analyzing time ordered historical data, change

point analysis can provide estimates for when changes in

the mean or variance of the data occurred

There are several techniques for detecting these

changes including Binary Segmentation1, the Pruned

Exact Linear Time2 method and applications of CUSUM

charts3

The Multivariate Control Chart platform in JMP® can

detect a single change point4 which can be applied

recursively to identify more

Page 5: Developing Custom Platforms within JMP® Using JSL and R to

Change Point Analysis Application Example

Page 6: Developing Custom Platforms within JMP® Using JSL and R to

Change Point Analysis Application Example

Page 7: Developing Custom Platforms within JMP® Using JSL and R to

Change Point Analysis Application Example

Page 8: Developing Custom Platforms within JMP® Using JSL and R to

Change Point Analysis Application Example

A

B

Point at which

the shift occurred

Point at which

manufacturing

turned their

knobs

Page 9: Developing Custom Platforms within JMP® Using JSL and R to

A More Elegant Solution

Implementation of Taylor's CUSUM technique in JMP®

via JSL proved harder than initially expected because of

the recursive requirements

Some online investigation lead to the 'changepoint'5

package in R

This combined with a familiar interface in JMP® produced

a custom platform for use with future change point

analyses

Page 10: Developing Custom Platforms within JMP® Using JSL and R to

What is a Custom Platform?

A user interface that has the same feel as a platform in

JMP

Page 11: Developing Custom Platforms within JMP® Using JSL and R to

What is a Custom Platform?

Provides output in a report that provides interactivity and

the ability to explore the data through the results

Page 12: Developing Custom Platforms within JMP® Using JSL and R to

Creating a Custom Platform Leveraging R

JMP

• Interface to get User Input

• Pass Relevant Information to R

R • Perform Analysis

JMP

• Pull Results from R

• Present Results to User

Page 13: Developing Custom Platforms within JMP® Using JSL and R to

Key JSL Components to Communicate with R

rconn = R Connect() • Establishes the connection with R

• Recommend placing this step in a Try() expression to be able to throw if R is not installed/working right

rconn << R Send(JMP_variable,R Name("name.in.R")) • Sends a single variable to R

rconn << R Sumbit File("File containing R code.R") • Submits an existing R script to R

rconn << R Submit("R Code") • Can be used to submit any R code

rconn << R Get(name.in.R) • Retrieves a single variable from R

Page 14: Developing Custom Platforms within JMP® Using JSL and R to

A Few Issues to Consider

Handling excluded and hidden rows

• Easiest solution is to treat any row flagged as missing or hidden

as both missing and hidden

Handling missing data

• R functions may not work properly if given missing data

• Linked subsets provide a single table to work from but any

graphs made by JMP will link back to the original table

Recall Button!

• No built in function that provides this in JSL

• Table Variables and Global Variables will provide solutions

Page 15: Developing Custom Platforms within JMP® Using JSL and R to

References

R Development Core Team (2011). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org/.

1. Scott, A. J. and Knott, M. (1974). A cluster analysis method for grouping means in the analysis of variance. Biometrics, 30(3):507-512.

2. Killick, R. and Fearnhead, P. and Eckley, I.A. (2011). An exact linear time search algorithm for multiple changepoint detection. Submitted, arXiv:1101.1438v2 [stat.ME].

3. Taylor W.A. (2000). Change-Point Analysis: A Powerful New Tool For Detecting Changes. Online, http://www.variation.com/cpa/tech/changepoint.html

4. SAS Institute Inc. (2012). JMP® 10 Quality and Reliability Methods p. 120-121

5. Rebecca Killick and Idris A. Eckley (2011). changepoint: An R package for changepoint analysis. R package version 0.5. http://CRAN.R-project.org/package=changepoint

The script referenced in this presentation may be found in the JMP ® File Exchange