# JMP Scripting Index > The JMP Scripting Index provides a brief description and the syntax for JMP Scripting Language functions, objects, python integration, and display boxes for the JMP® Software. Documentation for all of the Functions, Objects, Display Boxes, and Python functions that are supported by the JMP Scripting Language also known as JSL. This guide includes syntax, descriptions, code examples, and JMP® software version compatibility for each item. # JSL Objects Usage Documentation # [Add-In](#add-in) ## [Item Messages](#item-messages) ### [Auto Load](#auto-load) **Syntax:** addin \<< Auto Load( boolean ) **Description:** Sets whether or not an add-in should be automatically loaded during JMP's startup process. ``` addin = Get Addin( "com.mycompany.myaddin" ); If( !Is Missing( addin ), addin << Auto Load( 1 ), Print( "Add-In ID Not Found" ) ); ``` ### [Display Name](#display-name) **Syntax:** name = addin \<< Display Name **Description:** Returns the display name for an add-in. **Example 1** ``` addins = Get Addins(); addins << Display Name(); ``` **Example 2** ``` addin = Get Addin( "com.mycompany.myaddin" ); If( !Is Missing( addin ), addin << Display Name(), Print( "Add-In ID Not Found" ) ); ``` ### [Home Folder](#home-folder) **Syntax:** folder = addin \<< Home Folder **Description:** Returns the home folder for an add-in. **Example 1** ``` addins = Get Addins(); addins << Home Folder(); ``` **Example 2** ``` addin = Get Addin( "com.mycompany.myaddin" ); If( !Is Missing( addin ), addin << Home Folder(), Print( "Add-In ID Not Found" ) ); ``` ### [ID](#id) **Syntax:** id = addin \<< ID **Description:** Returns the unique ID for an add-in. **Example 1** ``` addins = Get Addins(); addins << ID(); ``` **Example 2** ``` addin = Get Addin( "com.mycompany.myaddin" ); If( !Is Missing( addin ), addin << ID(), Print( "Add-In ID Not Found" ) ); ``` ### [Is Loaded](#is-loaded) **Syntax:** x = addin \<< Is Loaded **Description:** Returns whether or not an add-in is currently loaded. **Example 1** ``` addins = Get Addins(); addins << Is Loaded(); ``` **Example 2** ``` addin = Get Addin( "com.mycompany.myaddin" ); If( !Is Missing( addin ), addin << Is Loaded(), Print( "Add-In ID Not Found" ) ); ``` ### [Load](#load) **Syntax:** addin \<< Load **Description:** Loads an add-in. ``` addin = Get Addin( "com.mycompany.myaddin" ); If( !Is Missing( addin ), addin << Load(), Print( "Add-In ID Not Found" ) ); ``` ### [Unload](#unload) **Syntax:** addin \<< Unload **Description:** Unloads an add-in. ``` addin = Get Addin( "com.mycompany.myaddin" ); If( !Is Missing( addin ), addin << Unload(), Print( "Add-In ID Not Found" ) ); ``` ### [Version](#version) **Syntax:** ver = addin \<< Version **Description:** Returns the version number for an add-in. **Example 1** ``` addins = Get Addins(); addins << Version(); ``` **Example 2** ``` addin = Get Addin( "com.mycompany.myaddin" ); If( !Is Missing( addin ), addin << Version(), Print( "Add-In ID Not Found" ) ); ``` # [Alpha Shape](#alpha-shape) ## [Associated Constructors](#associated-constructors) ### [Alpha Shape](#alpha-shape_1) **Syntax:** ashape = Alpha Shape(Triangulation) **Description:** Returns the alpha shape for the given triangulation. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); ``` ## [Item Messages](#item-messages) ### [Get Alpha](#get-alpha) **Syntax:** alpha = obj \<< Get Alpha **Description:** Returns the current alpha value. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); ashape << Get Alpha(); ``` ### [Get Edges](#get-edges) **Syntax:** edges = obj \<< Get Edges **Description:** Returns the indices of the edges in the form an Nx2 matrix. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); tri << Get Edges; ``` ### [Get Hull Edges](#get-hull-edges) **Syntax:** ind = obj \<< Get Hull Edges **Description:** Returns the indices of the edges on the boundary of the triangulation. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); tri << Get Hull Edges; ``` ### [Get Hull Path](#get-hull-path) **Syntax:** ind = obj \<< Get Hull Path **Description:** Returns the boundary of the triangulation as a path. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); tri << Get Hull Path; ``` ### [Get Hull Points](#get-hull-points) **Syntax:** ind = obj \<< Get Hull Points **Description:** Returns the indices of the points on the boundary of the triangulation. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); tri << Get Hull Points; ``` ### [Get N Edges](#get-n-edges) **Syntax:** nedge = obj \<< Get N Edges **Description:** Returns the number of edges in the triangulation. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); tri << Get NEdges; ``` ### [Get N Hull Edges](#get-n-hull-edges) **Syntax:** nhull = obj \<< Get N Hull Edges **Description:** Returns the number of edges on the boundary of the triangulation. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); tri << Get N Hull Edges; ``` ### [Get N Hull Points](#get-n-hull-points) **Syntax:** nhull = obj \<< Get N Hull Points **Description:** Returns the number of points on the boundary of the triangulation. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); tri << Get N Hull Points; ``` ### [Get N Points](#get-n-points) **Syntax:** npt = obj \<< Get N Points **Description:** Returns the number of unique points in the triangulation. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); tri << Get N Points; ``` ### [Get N Triangles](#get-n-triangles) **Syntax:** ntri = obj \<< Get N Triangles **Description:** Returns the number of triangles. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); tri << Get N Triangles; ``` ### [Get Points](#get-points) **Syntax:** {x1,x2} = obj \<< Get Points **Description:** Returns the coordinates of the unique points in the triangulation. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); tri << Get Points; ``` ### [Get Tri Alpha](#get-tri-alpha) **Syntax:** [alpha1, ...] = obj \<< Get Tri Alpha **Description:** Returns the alpha values for each triangle. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); ashape << Get Tri Alpha(); ``` ### [Get Triangles](#get-triangles) **Syntax:** m = obj \<< Get Triangles **Description:** Returns the indices of the triangles in the form of an Nx3 matrix. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); tri << Get Triangles; ``` ### [Get Y](#get-y) **Syntax:** y = obj \<< Get Y **Description:** Returns the Y values of the unique points in the triangulation. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); tri << Get Y; ``` ### [Peel](#peel) **Syntax:** tri = obj \<< Peel **Description:** Peel the boundary layer of a triangulation, returning a new triangulation. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); Show( tri << Get N Triangles ); tri2 = tri << Peel; Show( tri2 << Get N Triangles ); ``` ### [Set Alpha](#set-alpha) **Syntax:** obj \<< Set Alpha( alpha ) **Description:** Sets the current alpha value and recomputes the triangulation. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); ashape << Set Alpha( 0.5 ); ``` ### [Subset](#subset) **Syntax:** tri = obj \<< Subset( {indices} ) **Description:** Returns a triangulation resulting from the given subset of points. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); triang = Triangulation( X( :X, :Y ), Y( :POP ) ); ashape = tri = Alpha Shape( triang ); Show( tri << Get N Triangles ); tri2 = tri << Subset( tri << Get Hull Points ); Show( tri2 << Get N Triangles ); ``` # [Association Analysis](#association-analysis) ## [Associated Constructors](#associated-constructors) ### [Association Analysis](#association-analysis_1) **Syntax:** Association Analysis( Item( columns ), ID( columns ) ) **Description:** Identifies connections among groups of items in an independent event or transaction. Association analysis is frequently used to analyze transactional data (also called market baskets) to identify items that often appear together in transactions. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); ``` ## [Columns](#columns) ### [By](#by) **Syntax:** obj = Association Analysis(...\...) **Description:** Specifies the By column during launch. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); ``` ### [Freq](#freq) **Syntax:** obj = Association Analysis(...\...) **Description:** Specifies a column whose values assign a frequency to each row for the analysis. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); dt << New Column( "_freqcol", Numeric, Continuous, Set Each Value( Random Integer( 1, 5 ) ) ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ), Freq( :_freqcol ) ); ``` ### [ID](#id) **Syntax:** obj = Association Analysis(...\...) **Description:** Specifies the column that identifies the transaction to which an item belongs. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); ``` ### [Item](#item) **Syntax:** obj = Association Analysis(...Item( column(s) )...) **Description:** Specifies the categorical column(s) that contain the item data to be analyzed. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); ``` ## [Item Messages](#item-messages) ### [Frequent Item Sets](#frequent-item-sets) **Syntax:** obj \<< Frequent Item Sets( state=0|1 ) **Description:** Shows or hides a list of item sets whose support exceeds the Minimum Support value specified in the platform launch. On by default. ``` dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" ); obj = dt << Run Script( "Association Analysis of Product" ); obj << Frequent Item Sets( 0 ); ``` ### [Maximum Antecedents](#maximum-antecedents) **Syntax:** obj = Association Analysis(...Maximum Antecedents( number=3 )...) **Description:** Specifies the maximum number of items in the condition item set. Association rules with more than this number of items in the condition set are not considered in the analysis. "3" by default. ``` dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" ); dt << Association Analysis( Item( :Product ), ID( :Customer ID ), Maximum Antecedents( 2 ) ); ``` ### [Maximum Rule Size](#maximum-rule-size) **Syntax:** obj = Association Analysis(...Maximum Rule Size( number=4 )...) **Description:** Specifies the maximum number of items that appear in the union of the condition and consequent item sets. Association rules with more than this combined number of items are not considered in the analysis. "4" by default. ``` dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" ); dt << Association Analysis( Item( :Product ), ID( :Customer ID ), Maximum Rule Size( 7 ) ); ``` ### [Minimum Confidence](#minimum-confidence) **Syntax:** obj = Association Analysis(...Minimum Confidence( number=0.40 )...) **Description:** Specifies a minimum value for the proportion of occurrences that a consequent item set occurs within transactions that contain the conditional item set. This value must be between 0 and 1. Only association rules with confidence equal to or exceeding this value appear in the report. "0.40" by default. ``` dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" ); dt << Association Analysis( Item( :Product ), ID( :Customer ID ), Minimum Confidence( 0.5 ) ); ``` ### [Minimum Lift](#minimum-lift) **Syntax:** obj = Association Analysis(...Minimum Lift( number=1.2 )...) **Description:** Specifies a minimum dependency ratio. Lift values must be 0 or greater. Only association rules with lift equal to or exceeding this value appear in the report. "1.2" by default. ``` dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" ); dt << Association Analysis( Item( :Product ), ID( :Customer ID ), Minimum Lift( 1.1 ) ); ``` ### [Minimum Support](#minimum-support) **Syntax:** obj = Association Analysis(...Minimum Support( fraction=0.10 )...) **Description:** Specifies a minimum value for the proportion of occurrences of an item set. This value must be between 0 and 1. Only item sets with support equal to or exceeding this value are considered in the analysis. "0.10" by default. ``` dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ), Minimum Support( 0.2 ) ); ``` ### [Rotated SVD](#rotated-svd) **Syntax:** obj \<< Rotated SVD **Description:** Performs a varimax rotated partial singular value decomposition of the item transaction matrix to produce groups of items called topics. You can select this option multiple times to find different numbers of topics. ``` dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" ); obj = dt << Run Script( "Association Analysis of Product" ); obj << Rules( 0 ); obj << SVD( Number of Singular Vectors( 20 ) ); obj << Rotated SVD( Number of Topics( 9 ) ); ``` ### [Rules](#rules) **Syntax:** obj \<< Rules( state=0|1 ) **Description:** Shows or hides a table of association rules that meet the Minimum Support, Minimum Confidence, Minimum Lift, Maximum Antecedents, and Maximum Rule Size requirements specified in the platform launch. On by default. ``` dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" ); obj = dt << Run Script( "Association Analysis of Product" ); obj << Rules( 0 ); ``` ### [SVD](#svd) **Syntax:** obj \<< SVD( Number of Singular Vectors( number ) ) **Description:** Shows or hides a report of a partial singular value decomposition (SVD) of the incidence matrix for the items. This decomposition reduces the incidence matrix into a user-specified number of dimensions for analysis. ``` dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" ); obj = dt << Run Script( "Association Analysis of Product" ); obj << Rules( 0 ); obj << SVD( Number of Singular Vectors( 20 ) ); ``` ### [Save Item SVD](#save-item-svd) **Syntax:** obj \<< Save Item SVD **Description:** Creates a data table that contains a number of singular vectors that you specify for each item. These are the right singular values in the transaction item matrix. ``` dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" ); obj = dt << Run Script( "Association Analysis of Product" ); obj << Rules( 0 ); obj << SVD( Number of Singular Vectors( 20 ) ); obj << Save Item SVD( 20 ); ``` ### [Save Transaction SVD](#save-transaction-svd) **Syntax:** obj \<< Save Transaction SVD **Description:** Creates a data table that contains a number of singular vectors that you specify for each transaction. These are the left singular values in the transaction item matrix. ``` dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" ); obj = dt << Run Script( "Association Analysis of Product" ); obj << Rules( 0 ); obj << SVD( Number of Singular Vectors( 20 ) ); obj << Save Transaction SVD( 10 ); ``` ### [Transaction Listing](#transaction-listing) **Syntax:** obj \<< Transaction Listing( state=0|1 ) **Description:** Shows or hides a table listing each Transaction ID value and the items included in that transaction. The table is sorted by the Transaction ID column. ``` dt = Open( "$SAMPLE_DATA\Grocery Purchases.jmp" ); obj = dt << Run Script( "Association Analysis of Product" ); obj << Transaction Listing( 1 ); ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Automatic Recalc](#automatic-recalc) **Syntax:** obj \<< Automatic Recalc( state=0|1 ) **Description:** Redoes the analysis automatically for exclude and data changes. If the Automatic Recalc option is turned on, you should consider using Wait(0) commands to ensure that the exclude and data changes take effect before the recalculation. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); obj << Automatic Recalc( 1 ); dt << Select Rows( 5 ) << Exclude( 1 ); ``` ### [Broadcast](#broadcast) **Syntax:** obj \<< Broadcast(message) **Description:** Broadcasts a message to a platform. If return results from individual objects are tables, they are concatenated if possible, and the final format is identical to either the result from the Save Combined Table option in a Table Box or the result from the Concatenate option using a Source column. Other than those, results are stored in a list and returned. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" ); objs = Control Chart Builder( Variables( Subgroup( :DAY ), Y( :DIAMETER ) ), By( :OPERATOR ) ); objs[1] << Broadcast( Save Summaries ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy ByGroup Script](#copy-bygroup-script) **Syntax:** obj \<< Copy ByGroup Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Copy ByGroup Script; ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get ByGroup Script](#get-bygroup-script) **Syntax:** obj \<< Get ByGroup Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); t = obj[1] << Get ByGroup Script; Show( t ); ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Group Platform](#get-group-platform) **Syntax:** obj \<< Get Group Platform **Description:** Return the Group Platform object if this platform is part of a Group. Otherwise, returns Empty(). ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Y( :weight ), X( :height ), By( :sex ) ); group = biv[1] << Get Group Platform; Wait( 1 ); group << Layout( "Arrange in Tabs" ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \<, < \<, < \<, < \< ); **Description:** Creates a JSL script to produce this analysis, and save it as a table property in the data table. You can specify a name for the script. The Append Suffix option appends a numeric suffix to the script name, which differentiates the script from an existing script with the same name. The Prompt option prompts the user to specify a script name. The Replace option replaces an existing script with the same name. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Data Table; ``` ### [Save ByGroup Script to Journal](#save-bygroup-script-to-journal) **Syntax:** obj \<< Save ByGroup Script to Journal **Description:** Create a JSL script to produce this analysis, and add a Button to the journal containing this script. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Journal; ``` ### [Save ByGroup Script to Script Window](#save-bygroup-script-to-script-window) **Syntax:** obj \<< Save ByGroup Script to Script Window **Description:** Create a JSL script to produce this analysis, and append it to the current Script text window. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Script Window; ``` ### [Save Script for All Objects](#save-script-for-all-objects) **Syntax:** obj \<< Save Script for All Objects **Description:** Creates a script for all report objects in the window and appends it to the current Script window. This option is useful when you have multiple reports in the window. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); obj << Save Script for All Objects; ``` ### [Save Script for All Objects To Data Table](#save-script-for-all-objects-to-data-table) **Syntax:** obj \<< Save Script for All Objects To Data Table( ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); obj << Save Script to Data Table( "My Analysis", <(... Transform Column(, Formula(), \[Random Seed()\], [Numeric|Character|Expression], [Continuous|Nominal|Ordinal|Unstructured Text], [column properties]) ...) **Description:** Create a transform column in the local context of an object, usually a platform. The transform column is active only for the lifetime of the platform. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Distribution( Transform Column( "age^2", Format( "Fixed Dec", 5, 0 ), Formula( :age * :age ) ), Continuous Distribution( Column( :"age^2"n ) ) ); ``` ### [View Web XML](#view-web-xml) **Syntax:** obj \<< View Web XML **Description:** Returns the XML code that is used to create the interactive HTML report. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); xml = obj << View Web XML; ``` ### [Window View](#window-view) **Syntax:** obj = Association Analysis(...Window View( "Visible"|"Invisible"|"Private" )...) **Description:** Set the type of the window to be created for the report. By default a Visible report window will be created. An Invisible window will not appear on screen, but is discoverable by functions such as Window(). A Private window responds to most window messages but is not discoverable and must be addressed through the report object ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Window View( "Private" ), Y( :weight ), X( :height ), Fit Line ); eqn = Report( biv )["Linear Fit", Text Edit Box( 1 )] << Get Text; biv << Close Window; New Window( "Bivariate Equation", Outline Box( "Big Class Linear Fit", Text Box( eqn, < "house", "car" => "star", "orange" => ""], words = ["mouse" => 42, "car" => 54]}, rhymes << Contains( words ) ); ``` ### [Contains Item](#contains-item) **Syntax:** bool = AAobj \<< Contains Item( key ) **Description:** Inquire if the key is in the associative array. Also see Contains, which has additional capability. ``` Local( {rhymes = ["mouse" => "house", "car" => "star", "orange" => ""]}, rhymes << Contains Item( "car" ) ); ``` ### [First](#first) **Syntax:** key = AAobj \<< first **Description:** Iterator for Associative Array. ``` Local( {aa = [1 => "bun", 2 => "shoe", 3 => "tree", 4 => "door"], x, words = ""}, x = aa << First; While( !Is Empty( x ), words = words || aa[x]; x = aa << Next( x ); ); words; ); ``` ### [Get Contents](#get-contents) **Syntax:** list = AAObj \<< Get Contents **Description:** Returns the contents of the Associative Array as a list. ``` Local( {aa = [1 => "bun", 2 => "shoe", 3 => "tree", 4 => "door"]}, aa << Get Contents ); ``` ### [Get Default Value](#get-default-value) **Syntax:** value = AAobj \<< Get Default Value() **Description:** Returns the value the Associative Array will return for keys that are not found. ``` Local( {aa = [=> 99], v1, v2}, /* initial value used for non-existing key is 99 */ v1 = aa[876]; /* v1 is 99 because the key 876 is not found */ aa << Insert( "set item" ); /* used for sets, value is 1 */ aa << Set Default Value( (aa << Get Default Value) - 1 ); /* new default is one less than old default */ v2 = aa[876]; /* v2 is 98 because the key 876 is STILL not found */ Char( v1 ) || " " || Char( v2 ) || " " || Char( aa ); ); ``` ### [Get Keys](#get-keys) **Syntax:** list = AAObj \<< Get Keys **Description:** Returns a list of keys found in the Associative Array. ``` Local( {aa = [1 => "bun", 2 => "shoe", 3 => "tree", 4 => "door"]}, aa << Get Keys ); ``` ### [Get Value](#get-value) **Syntax:** value = AAobj \<< Get Value( key ) **Description:** Returns the value stored under the key in the associative array. ``` Local( {prices = Associative Array( {{"pineapple", 1.25}, {"grape", .50}, {"orange", .75}} )}, prices << getvalue( "orange" ) /* or prices["orange"] */ ); ``` ### [Get Values](#get-values) **Syntax:** list = AAObj \<< Get Values **Description:** Returns a list of values found in the Associative Array. ``` Local( {aa = [1 => "bun", 2 => "shoe", 3 => "tree", 4 => "door"]}, aa << Get Values ); ``` ### [Insert](#insert) **Syntax:** AAobj1 \<< Insert( AAobj2 | key, { value } ) **Description:** Inserts an associative array into another associative array or stores value under key in the associative array. See Insert Item for a simpler example. ``` Local( {decode = [".-" => "a", "-..." => "b"], others = ["..." => "s", "-.-." => "c"]}, decode << Insert( others ); decode["-.-."] || decode[".-"] || decode["-..."] || decode["..."]; ); ``` ### [Insert Item](#insert-item) **Syntax:** AAobj \<< Insert Item( key, value ) **Description:** Stores value under key in the associative array. Also see Insert, which has additional capability. ``` Local( {decode = [".-" => "a", "-..." => "b"]}, decode << insertitem( "-.-.", "c" );/* or decode["-.-."]="c"*/ decode["-.-."] || decode[".-"] || decode["-..."]; ); ``` ### [Intersect](#intersect) **Syntax:** AAobj1 \<< Intersect( AAobj2 ) **Description:** Treats an associative array as a set of objects. Values must be 1 for objects in the set. Default value must be 0. The current set is replaced by its intersection with the set in the message. **Example 1** ``` Local( {red things = [=> 0], round things = [=> 0]}, /* default values must be zero for intersect to work */ red things << Insert( "apple" ) << Insert( "blood" ) << Insert( "stop light" ) << Insert( "mars" ); round things << Insert( "earth" ) << Insert( "mars" ) << Insert( "apple" ) << Insert( "orange" ); red and round = red things; red and round << Intersect( round things ); red and round << Get Keys; ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); // select where could be used with :age<=12 & :sex=="M" in one step. this is a demo of set operations with associative arrays. // associative array([2,4,7]) builds a set containing keys 2,4,7 with a value of 1 and all other possible keys have a value of 0 dt << Select Where( :age <= 12 ); preteen = Associative Array( dt << Get Selected Rows ); // get selected rows returns an array dt << SelectWhere( :sex == "M" ); male = Associative Array( dt << GetSelectedRows ); // the array creates a "set" of items desiredSelection = preteen; // copy the set because the following < "bun", 2 => "shoe", 3 => "tree", 4 => "door"], x, words = ""}, x = aa << First; While( !Is Empty( x ), words = words || aa[x]; x = aa << Next( x ); ); words; ); ``` ### [Remove](#remove) **Syntax:** AAobj1 \<< Remove( AAobj2 | key ) **Description:** Removes the set of keys or the key from the associative array. Also see Remove Item for a simpler example. ``` Local( {primes = [2 => 1, 3 => 1, 4 => 1, 5 => 1, 6 => 1, 7 => 1, 8 => 1, 9 => 1]}, primes << Remove( [4 => 1, 6 => 1, 8 => 1, 9 => 1] ); primes << GetKeys; /* retrieve a list of remaining keys */ ); ``` ### [Remove Item](#remove-item) **Syntax:** AAobj \<< Remove Item( key ) **Description:** Removes the key from the associative array. Also see Remove, which has additional capability. ``` Local( {primes = [2 => 1, 3 => 1, 4 => 1, 5 => 1, 6 => 1, 7 => 1, 8 => 1, 9 => 1] /* all the values are 1; they are not actually used */ , p, test}, p = primes << First; /* iterate through keys */ While( !Is Empty( p ), /* empty key means finished iterating */ test = p; /* remember the key before advancing */ p = primes << Next( p ); /* advance to next key before removing this key */ If( test == 4 | test == 6 | test > 7, /* not the most sophisticated way to make primes */ primes << Remove Item( test ) /* here it is! remove a key from the Associative Array */ ); ); primes << GetKeys; /* retrieve a list of remaining keys */ ); ``` ### [Set Default Value](#set-default-value) **Syntax:** AAobj \<< Set Default Value( value ) **Description:** Changes the value the Associative array will return for keys that are not found. ``` Local( {aa = [=> 99], v1, v2}, /* initial value used for non-existing key is 99 */ v1 = aa[876]; /* v1 is 99 because the key 876 is not found */ aa << Insert( "set item" ); /* used for sets, value is 1 */ aa << Set Default Value( (aa << Get Default Value) - 1 ); /* new default is one less than old default */ v2 = aa[876]; /* v2 is 98 because the key 876 is STILL not found */ Char( v1 ) || " " || Char( v2 ) || " " || Char( aa ); ); ``` # [Attribute Chart](#attribute-chart) ## [Associated Constructors](#associated-constructors) ### [Attribute Chart](#attribute-chart_1) **Syntax:** Attribute Chart( Y( columns ), X( columns ) ) **Description:** Analyzes categorical measurements to show you measures of agreement across responses, such as raters. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); ``` ## [Columns](#columns) ### [By](#by) **Syntax:** obj = Attribute Chart(...\...) **Description:** Performs a separate analysis for each level of the specified column. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); ``` ### [Freq](#freq) **Syntax:** obj = Attribute Chart(...\...) **Description:** Specifies a column whose values assign a frequency to each row for the analysis. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); dt << New Column( "_freqcol", Numeric, Continuous, Set Each Value( Random Integer( 1, 5 ) ) ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ), Freq( :_freqcol ) ); ``` ### [Grouping](#grouping) **Syntax:** obj = Attribute Chart(...Grouping( column(s) )...) **Description:** Specifies the classification columns that group the ratings, typically parts. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); ``` ### [Response](#response) **Syntax:** obj = Attribute Chart(...Response( column(s) )...) **Description:** Specifies the columns of ratings given by each rater. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Effectiveness Report( 1 ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Response( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Effectiveness Report( 1 ); ``` ### [Standard](#standard) **Syntax:** obj = Attribute Chart(...\...) **Description:** Specifies a reference column that contains the known values for each grouping variable (part) level. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); ``` ### [X](#x) **Syntax:** obj = Attribute Chart(...X( column(s) )...) **Description:** Specifies the classification columns that group the ratings, typically parts. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); ``` ### [Y](#y) **Syntax:** obj = Attribute Chart(...Y( column(s) )...) **Description:** Specifies the columns of ratings given by each rater. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Effectiveness Report( 1 ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Response( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Effectiveness Report( 1 ); ``` ## [Item Messages](#item-messages) ### [Agreement by Rater Confid Intervals](#agreement-by-rater-confid-intervals) **Syntax:** obj \<< Agreement by Rater Confid Intervals( state=0|1 ) **Description:** Shows or hides confidence intervals about the cell agreement percents on the efficiency graph. On by default. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); Wait( 2 ); obj << Agreement by Rater Confid Intervals( 0 ); ``` ### [Attribute Gauge Charts](#attribute-gauge-charts) **Syntax:** obj \<< Attribute Gauge Charts( state=0|1 ) **Description:** Show or hides the attribute gauge chart. On by default. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); Wait( 2 ); obj << Attribute Gauge Charts( 0 ); ``` ### [Connect Agreement Points](#connect-agreement-points) **Syntax:** obj \<< Connect Agreement Points( state=0|1 ) **Description:** Shows or hides a line that connects the cell means within a group of cells on both the attribute gauge chart and the efficiency graph. On by default. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); Wait( 2 ); obj << Connect Agreement Points( 0 ); ``` ### [Connect Effectiveness Points](#connect-effectiveness-points) **Syntax:** obj \<< Connect Effectiveness Points( state=0|1 ) **Description:** Shows or hides a red line that connects the values of the percent agreement between the rater and the standard on both the attribute gauge chart and the efficiency graph. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Connect Effectiveness Points( 1 ); ``` ### [Effectiveness Report](#effectiveness-report) **Syntax:** obj \<< Effectiveness Report( state=0|1 ) **Description:** Shows or hides a report that contains the agreement counts, effectiveness, misclassifications, and conformance. On by default. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); Wait( 2 ); obj << Effectiveness Report( 0 ); ``` ### [Effectiveness by Rater Confid Intervals](#effectiveness-by-rater-confid-intervals) **Syntax:** obj \<< Effectiveness by Rater Confid Intervals( state=0|1 ) **Description:** Shows or hides the confidence intervals about the cell effectiveness percents on the efficiency graph. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Effectiveness by Rater Confid Intervals( 1 ); ``` ### [Show Agreement Grand Mean](#show-agreement-grand-mean) **Syntax:** obj \<< Show Agreement Grand Mean( state=0|1 ) **Description:** Shows or hides a line at the value of the overall percent agreement on the attribute gauge chart. On by default. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); Wait( 2 ); obj << Show Agreement Grand Mean( 0 ); ``` ### [Show Agreement Group Means](#show-agreement-group-means) **Syntax:** obj \<< Show Agreement Group Means( state=0|1 ) **Description:** Shows or hides a line at the value of the percent agreement within groups on the attribute gauge chart. This option requires more than one grouping variable. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); dt << New Column( "Group", formula( Sequence( 1, 3, 1, 50 ) ) ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Group, :Part ), Standard( :Standard ) ); obj << Show Agreement Group Means( 1 ); ``` ### [Show Agreement Points](#show-agreement-points) **Syntax:** obj \<< Show Agreement Points( state=0|1 ) **Description:** Shows or hides the agreement points on both the attribute gauge chart and the efficiency graph. On by default. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); Wait( 2 ); obj << Show Agreement Points( 0 ); ``` ### [Show Effectiveness Points](#show-effectiveness-points) **Syntax:** obj \<< Show Effectiveness Points( state=0|1 ) **Description:** Shows or hides the effectiveness points on both the attribute gauge chart and the efficiency graph. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Show Effectiveness Points( 1 ); ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Automatic Recalc](#automatic-recalc) **Syntax:** obj \<< Automatic Recalc( state=0|1 ) **Description:** Redoes the analysis automatically for exclude and data changes. If the Automatic Recalc option is turned on, you should consider using Wait(0) commands to ensure that the exclude and data changes take effect before the recalculation. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Automatic Recalc( 1 ); dt << Select Rows( 5 ) << Exclude( 1 ); ``` ### [Broadcast](#broadcast) **Syntax:** obj \<< Broadcast(message) **Description:** Broadcasts a message to a platform. If return results from individual objects are tables, they are concatenated if possible, and the final format is identical to either the result from the Save Combined Table option in a Table Box or the result from the Concatenate option using a Source column. Other than those, results are stored in a list and returned. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" ); objs = Control Chart Builder( Variables( Subgroup( :DAY ), Y( :DIAMETER ) ), By( :OPERATOR ) ); objs[1] << Broadcast( Save Summaries ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy ByGroup Script](#copy-bygroup-script) **Syntax:** obj \<< Copy ByGroup Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Copy ByGroup Script; ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get ByGroup Script](#get-bygroup-script) **Syntax:** obj \<< Get ByGroup Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); t = obj[1] << Get ByGroup Script; Show( t ); ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Group Platform](#get-group-platform) **Syntax:** obj \<< Get Group Platform **Description:** Return the Group Platform object if this platform is part of a Group. Otherwise, returns Empty(). ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Y( :weight ), X( :height ), By( :sex ) ); group = biv[1] << Get Group Platform; Wait( 1 ); group << Layout( "Arrange in Tabs" ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \<, < \<, < \<, < \< ); **Description:** Creates a JSL script to produce this analysis, and save it as a table property in the data table. You can specify a name for the script. The Append Suffix option appends a numeric suffix to the script name, which differentiates the script from an existing script with the same name. The Prompt option prompts the user to specify a script name. The Replace option replaces an existing script with the same name. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Data Table; ``` ### [Save ByGroup Script to Journal](#save-bygroup-script-to-journal) **Syntax:** obj \<< Save ByGroup Script to Journal **Description:** Create a JSL script to produce this analysis, and add a Button to the journal containing this script. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Journal; ``` ### [Save ByGroup Script to Script Window](#save-bygroup-script-to-script-window) **Syntax:** obj \<< Save ByGroup Script to Script Window **Description:** Create a JSL script to produce this analysis, and append it to the current Script text window. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Script Window; ``` ### [Save Script for All Objects](#save-script-for-all-objects) **Syntax:** obj \<< Save Script for All Objects **Description:** Creates a script for all report objects in the window and appends it to the current Script window. This option is useful when you have multiple reports in the window. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Save Script for All Objects; ``` ### [Save Script for All Objects To Data Table](#save-script-for-all-objects-to-data-table) **Syntax:** obj \<< Save Script for All Objects To Data Table( ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); obj << Save Script to Data Table( "My Analysis", <(... Transform Column(, Formula(), \[Random Seed()\], [Numeric|Character|Expression], [Continuous|Nominal|Ordinal|Unstructured Text], [column properties]) ...) **Description:** Create a transform column in the local context of an object, usually a platform. The transform column is active only for the lifetime of the platform. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Distribution( Transform Column( "age^2", Format( "Fixed Dec", 5, 0 ), Formula( :age * :age ) ), Continuous Distribution( Column( :"age^2"n ) ) ); ``` ### [View Web XML](#view-web-xml) **Syntax:** obj \<< View Web XML **Description:** Returns the XML code that is used to create the interactive HTML report. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); xml = obj << View Web XML; ``` ### [Window View](#window-view) **Syntax:** obj = Attribute Chart(...Window View( "Visible"|"Invisible"|"Private" )...) **Description:** Set the type of the window to be created for the report. By default a Visible report window will be created. An Invisible window will not appear on screen, but is discoverable by functions such as Window(). A Private window responds to most window messages but is not discoverable and must be addressed through the report object ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Window View( "Private" ), Y( :weight ), X( :height ), Fit Line ); eqn = Report( biv )["Linear Fit", Text Edit Box( 1 )] << Get Text; biv << Close Window; New Window( "Bivariate Equation", Outline Box( "Big Class Linear Fit", Text Box( eqn, < ) **Description:** Generates a candidate set. You can provide candidate set size and specify whether to allow points that violate the linear constraints in the data table. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Generate Candidate Set( Candidate Set Size( 10 ), Include Runs that Do Not Conform to Constraints( 0 ) ) ); ``` ### [Include Runs that Do Not Conform to Constraints](#include-runs-that-do-not-conform-to-constraints) **Syntax:** obj \<< Include Runs that Do Not Conform to Constraints( state=0|1 ) **Description:** Specifies whether to include points that violate the linear constraints in the data table when generating or loading a candidate set. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Include Runs that Do Not Conform to Constraints( 0 ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); dtCand = New Table( "Tiretread Candidate Set", Add Rows( 15 ), New Column( "SILICA", Continuous, Set Values( [1.2, 1.60825, 0.79175, 0.995875, 1.812375, 1.404125, 0.587625, 0.6896875, 1.5061875, 1.9144375, 1.0979375, 0.8938125, 1.7103125, 1.3020625, 0.4855625] ) ), New Column( "SILANE", Continuous, Set Values( [50, 41.835, 58.165, 45.9175, 62.2475, 37.7525, 54.0825, 43.87625, 60.20625, 35.71125, 52.04125, 39.79375, 56.12375, 47.95875, 64.28875] ) ), New Column( "SULFUR", Continuous, Set Values( [2.3, 1.89175, 2.70825, 2.504125, 1.687625, 2.912375, 2.095875, 3.0144375, 2.1979375, 2.6061875, 1.7896875, 1.9938125, 2.8103125, 1.5855625, 2.4020625] ) ) ); dt << New Script( "Constraint", {:SILICA + :SULFUR <= 3} ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Include Runs that Do Not Conform to Constraints( 0 ), Load Candidate Set from Data Table( dtCand ) ); ``` ### [Minimum RSquare](#minimum-rsquare) **Syntax:** obj \<< Minimum RSquare( number ) **Description:** Specifies the minimum required R-square metric for the batch autoselection algorithm. In the Bayesian Optimization platform launch window, this option is referred to as Model Based Augmentation RSquare Threshold. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Minimum RSquare( 0.25 ) ); ``` ### [Nominal Correlation Type](#nominal-correlation-type) **Syntax:** obj \<< Nominal Correlation Type( "Equal Correlations"|"Unequal Correlations" ) **Description:** Specifies the desired kernel for nominal input variables. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Nominal Correlation Type( "Equal Correlations" ) ); ``` ### [Ordinal Correlation Type](#ordinal-correlation-type) **Syntax:** obj \<< Ordinal Correlation Type( "Equal Correlations"|"Unequal Correlations"|"Latent Variable" ) **Description:** Specifies the desired kernel for ordinal input variables. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Ordinal Correlation Type( "Equal Correlations" ) ); ``` ### [Save Prediction Formula](#save-prediction-formula) **Syntax:** obj \<< Save Prediction Formula **Description:** Saves the prediction formula to a new column in the data table. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Save Prediction Formula; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Save Prediction Formula( Elong ); ``` ### [Set Tab](#set-tab) **Syntax:** obj \<< Set Tab( number ) **Description:** Specifies the current tab. The argument interprets 0 as the Model Summary tab, 1 as Batch Selection, and so on, in the order in which the tabs appear in the report window. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << set tab( 1 ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << set tab( "ABRASION" ); ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Automatic Recalc](#automatic-recalc) **Syntax:** obj \<< Automatic Recalc( state=0|1 ) **Description:** Redoes the analysis automatically for exclude and data changes. If the Automatic Recalc option is turned on, you should consider using Wait(0) commands to ensure that the exclude and data changes take effect before the recalculation. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Automatic Recalc( 1 ); dt << Select Rows( 5 ) << Exclude( 1 ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \< ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Save Script to Data Table( "My Analysis", < Candidate Set View](#bayesian-optimization-batch-customizer-candidate-set-view) ### [Item Messages](#item-messages_1) #### [Export Candidate Set to Data Table](#export-candidate-set-to-data-table) **Syntax:** obj \<< Export Candidate Set to Data Table **Description:** Exports the currently loaded candidate set to a new data table. You can specify desired column groups as arguments. This option exports factor settings by default if no column groups provided. If no arguments are specified, a window appears where you can specify options. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Export Candidate Set to Data Table( Go ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Export Candidate Set to Data Table(); ``` **Example 3** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Export Candidate Set to Data Table( Order Added, Factor Settings, Bayesian Desirability, Bayesian Desirability Std Dev, Multimodel Prediction Std Dev, MaxPro Space Filling Criterion, Bayesian Desirability Expected Improvement, Bayesian Desirability Upper Confidence Bound, Training Response Predictions, Augmented Response Prediction Std Dev, Augmented Response Prediction Confidence Intervals ); ``` #### [Select Runs](#select-runs) **Syntax:** obj \<< Select Runs( Row Index( [ numbers ] ), \, \, \ ) **Description:** Selects rows from the candidate set table to add to the current batch. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Select Runs( Row Index( [3 5] ), Order Added( [1 2] ), Reason Added( {"Custom Reason", "Custom Reason"} ), Replace( 1 ) ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), autoselect batch( 0 ) ); obj << Select Runs( Row Index( [3 5] ), Order Added( [1 2] ), Reason Added( {"Custom Reason", "Custom Reason"} ), Replace( 0 ) ); ``` #### [Show Table Columns](#show-table-columns) **Syntax:** obj \<< Show Table Columns( \<"Column Group Name">,... ) **Description:** Specifies which groups of columns are visible in the candidate set table. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Show Table Columns( Order Added, Factor Settings, Bayesian Desirability ) ); ``` ## [Bayesian Optimization Batch Customizer](#bayesian-optimization-batch-customizer) ### [Item Messages](#item-messages_2) #### [Add Current Profiler Settings to Batch](#add-current-profiler-settings-to-batch) **Syntax:** obj \<< Add Current Profiler Settings to Batch **Description:** Adds the current profiler settings to the candidate set and selects it for inclusion as a run in the next augmentation batch. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Add Current Profiler Settings to Batch; ``` #### [Augmented Acquisition Functions Profiler](#augmented-acquisition-functions-profiler) **Syntax:** obj \<< Augmented Acquisition Functions Profiler( state=0|1 ) **Description:** Shows or hides a profiler that enables you to explore how each acquisition function changes with respect to changes in each factor value. Functions are conditional on the assumption that the points in the current batch will be sampled. This profiler reflects changes to factor levels and desirability functions made in the Augmented Prediction Profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Augmented Acquisition Functions Profiler( 0 ); ``` #### [Augmented Prediction Profiler](#augmented-prediction-profiler) **Syntax:** obj \<< Augmented Prediction Profiler( state=0|1 ) **Description:** Shows or hides a profiler that enables you to explore how each column changes with respect to changes in each factor value across models. Predictions are conditional on the assumption that the points in the current batch will be sampled. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Augmented Prediction Profiler( 0 ); ``` #### [Deselect All](#deselect-all) **Syntax:** obj \<< Deselect All **Description:** Deselect all points in current batch. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Deselect All; ``` #### [Load Candidate Set from Data Table](#load-candidate-set-from-data-table) **Syntax:** obj \<< Load Candidate Set from Data Table **Example 1** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Load Candidate Set from Data Table() ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Borehole Latin Hypercube.jmp" ); :log y << Set Property( "Response Limits", {Goal( maximize ), Importance( 1 )} ); obj = dt << Bayesian Optimization( Y( :log y ), X( :log10 Rw, :log10 R, :Tu, :Tl, :Hu, :Hl, :L, :Kw ) ); dt_candidate = Open( "$SAMPLE_DATA/Design Experiment/Borehole Uniform.jmp" ); obj << Load Candidate Set from Data Table( dt_candidate ); ``` #### [Make Table](#make-table) **Syntax:** obj \<< Make Table **Description:** Export currently selected batch points to data table based on current settings. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Make Table; ``` #### [Make Table Options](#make-table-options) **Syntax:** obj \<< Make Table Options( \, \, < "Include Option Name"( state = 0|1 ) > , ... ) **Description:** Enables you to select option settings that are used when exporting the selected batch to a data table. Note the "Include Option Name" syntax input refers to any of the options under the Include Options menu. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Make Table Options( Location( 1 ), Randomize Runs( 0 ), Save desirability function values to columns( 1 ), Save startup script for next batch selection to data table( 1 ), Include observed desirabilities( 1 ), Include original candidate set row indices( 1 ), Include reason added column( 1 ), Include predicted response values( 1 ), Include prediction standard deviations( 1 ), Include Bayesian desirability expected improvement column( 1 ) ) ); ``` #### [Maximize Bayesian Desirability](#maximize-bayesian-desirability) **Syntax:** obj \<< Maximize Bayesian Desirability **Description:** Finds the factor settings that maximize the posterior mean of the desirability distribution. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Maximize Bayesian Desirability; ``` #### [Maximize Bayesian Desirability Std Dev](#maximize-bayesian-desirability-std-dev) **Syntax:** obj \<< Maximize Bayesian Desirability Std Dev **Description:** Finds the factor settings that maximize the posterior deviation of the desirability distribution. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Maximize Bayesian Desirability Std Dev; ``` #### [Maximize Expected Improvement](#maximize-expected-improvement) **Syntax:** obj \<< Maximize Expected Improvement **Description:** Finds the factor settings with the largest expected improvement as measured by Bayesian desirability. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Maximize Expected Improvement; ``` #### [Maximize MaxPro Criterion](#maximize-maxpro-criterion) **Syntax:** obj \<< Maximize MaxPro Criterion **Description:** Finds the most space filling factor settings using the MaxPro criterion. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Maximize MaxPro Criterion; ``` #### [Maximize Multimodel Std Dev](#maximize-multimodel-std-dev) **Syntax:** obj \<< Maximize Multimodel Std Dev **Description:** Finds the factor settings that maximize the multiple response prediction standard deviation. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Maximize Multimodel Std Dev; ``` #### [Maximize Upper Confidence Bound](#maximize-upper-confidence-bound) **Syntax:** obj \<< Maximize Upper Confidence Bound **Description:** Finds the factor settings for the Bayesian desirability prediction with the highest upper confidence bound. This is often called the UCB criterion. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Maximize Upper Confidence Bound; ``` #### [Restore Best Training Point](#restore-best-training-point) **Syntax:** obj \<< Restore Best Training Point **Description:** Returns factor settings to those of the training row with the highest observed desirability. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); obj << Maximize Bayesian Desirability; obj << Add Current Profiler Settings to Batch; obj << Restore Best Training Point; ``` ## [Bayesian Optimization Model Summary](#bayesian-optimization-model-summary) ### [Item Messages](#item-messages_3) #### [All Responses Profiler](#all-responses-profiler) **Syntax:** obj \<< All Responses Profiler( state=0|1 ) **Description:** Explores how each column changes with respect to changes in each factor value across models. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), All Responses Profiler( 1 ) ); ``` ## [Gaussian Process Model](#gaussian-process-model) ### [Item Messages](#item-messages_4) #### [Intercept](#intercept) **Syntax:** obj \<< Intercept( number ) **Description:** Specifies the value to use as an intercept parameter for fitting a Gaussian Process model. If all theta, nugget, residual, and intercept values are provided, the values are treated as fixed. If a partial set of values is provided, the given values are treated as starting values. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Response Model Tab( Y( :ABRASION ), Theta Values( {0.5, 0.5, 0.5} ), Nugget( 0.05 ), Residual( 500 ), Intercept( 100 ) ) ); ``` #### [Nugget](#nugget) **Syntax:** obj \<< Nugget( number ) **Description:** Specifies the value to use as a nugget for fitting a Gaussian Process model. If all theta, nugget, residual, and intercept values are provided, the values are treated as fixed. If a partial set of values is provided, the given values are treated as starting values. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Response Model Tab( Y( :ABRASION ), Theta Values( {0.5, 0.5, 0.5} ), Nugget( 0.05 ), Residual( 500 ), Intercept( 100 ) ) ); ``` #### [Profiler](#profiler) **Syntax:** obj \<< Profiler( state=0|1 ) **Description:** Explores how each column changes with respect to changes in each factor value across models. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Response Model Tab( Y( :MODULUS ), Profiler( 0 ) ) ); ``` #### [Residual](#residual) **Syntax:** obj \<< Residual( number ) **Description:** Specifies the value to use as a residual parameter for fitting a Gaussian Process model. If all theta, nugget, residual, and intercept values are provided, the values are treated as fixed. If a partial set of values is provided, the given values are treated as starting values. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Response Model Tab( Y( :ABRASION ), Theta Values( {0.5, 0.5, 0.5} ), Nugget( 0.05 ), Residual( 500 ), Intercept( 100 ) ) ); ``` #### [Starting Values](#starting-values) **Syntax:** obj \<< Starting Values( number ) **Description:** Specifies the starting values to use for fitting a Gaussian Process model. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Response Model Tab( Y( :ABRASION ), Starting Values( Theta Values( {0.5, 0.5, 0.5} ), Nugget( 0.05 ), Residual( 500 ), Intercept( 100 ) ) ) ); ``` #### [Theta Values](#theta-values) **Syntax:** obj \<< Theta Values( number ) **Description:** Specifies the values to use as theta parameters for fitting a Gaussian Process model. If all theta, nugget, residual, and intercept values are provided, the values are treated as fixed. If a partial set of values is provided, the given values are treated as starting values. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ), Response Model Tab( Y( :ABRASION ), Theta Values( {0.5, 0.5, 0.5} ), Nugget( 0.05 ), Residual( 500 ), Intercept( 100 ) ) ); ``` # [Boosted Tree](#boosted-tree) ## [Associated Constructors](#associated-constructors) ### [Boosted Tree](#boosted-tree_1) **Syntax:** Boosted Tree (Y( column ), X( columns )) **Description:** Constructs a predictive model by building a large, additive decision tree that is a sequence of smaller decision trees. Each of the trees is fit on the residuals of the previous tree. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); ``` ## [Columns](#columns) ### [By](#by) **Syntax:** obj \<< By( column(s) ) **Description:** Performs a separate analysis for each level of the specified column. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), By( :_bycol ), Group Options( Return Group( 1 ) ), Go ); ``` ### [Factor](#factor) **Syntax:** obj \<< Factor( column(s) ) ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); ``` ### [Freq](#freq) **Syntax:** obj \<< Freq( column ) **Description:** Specifies a column whose values assign a frequency to each row for the analysis. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "_freqcol", Numeric, Continuous, Set Each Value( Random Integer( 1, 5 ) ) ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Freq( :_freqcol ), Go ); ``` ### [Response](#response) **Syntax:** obj \<< Response( column(s) ) ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); ``` ### [Validation](#validation) **Syntax:** obj \<< Validation( column ) ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); ``` ### [Weight](#weight) **Syntax:** obj \<< Weight( column ) **Description:** Specifies a column whose values assign a weight to each row for the analysis. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "_weightcol", Numeric, Continuous, Set Each Value( Random Beta( 1, 1 ) ) ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Weight( :_weightcol ), Go ); ``` ### [X](#x) **Syntax:** obj \<< X( column(s) ) ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); ``` ### [Y](#y) **Syntax:** obj \<< Y( column(s) ) ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); ``` ## [Item Messages](#item-messages) ### [Column Contributions](#column-contributions) **Syntax:** obj \<< Column Contributions( state=0|1 ) **Description:** Shows or hides a report with each input column and its corresponding contribution to the fit. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Column Contributions( 1 ); ``` ### [Column Sampling Rate](#column-sampling-rate) **Syntax:** obj \<< Column Sampling Rate( number ) **Description:** Specifies the proportion of predictor columns to sample for each tree layer. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Column Sampling Rate( 0.95 ), Go ); ``` ### [Decision Threshold](#decision-threshold) **Syntax:** obj \<< Decision Threshold( state = 0|1, Set Probability Threshold( number ) ) **Description:** Shows or hides the distribution of fitted probabilities and actual versus predicted tables for each model. You can change the probability threshold to explore how different thresholds affect the classification results. ``` dt = Open( "$Sample_Data/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Splits per Tree( 4 ), Number of Layers( 171 ), Learning Rate( 0.08 ), Go ); obj << Decision Threshold( 1 ); ``` ### [Early Stopping](#early-stopping) **Syntax:** Early Stopping( state=0|1 ) **Description:** Stops iterating early when additional layers do not improve the validation statistic. On by default. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "Holdback1", formula( Random Integer( 1, 3 ) ) ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), validation( :Holdback1 ), Early Stopping( 1 ), Go ); ``` ### [Get Average Absolute Error Test](#get-average-absolute-error-test) **Syntax:** obj \<< Get Average Absolute Error Test **Description:** Returns the Mean Abs Dev statistic for the test set. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Go ); aabs = obj << Get Average Absolute Error Test; Show( aabs ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Go ); aabs = obj << Get Average Absolute Error Test; Show( aabs ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Split Best( 2 ) ); aabs = obj << Get Average Absolute Error Test; Show( aabs ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), New Column Name( "Valid1" ), Go ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation( :Valid1 ), Split Best( 2 ) ); aabs = obj << Get Average Absolute Error Test; Show( aabs ); ``` ### [Get Average Absolute Error Training](#get-average-absolute-error-training) **Syntax:** obj \<< Get Average Absolute Error Training **Description:** Returns the Mean Abs Dev statistic for the training set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); aabs = obj << Get Average Absolute Error Training; Show( aabs ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); aabs = obj << Get Average Absolute Error Training; Show( aabs ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Split Best( 2 ) ); aabs = obj << Get Average Absolute Error Training; Show( aabs ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Split Best( 2 ) ); aabs = obj << Get Average Absolute Error Training; Show( aabs ); ``` ### [Get Average Absolute Error Validation](#get-average-absolute-error-validation) **Syntax:** obj \<< Get Average Absolute Error Validation **Description:** Returns the Mean Abs Dev statistic for the validation set. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Go ); aabs = obj << Get Average Absolute Error Validation; Show( aabs ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Go ); aabs = obj << Get Average Absolute Error Validation; Show( aabs ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Split Best( 2 ) ); aabs = obj << Get Average Absolute Error Validation; Show( aabs ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation( :Validation ), Split Best( 2 ) ); aabs = obj << Get Average Absolute Error Validation; Show( aabs ); ``` ### [Get Average Log Error Test](#get-average-log-error-test) **Syntax:** obj \<< Get Average Log Error Test **Description:** Returns the average of -log(p), where p equals the probability of response attributed by the model that the response actually occurred, for the test set. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Go ); avg = obj << Get Average Log Error Test; Show( avg ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Go ); avg = obj << Get Average Log Error Test; Show( avg ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Method( "Decision Tree" ), Go ); avg = obj << Get Average Log Error Test; Show( avg ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), New Column Name( "Valid1" ), Go ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation( :Valid1 ), Split Best( 2 ) ); avg = obj << Get Average Log Error Test; Show( avg ); ``` ### [Get Average Log Error Training](#get-average-log-error-training) **Syntax:** obj \<< Get Average Log Error Training **Description:** Returns the average of -log(p), where p equals the probability of response attributed by the model that the response actually occurred, for the training set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); avg = obj << Get Average Log Error Training; Show( avg ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); avg = obj << Get Average Log Error Training; Show( avg ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Split Best( 3 ) ); avg = obj << Get Average Log Error Training; Show( avg ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Split Best( 2 ) ); avg = obj << Get Average Log Error Training; Show( avg ); ``` ### [Get Average Log Error Validation](#get-average-log-error-validation) **Syntax:** obj \<< Get Average Log Error Validation **Description:** Returns the average of -log(p), where p equals the probability of response attributed by the model that the response actually occurred, for the validation set. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Go ); avg = obj << Get Average Log Error Validation; Show( avg ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Go ); avg = obj << Get Average Log Error Validation; Show( avg ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Method( "Decision Tree" ), Go ); avg = obj << Get Average Log Error Validation; Show( avg ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation( :Validation ), Split Best( 2 ) ); avg = obj << Get Average Log Error Validation; Show( avg ); ``` ### [Get Confusion Matrix Test](#get-confusion-matrix-test) **Syntax:** obj \<< Get Confusion Matrix Test **Description:** Returns the confusion matrix for the test set. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :marital status ), X( :sex, :age, :country, :type, :size ), Validation( :Validation ), Go ); cm = obj << Get Confusion Matrix Test; Show( cm ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Go ); cm = obj << Get Confusion Matrix Test; Show( cm ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Split Best( 2 ) ); cm = obj << Get Confusion Matrix Test; Show( cm ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), New Column Name( "Valid1" ), Go ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation( :Valid1 ), Split Best( 2 ) ); cm = obj << Get Confusion Matrix Test; Show( cm ); ``` ### [Get Confusion Matrix Training](#get-confusion-matrix-training) **Syntax:** obj \<< Get Confusion Matrix Training **Description:** Returns the confusion matrix for the training set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :marital status ), X( :sex, :age, :country, :type, :size ), Validation( :Validation ), Go ); cm = obj << Get Confusion Matrix Training; Show( cm ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Go ); cm = obj << Get Confusion Matrix Training; Show( cm ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Split Best( 2 ) ); cm = obj << Get Confusion Matrix Training; Show( cm ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Split Best( 2 ) ); cm = obj << Get Confusion Matrix Training; Show( cm ); ``` ### [Get Confusion Matrix Validation](#get-confusion-matrix-validation) **Syntax:** obj \<< Get Confusion Matrix Validation **Description:** Returns the confusion matrix for the validation set. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :marital status ), X( :sex, :age, :country, :type, :size ), Validation( :Validation ), Go ); cm = obj << Get Confusion Matrix Validation; Show( cm ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Go ); cm = obj << Get Confusion Matrix Validation; Show( cm ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Split Best( 2 ) ); cm = obj << Get Confusion Matrix Validation; Show( cm ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation( :Validation ), Split Best( 2 ) ); cm = obj << Get Confusion Matrix Validation; Show( cm ); ``` ### [Get Confusion Rates Test](#get-confusion-rates-test) **Syntax:** obj \<< Get Confusion Rates Test **Description:** Returns the confusion rates for the test set. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :marital status ), X( :sex, :age, :country, :type, :size ), Validation( :Validation ), Go ); cr = obj << Get Confusion Rates Test; Show( cr ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Go ); cr = obj << Get Confusion Rates Test; Show( cr ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Split Best( 2 ) ); cr = obj << Get Confusion Rates Test; Show( cr ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), New Column Name( "Valid1" ), Go ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation( :Valid1 ), Split Best( 2 ) ); cr = obj << Get Confusion Rates Test; Show( cr ); ``` ### [Get Confusion Rates Training](#get-confusion-rates-training) **Syntax:** obj \<< Get Confusion Rates Training **Description:** Returns the confusion rates for the training set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :marital status ), X( :sex, :age, :country, :type, :size ), Validation( :Validation ), Go ); cr = obj << Get Confusion Rates Training; Show( cr ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Go ); cr = obj << Get Confusion Rates Training; Show( cr ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Split Best( 2 ) ); cr = obj << Get Confusion Rates Training; Show( cr ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Split Best( 2 ) ); cr = obj << Get Confusion Rates Training; Show( cr ); ``` ### [Get Confusion Rates Validation](#get-confusion-rates-validation) **Syntax:** obj \<< Get Confusion Rates Validation **Description:** Returns the confusion rates for the validation set. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :marital status ), X( :sex, :age, :country, :type, :size ), Validation( :Validation ), Go ); cr = obj << Get Confusion Rates Validation; Show( cr ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Go ); cr = obj << Get Confusion Rates Validation; Show( cr ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Split Best( 2 ) ); cr = obj << Get Confusion Rates Validation; Show( cr ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation( :Validation ), Split Best( 2 ) ); cr = obj << Get Confusion Rates Validation; Show( cr ); ``` ### [Get Gen RSquare Test](#get-gen-rsquare-test) **Syntax:** obj \<< Get Gen RSquare Test **Description:** Returns the generalized RSquare for the test set. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :sex ), X( :marital status, :age, :country, :type, :size ), Validation( :Validation ), Go ); r = obj << Get Gen RSquare Test; Show( r ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Go ); r = obj << Get Gen RSquare Test; Show( r ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Split Best( 2 ) ); r = obj << Get Gen RSquare Test; Show( r ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), New Column Name( "Valid1" ), Go ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation( :Valid1 ), Split Best( 2 ) ); r = obj << Get Gen RSquare Test; Show( r ); ``` ### [Get Gen RSquare Training](#get-gen-rsquare-training) **Syntax:** obj \<< Get Gen RSquare Training **Description:** Returns the generalized RSquare for the training set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :sex ), X( :marital status, :age, :country, :type, :size ), Validation( :Validation ), Go ); r = obj << Get Gen RSquare Training; Show( r ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Go ); r = obj << Get Gen RSquare Training; Show( r ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Split Best( 2 ) ); r = obj << Get Gen RSquare Training; Show( r ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Split Best( 2 ) ); r = obj << Get Gen RSquare Training; Show( r ); ``` ### [Get Gen RSquare Validation](#get-gen-rsquare-validation) **Syntax:** obj \<< Get Gen RSquare Validation **Description:** Returns the generalized RSquare for the validation set. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :sex ), X( :marital status, :age, :country, :type, :size ), Validation( :Validation ), Go ); r = obj << Get Gen RSquare Validation; Show( r ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Go ); r = obj << Get Gen RSquare Validation; Show( r ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation( :Validation ), Split Best( 2 ) ); r = obj << Get Gen RSquare Validation; Show( r ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation( :Validation ), Split Best( 2 ) ); r = obj << Get Gen RSquare Validation; Show( r ); ``` ### [Get MM SAS DATA Step](#get-mm-sas-data-step) **Syntax:** obj \<< Get MM SAS DATA Step **Description:** Creates SAS code that you can register in the SAS Model Manager and returns it to the Log window. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); code = obj << Get MM SAS Data Step; ``` ### [Get MM Tolerant SAS DATA Step](#get-mm-tolerant-sas-data-step) **Syntax:** obj \<< Get MM Tolerant SAS DATA Step **Description:** Creates SAS code for data that includes missing values that you can register in the SAS Model Manager and returns it to the Log window. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); code = obj << Get MM Tolerant SAS Data Step; ``` ### [Get Measures](#get-measures) **Syntax:** obj \<< Get Measures **Description:** Returns summary measures of fit from the model. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Get Measures; ``` ### [Get Microseconds](#get-microseconds) **Syntax:** obj \<< Get Microseconds **Description:** Returns the number of microseconds used to complete the analysis. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); time = obj << Get Microseconds; Show( time ); ``` ### [Get Misclassification Rate Test](#get-misclassification-rate-test) **Syntax:** obj \<< Get Misclassification Rate Test **Description:** Returns the misclassification rate for the test set. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Go ); rate = obj << Get Misclassification Rate Test; Show( rate ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Go ); rate = obj << Get Misclassification Rate Test; Show( rate ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Split Best( 2 ) ); rate = obj << Get Misclassification Rate Test; Show( rate ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), New Column Name( "Valid1" ), Go ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation( :Valid1 ), Split Best( 2 ) ); rate = obj << Get Misclassification Rate Test; Show( rate ); ``` ### [Get Misclassification Rate Training](#get-misclassification-rate-training) **Syntax:** obj \<< Get Misclassification Rate Training **Description:** Returns the misclassification rate for the training set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); rate = obj << Get Misclassification Rate Training; Show( rate ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); rate = obj << Get Misclassification Rate Training; Show( rate ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Method( "Decision Tree" ) ); obj << Split Best( 2 ); rate = obj << Get Misclassification Rate Training; Show( rate ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Split Best( 2 ) ); rate = obj << Get Misclassification Rate Training; Show( rate ); ``` ### [Get Misclassification Rate Validation](#get-misclassification-rate-validation) **Syntax:** obj \<< Get Misclassification Rate Validation **Description:** Returns the misclassification rate for the validation set. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "Holdback1", formula( Random Integer( 1, 3 ) ) ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), validation( :Holdback1 ), Go ); rate = obj << Get Misclassification Rate Validation; Show( rate ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "Holdback1", formula( Random Integer( 1, 3 ) ) ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), validation( :Holdback1 ), Go ); rate = obj << Get Misclassification Rate Validation; Show( rate ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "Holdback1", formula( Random Integer( 1, 3 ) ) ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), validation( :Holdback1 ), Method( "Decision Tree" ), Go ); rate = obj << Get Misclassification Rate Validation; Show( rate ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation( :Validation ), Split Best( 2 ) ); rate = obj << Get Misclassification Rate Validation; Show( rate ); ``` ### [Get Precision Recall Area Test](#get-precision-recall-area-test) **Syntax:** obj \<< Get Precision Recall Area Test **Description:** Returns the area under the precision-recall curve for the test set. The precision-recall curve must be displayed before the area is computed. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Go ); obj << Precision Recall Curve; area = obj << Get Precision Recall Area Test; Show( area ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Go ); obj << Precision Recall Curve; area = obj << Get Precision Recall Area Test; Show( area ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Method( "Decision Tree" ), Go ); obj << Precision Recall Curve; area = obj << Get Precision Recall Area Test; Show( area ); ``` ### [Get Precision Recall Area Training](#get-precision-recall-area-training) **Syntax:** obj \<< Get Precision Recall Area Training **Description:** Returns the area under the precision-recall curve for the training set. The precision-recall curve must be displayed before the area is computed. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); obj << Show Tree( 0 ); obj << Precision Recall Curve; area = obj << Get Precision Recall Area Training; Show( area ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); obj << Show Tree( 0 ); obj << Precision Recall Curve; area = obj << Get Precision Recall Area Training; Show( area ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Split Best( 2 ) ); obj << Show Tree( 0 ); obj << Precision Recall Curve; area = obj << Get Precision Recall Area Training; Show( area ); ``` ### [Get Precision Recall Area Validation](#get-precision-recall-area-validation) **Syntax:** obj \<< Get Precision Recall Area Validation **Description:** Returns the area under the precision-recall curve for the validation set. The precision-recall curve must be displayed before the area is computed. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Go ); obj << Precision Recall Curve; area = obj << Get Precision Recall Area Validation; Show( area ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Go ); obj << Precision Recall Curve; area = obj << Get Precision Recall Area Validation; Show( area ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Method( "Decision Tree" ), Go ); obj << Precision Recall Curve; area = obj << Get Precision Recall Area Validation; Show( area ); ``` ### [Get Prediction Formula](#get-prediction-formula) **Syntax:** obj \<< Get Prediction Formula **Description:** Constructs a script to create a prediction formula column and returns it. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Get Prediction Formula; ``` ### [Get RMS Error Test](#get-rms-error-test) **Syntax:** obj \<< Get RMS Error Test **Description:** Returns the square root of the mean square of the test errors. Available only when using a validation set. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); rms = obj << Get RMS Error Test; Show( rms ); ``` ### [Get RMS Error Training](#get-rms-error-training) **Syntax:** obj \<< Get RMS Error Training **Description:** Returns the square root of the mean square of the training errors. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); rms = obj << Get RMS Error Training; Show( rms ); ``` ### [Get RMS Error Validation](#get-rms-error-validation) **Syntax:** obj \<< Get RMS Error Validation **Description:** Returns the square root of the mean square of the validation errors. Available only when using a validation set. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); rms = obj << Get RMS Error Validation; Show( rms ); ``` ### [Get ROC Area Test](#get-roc-area-test) **Syntax:** obj \<< Get ROC Area Test **Description:** Returns the area under the Receiver Operator Characteristic (ROC) curve for the test data. The ROC curve needs to be displayed before the area is computed. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Go ); obj << ROC Curve; area = obj << Get ROC Area Test; Show( area ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Go ); obj << ROC Curve; area = obj << Get ROC Area Test; Show( area ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), Go ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation 2 ), Method( "Decision Tree" ), Go ); obj << ROC Curve; area = obj << Get ROC Area Test; Show( area ); ``` ### [Get ROC Area Training](#get-roc-area-training) **Syntax:** obj \<< Get ROC Area Training **Description:** Returns the area under the Receiver Operator Characteristic (ROC) curve for the training data set. The ROC curve needs to be displayed before the area is computed. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); obj << Show Tree( 0 ); obj << ROC Curve; area = obj << Get ROC Area Training; Show( area ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); obj << Show Tree( 0 ); obj << ROC Curve; area = obj << Get ROC Area Training; Show( area ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Split Best( 2 ) ); obj << Show Tree( 0 ); obj << ROC Curve; area = obj << Get ROC Area Training; Show( area ); ``` ### [Get ROC Area Validation](#get-roc-area-validation) **Syntax:** obj \<< Get ROC Area Validation **Description:** Returns the area under the Receiver Operator Characteristic (ROC) curve for the validation data set. The ROC curve needs to be displayed before the area is computed. Available only when using a validation set. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Go ); obj << ROC Curve; area = obj << Get ROC Area Validation; Show( area ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Go ); obj << ROC Curve; area = obj << Get ROC Area Validation; Show( area ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Method( "Decision Tree" ), Go ); obj << ROC Curve; area = obj << Get ROC Area Validation; Show( area ); ``` ### [Get RSquare Test](#get-rsquare-test) **Syntax:** obj \<< Get RSquare Test **Description:** Returns the RSquare for the test set. Available only when using a validation set. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); r = obj << Get RSquare Test; Show( r ); ``` ### [Get RSquare Training](#get-rsquare-training) **Syntax:** obj \<< Get RSquare Training **Description:** Returns the RSquare for the training set. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); r = obj << Get RSquare Training; Show( r ); ``` ### [Get RSquare Validation](#get-rsquare-validation) **Syntax:** obj \<< Get RSquare Validation **Description:** Returns the RSquare for the validation set. Available only when using a validation set. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); r = obj << Get RSquare Validation; Show( r ); ``` ### [Get SAS DATA Step](#get-sas-data-step) **Syntax:** obj \<< Get SAS DATA Step **Description:** Creates a SAS DATA step to score the data and returns it to the Log window. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); code = obj << Get SAS Data Step; ``` ### [Get Seconds](#get-seconds) **Syntax:** obj \<< Get Seconds **Description:** Returns the number of seconds used to complete the analysis. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); time = obj << Get Seconds; Show( time ); ``` ### [Get Tolerant Prediction Formula](#get-tolerant-prediction-formula) **Syntax:** obj \<< Get Tolerant Prediction Formula **Description:** Constructs a script to create a tolerant prediction formula column and returns it. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Get Tolerant Prediction Formula; ``` ### [Get Tolerant SAS DATA Step](#get-tolerant-sas-data-step) **Syntax:** obj \<< Get Tolerant SAS DATA Step **Description:** Creates a SAS DATA step to score data that includes missing values and returns it to the Log window. Missing values are randomly assigned to a tree branch. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); code = obj << Get Tolerant SAS Data Step; ``` ### [Go](#go) **Syntax:** obj \<< Go **Description:** Begins iterating after all parameters have been set. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); ``` ### [Informative Missing](#informative-missing) **Syntax:** obj = Boosted Tree(...Informative Missing( state=0|1 )...) **Description:** For categorical variables, treats missing as a category. For continuous variables, treats missing as either low or high, whichever fits better. On by default. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt:age[3] = .; obj = dt << Boosted Tree( Y( :height ), X( :age ), Informative Missing( 0 ), Go ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt:age[3] = .; obj = dt << Bootstrap Forest( Y( :height ), X( :age ), Informative Missing( 0 ), Go ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt:age[3] = .; obj = dt << Partition( Y( :height ), X( :age ), Informative Missing( 0 ) ); obj << Split Best( 1 ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); dt:Age[3] = .; obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Informative Missing( 0 ), Split Best( 3 ) ); ``` ### [Learning Rate](#learning-rate) **Syntax:** Learning Rate( fraction ) **Description:** Sets the learning rate used in the estimate. Default is 0.1. ".1" by default. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Learning Rate( 0.2 ), Go ); ``` ### [Lift Curve](#lift-curve) **Syntax:** obj \<< Lift Curve( state=0|1 ) **Description:** Shows or hides the Lift Curve plot. A lift curve plots the lift versus the portion of the observations and provides another view of the predictive ability of a model. If you used validation, a plot is shown for each of the training, validation, and test sets. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Lift Curve( 1 ); ``` ### [Make SAS DATA Step](#make-sas-data-step) **Syntax:** obj \<< Make SAS DATA Step **Description:** Creates a SAS DATA step to score the data and returns it to a script window. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Make SAS Data Step; ``` ### [Make Tolerant SAS DATA Step](#make-tolerant-sas-data-step) **Syntax:** obj \<< Make Tolerant SAS DATA Step **Description:** Creates a SAS DATA step to score data that includes missing values and returns it to a script window. Missing values are randomly assigned to a tree branch. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Make Tolerant SAS Data Step; ``` ### [Maximum Depth](#maximum-depth) **Syntax:** obj \<< Maximum Depth( number ) **Description:** Restricts tree size by depth instead of number of nodes. ### [Method](#method) **Syntax:** Method( "Boosted Tree" ) **Description:** Determines the method used for partitioning the data. Decision Tree is the default. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); ``` ### [Minimum Size Split](#minimum-size-split) **Syntax:** Minimum Size Split( number ) **Description:** Sets the minimum number of observations for considering splits used in the estimate. Default is 5. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Minimum Size Split( 10 ), Go ); ``` ### [Multithreading](#multithreading) **Syntax:** Multithreading( state=0|1 ) **Description:** Divides up the calculations among the available threads on the machine. On by default. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Multithreading( 1 ), Go ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Multithreading( 1 ), Go ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Multithreading( 1 ), Split Best( 2 ) ); ``` ### [Number of Layers](#number-of-layers) **Syntax:** Number of Layers( number ) **Description:** Sets the number of layers used in the estimate. Default is 50. "100" by default. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Number of Layers( 20 ), Go ); ``` ### [Ordinal Restricts Order](#ordinal-restricts-order) **Syntax:** obj = Boosted Tree(...Ordinal Restricts Order( state=0|1 )...) **Description:** For ordinal columns, considers only splits that preserve order. On by default. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Boosted Tree( Y( :height ), X( :age ), Ordinal Restricts Order( 1 ), Go ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bootstrap Forest( Y( :height ), X( :age ), Ordinal Restricts Order( 1 ), Go ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Partition( Y( :height ), X( :age ), Ordinal Restricts Order( 1 ) ); obj << Split Best( 3 ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Ordinal Restricts Order( 1 ), Split Best( 2 ) ); ``` ### [Overfit Penalty](#overfit-penalty) **Syntax:** Overfit Penalty( fraction ) **Description:** Sets the overfit penalty, which introduces bias to move the probabilities away from zero for models with a categorical response. Default is 0.0001. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Overfit Penalty( 0.0005 ), Go ); ``` ### [Plot Actual by Predicted](#plot-actual-by-predicted) **Syntax:** obj \<< Plot Actual by Predicted( state=0|1 ) **Description:** Shows or hides a plot using the training data with the predicted values on the X axis and actual values on the Y axis. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Plot Actual by Predicted( 1 ); ``` ### [Precision Recall Curve](#precision-recall-curve) **Syntax:** obj \<< Precision Recall Curve( state=0|1 ) **Description:** Shows or hides the Precision-Recall Curve plot that contains a curve for each level of the response variable. A precision-recall curve plots the precision values against the recall values at a variety of thresholds. If you used validation, a plot is shown for each of the training, validation, and test sets. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); obj << Precision Recall Curve( 1 ); ``` ### [Profiler](#profiler) **Syntax:** obj \<< Profiler( state=0|1 ) **Description:** Shows or hides the prediction profiler, which is used to graphically explore the prediction equation by slicing it one factor at a time. The prediction profiler contains features for optimization. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); obj << Profiler( 1 ); ``` ### [Publish Prediction Formula](#publish-prediction-formula) **Syntax:** obj \<< Publish Prediction Formula **Description:** Creates prediction formulas and saves them as formula column scripts in the Formula Depot platform. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Publish Prediction Formula; ``` ### [Publish Tolerant Prediction Formula](#publish-tolerant-prediction-formula) **Syntax:** obj \<< Publish Tolerant Prediction Formula **Description:** Builds a prediction formula that predicts even when there are missing values and publishes it as a formula column script in Formula Depot. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Publish Tolerant Prediction Formula; ``` ### [ROC Curve](#roc-curve) **Syntax:** obj \<< ROC Curve( state=0|1 ) **Description:** Shows or hides the Receiver Operating Characteristic (ROC) curve for each level of the response variable. The ROC curve is a plot of sensitivity versus (1 - specificity). If you used validation, a plot is shown for each of the training, validation, and test sets. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << ROC Curve( 1 ); ``` ### [Row Sampling Rate](#row-sampling-rate) **Syntax:** obj \<< Row Sampling Rate( number ) **Description:** Specifies the proportion of training rows to sample for each tree layer. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation Portion( 0.2 ), Row Sampling Rate( 0.95 ), Go ); ``` ### [Save Cumulative Details](#save-cumulative-details) **Syntax:** obj \<< Save Cumulative Details **Description:** Saves the validation RSquare along with the tree number in a new data table. Available only when using a validation set. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Save Cumulative Details; ``` ### [Save Offset Estimates](#save-offset-estimates) **Syntax:** obj \<< Save Offset Estimates **Description:** Saves the offset estimates to a new column in the data table. Available only for categorical responses. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); obj << Save Offset Estimates; ``` ### [Save Predicteds](#save-predicteds) **Syntax:** obj \<< Save Predicteds **Description:** Saves the predicted values in a new column in the data table. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Save Predicteds; ``` ### [Save Prediction Formula](#save-prediction-formula) **Syntax:** obj \<< Save Prediction Formula **Description:** Saves the prediction formula in a new column in the data table. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Save Prediction Formula; ``` ### [Save Residuals](#save-residuals) **Syntax:** obj \<< Save Residuals **Description:** Saves the residuals in a new column in the data table. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Save Residuals; ``` ### [Save Tolerant Prediction Formula](#save-tolerant-prediction-formula) **Syntax:** obj \<< Save Tolerant Prediction Formula **Description:** Save a formula that predicts even when there are missing values in a new column in the data table. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Save Tolerant Prediction Formula; ``` ### [Save Tree Details](#save-tree-details) **Syntax:** obj \<< Save Tree Details **Description:** Saves the layer, split, label, and estimate for each layer-split combination in a new data table. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Save Tree Details; ``` ### [Set Random Seed](#set-random-seed) **Syntax:** obj \<< Set Random Seed( number ) **Description:** Specifies a random seed to reproduce the results for future launches of the platform. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Set Random Seed( 1234 ), Go ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Set Random Seed( 1234 ), Go ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Partition( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Set Random Seed( 1234 ), Split Best( 2 ) ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Set Random Seed( 1234 ), Split Best( 2 ) ); ``` ### [Show Trees](#show-trees) **Syntax:** obj \<< Show Trees( "None"|"Show names"|"Show names categories"|"Show names categories estimates" ) **Description:** Shows a list of trees at each layer, with names only, names and categories, or names, categories and estimates at each node. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Show Trees( Show names categories ); (obj << Report)["Tree Views"] << Close( 0 ); (obj << Report)["Layer4"] << Close( 0 ); ``` ### [Specify Profit Matrix](#specify-profit-matrix) **Syntax:** obj \<< Specify Profit Matrix **Description:** Enables you to specify profits or costs associated with correct or incorrect classification decisions. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y Binary ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Specify Profit Matrix( [1 -1, -1 1, . .], "0", "1", "Undecided" ), Go ); ``` ### [Splits per Tree](#splits-per-tree) **Syntax:** Splits Per Tree( number ) **Description:** Sets the number of splits per tree used in the estimate. Default is 3. "3" by default. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Splits Per Tree( 2 ), Go ); ``` ### [Tuning Design Table](#tuning-design-table) **Syntax:** Tuning Design Table( "table name" ) **Description:** A table of tuning parameters to run with, supporting: Splits Per Tree, Learning Rate, Row Sampling Rate, Column Sampling Rate, Number of Layers, Minimum Size Split ### [Use Excluded Rows for Validation](#use-excluded-rows-for-validation) **Syntax:** obj = Boosted Tree(...Use Excluded Rows for Validation( state=0|1 )...) **Description:** Uses the excluded rows in the data table to create a validation set. This option appears in the launch window only if you are using standard JMP and there are excluded rows. **JMP Version Added:** 15 **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); For Each( {i}, 10 :: 200 :: 10, Row State( i ) = Excluded State( 1 ) ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Use Excluded Rows for Validation( 1 ), Go ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); For Each( {i}, 10 :: 200 :: 10, Row State( i ) = Excluded State( 1 ) ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Use Excluded Rows for Validation( 1 ), Go ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); For Each( {i}, 10 :: 200 :: 10, Row State( i ) = Excluded State( 1 ) ); obj = dt << Partition( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Use Excluded Rows for Validation( 1 ) ); obj << Split Best( 5 ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); For Each( {i}, 10 :: 200 :: 10, Row State( i ) = Excluded State( 1 ) ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Use Excluded Rows for Validation( 1 ), Split Best( 2 ) ); ``` ### [Validation Portion](#validation-portion) **Syntax:** obj = Boosted Tree(...Validation Portion( fraction=0 )...) **Description:** Forms a validation set by randomly selecting rows with each row having probability p (fraction) of being selected. "0" by default. **Boosted Tree Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Boosted Tree( Y( :marital status ), X( :sex, :country, :age, :type, :size ), Validation Portion( 0.2 ), Go ); ``` **Bootstrap Forest Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Bootstrap Forest( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation Portion( 0.2 ), Go ); ``` **Partition Example** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Partition( Y( :country ), X( :sex, :marital status, :age, :type, :size ), Validation Portion( 0.2 ) ); obj << Split Best( 2 ); ``` **Uplift Example** ``` dt = Open( "$SAMPLE_DATA/Hair Care Product.jmp" ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation Portion( 0.2 ), Go ); ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Automatic Recalc](#automatic-recalc) **Syntax:** obj \<< Automatic Recalc( state=0|1 ) **Description:** Redoes the analysis automatically for exclude and data changes. If the Automatic Recalc option is turned on, you should consider using Wait(0) commands to ensure that the exclude and data changes take effect before the recalculation. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Automatic Recalc( 1 ); dt << Select Rows( 5 ) << Exclude( 1 ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \< ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), By( :_bycol ), Group Options( Return Group( 1 ) ), Go ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), By( :_bycol ), Group Options( Return Group( 1 ) ), Go ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); obj << Save Script to Data Table( "My Analysis", < ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Automatic Recalc](#automatic-recalc) **Syntax:** obj \<< Automatic Recalc( state=0|1 ) **Description:** Redoes the analysis automatically for exclude and data changes. If the Automatic Recalc option is turned on, you should consider using Wait(0) commands to ensure that the exclude and data changes take effect before the recalculation. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); obj << Automatic Recalc( 1 ); dt << Select Rows( 5 ) << Exclude( 1 ); ``` ### [Broadcast](#broadcast) **Syntax:** obj \<< Broadcast(message) **Description:** Broadcasts a message to a platform. If return results from individual objects are tables, they are concatenated if possible, and the final format is identical to either the result from the Save Combined Table option in a Table Box or the result from the Concatenate option using a Source column. Other than those, results are stored in a list and returned. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" ); objs = Control Chart Builder( Variables( Subgroup( :DAY ), Y( :DIAMETER ) ), By( :OPERATOR ) ); objs[1] << Broadcast( Save Summaries ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy ByGroup Script](#copy-bygroup-script) **Syntax:** obj \<< Copy ByGroup Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), By( :_bycol ), Group Options( Return Group( 1 ) ), Go ); obj[1] << Copy ByGroup Script; ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get ByGroup Script](#get-bygroup-script) **Syntax:** obj \<< Get ByGroup Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), By( :_bycol ), Group Options( Return Group( 1 ) ), Go ); t = obj[1] << Get ByGroup Script; Show( t ); ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Group Platform](#get-group-platform) **Syntax:** obj \<< Get Group Platform **Description:** Return the Group Platform object if this platform is part of a Group. Otherwise, returns Empty(). ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Y( :weight ), X( :height ), By( :sex ) ); group = biv[1] << Get Group Platform; Wait( 1 ); group << Layout( "Arrange in Tabs" ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \<, < \<, < \<, < \< ); **Description:** Creates a JSL script to produce this analysis, and save it as a table property in the data table. You can specify a name for the script. The Append Suffix option appends a numeric suffix to the script name, which differentiates the script from an existing script with the same name. The Prompt option prompts the user to specify a script name. The Replace option replaces an existing script with the same name. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), By( :_bycol ), Group Options( Return Group( 1 ) ), Go ); obj[1] << Save ByGroup Script to Data Table; ``` ### [Save ByGroup Script to Journal](#save-bygroup-script-to-journal) **Syntax:** obj \<< Save ByGroup Script to Journal **Description:** Create a JSL script to produce this analysis, and add a Button to the journal containing this script. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), By( :_bycol ), Group Options( Return Group( 1 ) ), Go ); obj[1] << Save ByGroup Script to Journal; ``` ### [Save ByGroup Script to Script Window](#save-bygroup-script-to-script-window) **Syntax:** obj \<< Save ByGroup Script to Script Window **Description:** Create a JSL script to produce this analysis, and append it to the current Script text window. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), By( :_bycol ), Group Options( Return Group( 1 ) ), Go ); obj[1] << Save ByGroup Script to Script Window; ``` ### [Save Script for All Objects](#save-script-for-all-objects) **Syntax:** obj \<< Save Script for All Objects **Description:** Creates a script for all report objects in the window and appends it to the current Script window. This option is useful when you have multiple reports in the window. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); obj << Save Script for All Objects; ``` ### [Save Script for All Objects To Data Table](#save-script-for-all-objects-to-data-table) **Syntax:** obj \<< Save Script for All Objects To Data Table( ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), By( :_bycol ), Group Options( Return Group( 1 ) ), Go ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), By( :_bycol ), Group Options( Return Group( 1 ) ), Go ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); obj << Save Script to Data Table( "My Analysis", <(... Transform Column(, Formula(), \[Random Seed()\], [Numeric|Character|Expression], [Continuous|Nominal|Ordinal|Unstructured Text], [column properties]) ...) **Description:** Create a transform column in the local context of an object, usually a platform. The transform column is active only for the lifetime of the platform. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Distribution( Transform Column( "age^2", Format( "Fixed Dec", 5, 0 ), Formula( :age * :age ) ), Continuous Distribution( Column( :"age^2"n ) ) ); ``` ### [View Web XML](#view-web-xml) **Syntax:** obj \<< View Web XML **Description:** Returns the XML code that is used to create the interactive HTML report. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); xml = obj << View Web XML; ``` ### [Window View](#window-view) **Syntax:** obj = Bootstrap Forest(...Window View( "Visible"|"Invisible"|"Private" )...) **Description:** Set the type of the window to be created for the report. By default a Visible report window will be created. An Invisible window will not appear on screen, but is discoverable by functions such as Window(). A Private window responds to most window messages but is not discoverable and must be addressed through the report object ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Window View( "Private" ), Y( :weight ), X( :height ), Fit Line ); eqn = Report( biv )["Linear Fit", Text Edit Box( 1 )] << Get Text; biv << Close Window; New Window( "Bivariate Equation", Outline Box( "Big Class Linear Fit", Text Box( eqn, <, \, \, \...) **Description:** Produce multiple reports, one for each level of the variable(s). ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); ``` ### [Coloring](#coloring) **Syntax:** obj = Bubble Plot(...\...) **Description:** Colors the bubbles according to the selected variable. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Coloring( :Pop ) ); ``` ### [Freq](#freq) **Syntax:** obj = Bubble Plot(...\...) **Description:** Weights computations when computing position, size, and colors of bubbles. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); dtSummary = dt << Summary( Group( :Country ), Mean( :"Portion 0-19"n ), Mean( :"Portion60+"n ), Sum( :Pop ), Freq( "None" ), Weight( "None" ) ); dtSummary << Bubble Plot( X( :"Mean(Portion 0-19)"n ), Y( :"Mean(Portion60+)"n ), Sizes( :"Sum(Pop)"n ), Freq( :N Rows ) ); ``` ### [ID](#id) **Syntax:** obj = Bubble Plot(...\...) **Description:** Identify rows that should be aggregated and shown as a single bubble. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); ``` ### [Sizes](#sizes) **Syntax:** obj = Bubble Plot(...\...) **Description:** Column to use as the size of the bubbles. If not specified, bubble size is proportional to the number of observations. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); ``` ### [Time](#time) **Syntax:** obj = Bubble Plot(...\...) **Description:** Maintains separate coordinates, sizes, and colors for each unique time period. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Region, :Country ), Time( :Year ) ); ``` ### [X](#x) **Syntax:** obj = Bubble Plot(...X( column )...) **Description:** Column to use as the x coordinate of the bubbles in the plot. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); ``` ### [Y](#y) **Syntax:** obj = Bubble Plot(...Y( column )...) **Description:** Column to use as the y coordinate of the bubbles in the plot. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); ``` ## [Item Messages](#item-messages) ### [Auto Stretching](#auto-stretching) **Syntax:** obj \<< Auto Stretching( "Auto"|"On"|"Off" ) **Description:** Sets the auto stretching behavior of the report. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Auto Stretching( "Off" ); ``` ### [Bubble Size](#bubble-size) **Syntax:** obj \<< Bubble Size( number ) **Description:** Changes the size of the bubbles on the scatterplot. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Bubble Size( 50 ); ``` ### [Color Levels](#color-levels) **Syntax:** obj \<< Color Levels **Description:** Set the levels for the continuous legend. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Coloring( :Pop ) ); obj << Color Levels( [100000 1000000 10000000] ); ``` ### [Color Theme](#color-theme) **Syntax:** obj \<< Color Theme **Description:** Sets the color theme of the bubbles. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ), Coloring( :Region ) ); obj << Color Theme( "White to Red" ); ``` ### [Color as Sum](#color-as-sum) **Syntax:** obj \<< Color as Sum( state=0|1 ) **Description:** Uses the sum of the Color variable rather than the mean of the Color variable as the Color role. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Time( :Year ), Coloring( :Pop ), ID( :Region ) ); obj << Color as Sum( 1 ); ``` ### [Combine](#combine) **Syntax:** obj \<< Combine( ) **Description:** Combines the selected bubbles (or given ID) in a group into their larger bubble. This option is only available when two ID variables are used. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Region, :Country ), Time( :Year ) ); dt << Select Where( :Region == "Europe" ); obj << Split; Wait( 2 ); obj << Combine( "Europe" ); ``` ### [Combine All](#combine-all) **Syntax:** obj \<< Combine All **Description:** Combines all constituent bubbles in a group into their larger bubble. This option is only available when two ID variables are used. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Region, :Country ), Time( :Year ) ); obj << Split All; Wait( 2 ); obj << Combine All; ``` ### [Draw](#draw) **Syntax:** obj \<< Draw( "Filled"|"Outlined"|"Filled and Outlined" ) **Description:** Set the display mode for the bubbles. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Draw( "Outlined" ); ``` ### [Fit to Window](#fit-to-window) **Syntax:** obj \<< Fit to Window( "Auto"|"On"|"Off" ) **Description:** Sets the auto stretching behavior of the report. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Fit to Window( "Off" ); ``` ### [Get Custom Path](#get-custom-path) **Syntax:** obj \<< Get Custom Path **Description:** Returns the custom path for the bubbles as a matrix. A path matrix has three columns for x, y, and flags for each point in the path. The flag values are 0 for control, 1 for move, 2 for line segment, 3 for cubic Bézier segment, and are negative if the point also closes the path. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Set Custom Path( "M-1,-1 L-1,1 L0,0.5 L1,1 L1,-1 L0,-0.5 L-1,-1 Z" ); obj << Set Shape( "Custom" ); obj << Get Custom Path(); ``` ### [Get Draw](#get-draw) **Syntax:** obj \<< Get Draw **Description:** Returns the display mode for the bubbles. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Get Draw(); ``` ### [Get Label](#get-label) **Syntax:** obj \<< Get Label **Description:** Returns the mode for drawing bubble labels. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Get Label(); ``` ### [Get Shape](#get-shape) **Syntax:** obj \<< Get Shape **Description:** Returns the shape for the bubbles. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Set Shape( "Triangle" ); obj << Get Shape(); ``` ### [Go](#go) **Syntax:** obj \<< Go **Description:** Initiates the animation when a Time variable is used. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ) ); dt << Select Where( (:Country == 3300) | (:Country == 4120) ); obj << Go; ``` ### [Label](#label) **Syntax:** obj \<< Label( "None"|"Selected"|"All" ) **Description:** Set the mode for drawing bubble labels. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Label( "All" ); ``` ### [Label Offset](#label-offset) **Syntax:** obj \<< Label Offset( {pt, x offset, y offset}, ... ) ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Region, :Country ), Time( :Year ) ); dt << Select Where( :Region == "Europe" | :Region == "North America" ); obj << Label Offset( {4, -75, -43}, {7, 80, -34} ); ``` ### [Legend](#legend) **Syntax:** obj \<< Legend( state=0|1 ) **Description:** Displays the color legend when a coloring column is used. On by default. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ), Coloring( :Region ) ); obj << Legend( 1 ); ``` ### [Lock Scales](#lock-scales) **Syntax:** obj \<< Lock Scales( state=0|1 ) **Description:** Locks axis, gradient, and size ranges so they do not change in response to data or filtering changes. On by default. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Lock Scales( 0 ); dt << Data Filter( Mode( Select( 0 ), Show( 0 ), Include( 1 ) ), Add Filter( Columns( :Region ) ) ); ``` ### [Orient Shapes](#orient-shapes) **Syntax:** obj \<< Orient Shapes( state=0|1 ) **Description:** Orient the shape so that the top points in the direction of the movement. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ) ); obj << Set Shape( "Triangle" ); obj << Orient Shapes( 1 ); ``` ### [Prev](#prev) **Syntax:** obj \<< Prev **Description:** Moves the Time variable one step backward in the animation. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ) ); dt << Select Where( (:Country == 3300) | (:Country == 4120) ); obj << Time Index( 19 ); obj << Prev; ``` ### [Revert Color Theme](#revert-color-theme) **Syntax:** obj \<< Revert Color Theme **Description:** Reverts the custom color theme, returning to the default theme from column properties or preferences. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ), Coloring( :Region ) ); obj << Color Theme( "White to Red" ); Wait( 2 ); obj << Revert Color Theme(); ``` ### [Selectable Across Gaps](#selectable-across-gaps) **Syntax:** obj \<< Selectable Across Gaps( state=0|1 ) **Description:** Allows bubbles to be selectable and keeps the bubble selected during time periods where data is missing. When this option is off, bubbles are not selectable during time periods where data is missing. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ) ); dt << Select Where( :Country == 3300 ); obj << Selectable Across Gaps( 1 ); obj << Trail Bubbles( 1 ); obj << Go; ``` ### [Set Custom Path](#set-custom-path) **Syntax:** obj \<< Set Custom Path **Description:** Set the custom path for the bubbles. The path can be specified with an N x 3 matrix or with a text representation. A path matrix has three columns for x, y, and flags for each point in the path. The flag values are 0 for control, 1 for move, 2 for line segment, 3 for cubic Bézier segment, and are negative if the point also closes the path. Path text supports SVG syntax. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Set Custom Path( "M-1,-1 L-1,1 L0,0.5 L1,1 L1,-1 L0,-0.5 L-1,-1 Z" ); obj << Set Shape( "Custom" ); ``` ### [Set Shape](#set-shape) **Syntax:** obj \<< Set Shape( "Circle"|"Triangle"|"Square"|"Diamond"|"Arrow"|"Custom" ) **Description:** Set the shape for the bubbles. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Set Shape( "Triangle" ); ``` ### [Show Roles](#show-roles) **Syntax:** obj \<< Show Roles( state=0|1 ) **Description:** Displays the variables used for each role in a legend across the top of the report. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ), Coloring( :Region ) ); obj << Show Roles( 1 ); ``` ### [Show Time Annotation](#show-time-annotation) **Syntax:** obj \<< Show Time Annotation( state=0|1 ) **Description:** Shows the current time as an annotation in an animated Bubble Plot. On by default. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ), Coloring( :Region ) ); Wait( 1 ); obj << Show Time Annotation( 0 ); ``` ### [Size as Sum](#size-as-sum) **Syntax:** obj \<< Size as Sum( state=0|1 ) **Description:** Uses the sum of the Size variable rather than the mean of the Size variable as the Size role. On by default. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Size as Sum( 1 ); ``` ### [Speed](#speed) **Syntax:** obj \<< Speed( number ) **Description:** Changes the speed of the bubble movement over time. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ) ); dt << Select Where( (:Country == 3300) | (:Country == 4120) ); obj << Speed( 100 ); obj << Go; ``` ### [Split](#split) **Syntax:** obj \<< Split( ) **Description:** Splits the selected bubble (or given ID) into its constituent parts. This option is only available when two ID variables are used. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Region, :Country ), Time( :Year ) ); dt << Select Where( :Region == "Europe" ); Wait( 2 ); obj << Split; Wait( 2 ); obj << Split( "Asia" ); ``` ### [Split All](#split-all) **Syntax:** obj \<< Split All **Description:** Splits all bubbles into their constituent parts. This option is only available when two ID variables are used. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Region, :Country ), Time( :Year ) ); Wait( 2 ); obj << Split All; ``` ### [Step](#step) **Syntax:** obj \<< Step **Description:** Moves the Time variable one step forward in the animation. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ) ); dt << Select Where( (:Country == 3300) | (:Country == 4120) ); obj << Step; ``` ### [Stop](#stop) **Syntax:** obj \<< Stop **Description:** Stops the animation when a Time variable is used. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ) ); dt << Select Where( :Country == 4120 ); obj << Go; Wait( 2 ); obj << Stop; ``` ### [Time Index](#time-index) **Syntax:** obj \<< Time Index( number ) **Description:** Sets the value of the Time variable on the scatterplot. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ) ); obj << Time Index( 19 ); ``` ### [Title Position](#title-position) **Syntax:** obj \<< Title Position( X,Y ) **Description:** Sets the position of the title. A Time variable must be specified to see this option. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ) ); obj << Title Position( 0.8, 0.06 ); ``` ### [Toggle Animation](#toggle-animation) **Syntax:** obj \<< Toggle Animation **Description:** Toggles the current animation state ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ) ); dt << Select Where( :Country == 4120 ); obj << Go; Wait( 2 ); obj << Toggle Animation; ``` ### [Trail Bubbles](#trail-bubbles) **Syntax:** obj \<< Trail Bubbles( "None"|"Selected"|"All" ) **Description:** Shows the past history of bubbles as a semi-transparent trail. To show trail bubbles, a Time column must be specified and a bubble must first be selected. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ) ); dt << Select Where( (:Country == 3300) | (:Country == 4120) ); obj << Trail Bubbles( 1 ); obj << Go; ``` ### [Trail Lines](#trail-lines) **Syntax:** obj \<< Trail Lines( "None"|"Selected"|"All" ) **Description:** Shows the past history of bubbles as connected line segments. To show trail bubbles, a Time column must be specified and a bubble must first be selected. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), Time( :Year ) ); dt << Select Where( (:Country == 3300) | (:Country == 4120) ); obj << Trail Lines( 1 ); obj << Go; ``` ### [X as Sum](#x-as-sum) **Syntax:** obj \<< X as Sum( state=0|1 ) **Description:** Uses the sum of the X variable rather than the mean of the X variable as the X role. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << X as Sum( 1 ); ``` ### [Y as Sum](#y-as-sum) **Syntax:** obj \<< Y as Sum( state=0|1 ) **Description:** Uses the sum of the Y variable rather than the mean of the Y variable as the Y role. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Y as Sum( 1 ); ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Automatic Recalc](#automatic-recalc) **Syntax:** obj \<< Automatic Recalc( state=0|1 ) **Description:** Redoes the analysis automatically for exclude and data changes. If the Automatic Recalc option is turned on, you should consider using Wait(0) commands to ensure that the exclude and data changes take effect before the recalculation. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Automatic Recalc( 1 ); dt << Select Rows( 5 ) << Exclude( 1 ); ``` ### [Broadcast](#broadcast) **Syntax:** obj \<< Broadcast(message) **Description:** Broadcasts a message to a platform. If return results from individual objects are tables, they are concatenated if possible, and the final format is identical to either the result from the Save Combined Table option in a Table Box or the result from the Concatenate option using a Source column. Other than those, results are stored in a list and returned. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" ); objs = Control Chart Builder( Variables( Subgroup( :DAY ), Y( :DIAMETER ) ), By( :OPERATOR ) ); objs[1] << Broadcast( Save Summaries ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy ByGroup Script](#copy-bygroup-script) **Syntax:** obj \<< Copy ByGroup Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Copy ByGroup Script; ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get ByGroup Script](#get-bygroup-script) **Syntax:** obj \<< Get ByGroup Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); t = obj[1] << Get ByGroup Script; Show( t ); ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Group Platform](#get-group-platform) **Syntax:** obj \<< Get Group Platform **Description:** Return the Group Platform object if this platform is part of a Group. Otherwise, returns Empty(). ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Y( :weight ), X( :height ), By( :sex ) ); group = biv[1] << Get Group Platform; Wait( 1 ); group << Layout( "Arrange in Tabs" ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \<, < \<, < \<, < \< ); **Description:** Creates a JSL script to produce this analysis, and save it as a table property in the data table. You can specify a name for the script. The Append Suffix option appends a numeric suffix to the script name, which differentiates the script from an existing script with the same name. The Prompt option prompts the user to specify a script name. The Replace option replaces an existing script with the same name. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Data Table; ``` ### [Save ByGroup Script to Journal](#save-bygroup-script-to-journal) **Syntax:** obj \<< Save ByGroup Script to Journal **Description:** Create a JSL script to produce this analysis, and add a Button to the journal containing this script. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Journal; ``` ### [Save ByGroup Script to Script Window](#save-bygroup-script-to-script-window) **Syntax:** obj \<< Save ByGroup Script to Script Window **Description:** Create a JSL script to produce this analysis, and append it to the current Script text window. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Script Window; ``` ### [Save Script for All Objects](#save-script-for-all-objects) **Syntax:** obj \<< Save Script for All Objects **Description:** Creates a script for all report objects in the window and appends it to the current Script window. This option is useful when you have multiple reports in the window. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Save Script for All Objects; ``` ### [Save Script for All Objects To Data Table](#save-script-for-all-objects-to-data-table) **Syntax:** obj \<< Save Script for All Objects To Data Table( ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" ); obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Country ) ); obj << Save Script to Data Table( "My Analysis", <(... Transform Column(, Formula(), \[Random Seed()\], [Numeric|Character|Expression], [Continuous|Nominal|Ordinal|Unstructured Text], [column properties]) ...) **Description:** Create a transform column in the local context of an object, usually a platform. The transform column is active only for the lifetime of the platform. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Distribution( Transform Column( "age^2", Format( "Fixed Dec", 5, 0 ), Formula( :age * :age ) ), Continuous Distribution( Column( :"age^2"n ) ) ); ``` ### [View Web XML](#view-web-xml) **Syntax:** obj \<< View Web XML **Description:** Returns the XML code that is used to create the interactive HTML report. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); xml = obj << View Web XML; ``` ### [Window View](#window-view) **Syntax:** obj = Bubble Plot(...Window View( "Visible"|"Invisible"|"Private" )...) **Description:** Set the type of the window to be created for the report. By default a Visible report window will be created. An Invisible window will not appear on screen, but is discoverable by functions such as Window(). A Private window responds to most window messages but is not discoverable and must be addressed through the report object ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Window View( "Private" ), Y( :weight ), X( :height ), Fit Line ); eqn = Report( biv )["Linear Fit", Text Edit Box( 1 )] << Get Text; biv << Close Window; New Window( "Bivariate Equation", Outline Box( "Big Class Linear Fit", Text Box( eqn, <, \, \, \ ) **Description:** Creates a chart that plots the cumulative sums of deviations of subgroup means from a target. This chart is also called a tabular CUSUM chart. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); ``` ## [Columns](#columns) ### [By](#by) **Syntax:** By( column ) **Description:** Specifies the By column during launch. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" ); obj = dt << CUSUM Control Chart( Y( :DIAMETER ), X( :DAY ), By( :Phase ) ); ``` ### [X](#x) **Syntax:** X( column ) **Description:** Specifies the X column during launch. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), X( :hour ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); ``` ### [Y](#y) **Syntax:** Y( column ) **Description:** Specifies the Y column during launch. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); ``` ## [Item Messages](#item-messages) ### [ARL Profiler](#arl-profiler) **Syntax:** obj \<< ARL Profiler( state=0|1 ) **Description:** Shows or hides an interactive profiler for the Average Run Length as parameters change. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << ARL Profiler( 1 ); ``` ### [Alarm Script](#alarm-script) **Syntax:** Alarm Script(Write("...")|Speak("...")|Mail(address, subject,"...") ) **Description:** Sends a message whenever a point on a control chart fails a given test. The message can be sent to the log, can be spoken, or can be emailed. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Alarm Script( Write( "Out of Control for test ", qc_test, " in column ", qc_col, " in sample ", qc_sample, ". \!N" ) ), Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Test Beyond Limits( 1 ); ``` ### [Control Panel](#control-panel) **Syntax:** obj \<< Control Panel( state=0|1 ) **Description:** Shows or hides a report that contains the current values of the parameters and enables you to change them. On by default. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); Wait( 1 ); obj << Control Panel( 0 ); ``` ### [Data Units](#data-units) **Syntax:** obj = CUSUM Control Chart(...Data Units( state=0|1 )...) **Description:** Specifies that data units are used in the report rather than standard deviation units. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 0.1 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ), Data Units( 1 ) ); ``` ### [Get Limits](#get-limits) **Syntax:** obj \<< Get Limits **Description:** Imports control limits from a selected data table and replaces calculated limits on the chart. **JMP Version Added:** 17 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); limitsTable = New Table( "Cusum Limits", Add Rows( 4 ), New Column( "_LimitsKey", Character, Set Values( {"_H", "_K", "_Std Dev", "_Mean"} ) ), New Column( "weight", Set Values( [4, 0.5, 0.01, 8.1] ) ) ); Wait(); obj << Get Limits( limitsTable ); ``` ### [H](#h) **Syntax:** obj \<< H( number=5 ) **Description:** Specifies the value of the parameter that defines the limits. If the Data Units option was not specified, this is the h parameter. If the Data Units option was specified, this is the H parameter. Note that H is equal to h times Sigma. "5" by default. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << H( 4.5 ); ``` ### [Head Start](#head-start) **Syntax:** obj \<< Head Start( number ) **Description:** Specifies the value of the cumulative sums before the first sample. Starting the cumulative sums at a nonzero value increases the sensitivity of the CUSUM chart near the beginning of the samples. This parameter is also known as the fast initial response (FIR) value. By default, this parameter is set to 0. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Head start( 1.0 ); ``` ### [K](#k) **Syntax:** obj \<< K( number=0.5 ) **Description:** Specifies the value of the parameter that defines the smallest change in the mean that is valuable to detect. If the Data Units option was not specified, this is the k parameter. If the Data Units option was specified, this is the K parameter. Note that K is equal to k times Sigma. "0.5" by default. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << K( 0.1 ); ``` ### [Lower Side](#lower-side) **Syntax:** obj \<< Lower Side( state=0|1 ) **Description:** Shows or hides the negative values for the cumulative sum on the chart. On by default. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Lower Side( 0 ); ``` ### [Parameters Report](#parameters-report) **Syntax:** obj \<< Parameters Report( state=0|1 ) **Description:** Shows or hides the parameters report. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Parameters Report( 1 ); ``` ### [Reset to Defaults](#reset-to-defaults) **Syntax:** obj \<< Reset to Defaults **Description:** Resets all parameters back to the default values. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << H( 3 ); Wait( 1 ); obj << Reset to Defaults(); ``` ### [Save Limits](#save-limits) **Syntax:** obj \<< Save Limits( "in Column"|"in New Table" ) **Description:** Saves chart parameters to either a column property or a new data table. If in Column is specified, the Avg is saved in a Control Limits column property. If in New Table is specified, parameters h, k, the standard deviation, mean, and head start are saved to a new data table. **JMP Version Added:** 17 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); Wait(); obj << Save Limits( "in Column" ); Wait(); obj << Save Limits( "in New Table" ); ``` ### [Save Sigma](#save-sigma) **Syntax:** obj \<< Save Sigma **Description:** Saves the sigma used in the control chart as a column property in the data table. **JMP Version Added:** 17 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Save Sigma; ``` ### [Save Summaries](#save-summaries) **Syntax:** obj \<< Save Summaries **Description:** Creates a new data table that contains statistics for each subgroup in the CUSUM chart. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Save Summaries; ``` ### [Show ARL](#show-arl) **Syntax:** obj \<< Show ARL( state=0|1 ) **Description:** Shows or hides a report with the Average Run Length computed from the associated CUSUM chart. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Show ARL( 1 ); ``` ### [Show Center Line](#show-center-line) **Syntax:** obj \<< Show Center Line( state=0|1 ) **Description:** Shows or hides the center line on the graph. On by default. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Show Center Line( 0 ); ``` ### [Show Excluded Region](#show-excluded-region) **Syntax:** obj = CUSUM Control Chart(...Show Excluded Region( state=0|1 )...) **Description:** Specifies whether subgroups that are entirely excluded are shown on the horizontal axis in the CUSUM control chart. Applicable only when an X variable is specified. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Clips1.jmp" ); dt << Select Rows( {31, 32, 33, 34, 35, 36, 37, 38, 39, 40} ) << exclude << hide; obj = dt << CUSUM Control Chart( Y( :Gap ), Subgroup( :Sample ), Show Excluded Region( 0 ) ); ``` ### [Show Limits](#show-limits) **Syntax:** obj \<< Show Limits( state=0|1 ) **Description:** Shows or hides the limits. On by default. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Show Limits( 0 ); ``` ### [Show Shift Lines](#show-shift-lines) **Syntax:** obj \<< Show Shift Lines( state=0|1 ) **Description:** Shows or hides vertical lines that designate shifts in the chart. Shift lines are drawn at the start of a shift. Available only when there is a shift detected in the data. On by default. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); Wait( 1 ); obj << Show Shift Lines( 0 ); ``` ### [Sigma](#sigma) **Syntax:** obj \<< Sigma( number ) **Description:** Specifies the known value of the standard deviation. By default, this parameter is set to the average moving range of the Y column. If there is an X variable, the Sigma parameter is set to the average moving range of the summary data. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Sigma( 2 ); ``` ### [Target](#target) **Syntax:** obj \<< Target( number ) **Description:** Specifies the known value of the mean. This is the value of the center line in the chart. By default, this parameter is set to the Target value in the Spec Limits column property for the Y column. If the Y column does not have a Target value in the Spec Limits column property, this parameter is set to the overall average of the Y column. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Target( 9.5 ); ``` ### [Test Beyond Limits](#test-beyond-limits) **Syntax:** obj \<< Test Beyond Limits( state=0|1 ) **Description:** Shows or hides a red circle around any point that is above the upper limit or below the lower limit in the CUSUM chart. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Test Beyond Limits( 1 ); ``` ### [Tune Chart](#tune-chart) **Syntax:** obj \<< Tune Chart( \<0|1> | Min( value, Max( value ) ) ) **Description:** Shows or hides a control that enables you to set the value of the k parameter by specifying an acceptable range for the Y variable. In a script, you can also specify the acceptable range directly. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Tune Chart( Min( 8.08, Max( 8.12 ) ) ); ``` ### [Upper Side](#upper-side) **Syntax:** obj \<< Upper Side( state=0|1 ) **Description:** Shows or hides the positive values for the cumulative sum on the chart. On by default. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Upper Side( 0 ); ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Automatic Recalc](#automatic-recalc) **Syntax:** obj \<< Automatic Recalc( state=0|1 ) **Description:** Redoes the analysis automatically for exclude and data changes. If the Automatic Recalc option is turned on, you should consider using Wait(0) commands to ensure that the exclude and data changes take effect before the recalculation. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Automatic Recalc( 1 ); dt << Select Rows( 5 ) << Exclude( 1 ); ``` ### [Broadcast](#broadcast) **Syntax:** obj \<< Broadcast(message) **Description:** Broadcasts a message to a platform. If return results from individual objects are tables, they are concatenated if possible, and the final format is identical to either the result from the Save Combined Table option in a Table Box or the result from the Concatenate option using a Source column. Other than those, results are stored in a list and returned. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" ); objs = Control Chart Builder( Variables( Subgroup( :DAY ), Y( :DIAMETER ) ), By( :OPERATOR ) ); objs[1] << Broadcast( Save Summaries ); ``` ### [Copy ByGroup Script](#copy-bygroup-script) **Syntax:** obj \<< Copy ByGroup Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Copy ByGroup Script; ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get ByGroup Script](#get-bygroup-script) **Syntax:** obj \<< Get ByGroup Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); t = obj[1] << Get ByGroup Script; Show( t ); ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Group Platform](#get-group-platform) **Syntax:** obj \<< Get Group Platform **Description:** Return the Group Platform object if this platform is part of a Group. Otherwise, returns Empty(). ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Y( :weight ), X( :height ), By( :sex ) ); group = biv[1] << Get Group Platform; Wait( 1 ); group << Layout( "Arrange in Tabs" ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Relaunch Analysis; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \<, < \<, < \<, < \< ); **Description:** Creates a JSL script to produce this analysis, and save it as a table property in the data table. You can specify a name for the script. The Append Suffix option appends a numeric suffix to the script name, which differentiates the script from an existing script with the same name. The Prompt option prompts the user to specify a script name. The Replace option replaces an existing script with the same name. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Data Table; ``` ### [Save ByGroup Script to Journal](#save-bygroup-script-to-journal) **Syntax:** obj \<< Save ByGroup Script to Journal **Description:** Create a JSL script to produce this analysis, and add a Button to the journal containing this script. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Journal; ``` ### [Save ByGroup Script to Script Window](#save-bygroup-script-to-script-window) **Syntax:** obj \<< Save ByGroup Script to Script Window **Description:** Create a JSL script to produce this analysis, and append it to the current Script text window. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Script Window; ``` ### [Save Script for All Objects](#save-script-for-all-objects) **Syntax:** obj \<< Save Script for All Objects **Description:** Creates a script for all report objects in the window and appends it to the current Script window. This option is useful when you have multiple reports in the window. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Save Script for All Objects; ``` ### [Save Script for All Objects To Data Table](#save-script-for-all-objects-to-data-table) **Syntax:** obj \<< Save Script for All Objects To Data Table( ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); obj << Save Script to Data Table( "My Analysis", <(... Transform Column(, Formula(), \[Random Seed()\], [Numeric|Character|Expression], [Continuous|Nominal|Ordinal|Unstructured Text], [column properties]) ...) **Description:** Create a transform column in the local context of an object, usually a platform. The transform column is active only for the lifetime of the platform. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Distribution( Transform Column( "age^2", Format( "Fixed Dec", 5, 0 ), Formula( :age * :age ) ), Continuous Distribution( Column( :"age^2"n ) ) ); ``` ### [View Web XML](#view-web-xml) **Syntax:** obj \<< View Web XML **Description:** Returns the XML code that is used to create the interactive HTML report. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); xml = obj << View Web XML; ``` ### [Window View](#window-view) **Syntax:** obj = CUSUM Control Chart(...Window View( "Visible"|"Invisible"|"Private" )...) **Description:** Set the type of the window to be created for the report. By default a Visible report window will be created. An Invisible window will not appear on screen, but is discoverable by functions such as Window(). A Private window responds to most window messages but is not discoverable and must be addressed through the report object ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Window View( "Private" ), Y( :weight ), X( :height ), Fit Line ); eqn = Report( biv )["Linear Fit", Text Edit Box( 1 )] << Get Text; biv << Close Window; New Window( "Bivariate Equation", Outline Box( "Big Class Linear Fit", Text Box( eqn, < ) **Description:** Formats the confidence limits for Share and Rate in the table. The default value is "Percent", 6, 2. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); obj = dt << Categorical( X( :Age Group ), Responses( :I am working on my career ), Confidence Interval Coverage( 0.99 ), Share Confidence Interval( 1 ) ); Wait( 1 ); obj << Confidence Limits Format( "Percent", 6, 0 ); ``` ### [Contents Summary](#contents-summary) **Syntax:** obj \<< Contents Summary( state=0|1 ) **Description:** Collects all tests and p-values into one report. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Contents Summary( 1 ); ``` ### [Count Missing Responses](#count-missing-responses) **Syntax:** obj = Categorical(...Count Missing Responses( state=0|1 )...) **Description:** Includes missing values as a response category. ``` dt = Open( "$SAMPLE_DATA/Missing Data Pattern.jmp" ); Categorical( X( :Trial 1 ), Count Missing Responses( 1 ), Responses( :Trial 4 ) ); ``` ### [Count Test](#count-test) **Syntax:** obj \<< Count Test( state=0|1 ) **Description:** Performs a chi-square test of independence of rates using Poisson regression. Note: Available only for multiple responses. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( Multiple Response( :country, :size ), X( :sex, :marital status ) ); obj << Count Test( 1 ); ``` ### [Crosstab](#crosstab) **Syntax:** obj \<< Crosstab( state=0|1 ) **Description:** Generates a cross tabulation of counts with the response levels defining the columns and the grouping variable levels defining the rows. On by default. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Crosstab Transposed( 1 ); obj << Crosstab( 1 ); ``` ### [Crosstab Transposed](#crosstab-transposed) **Syntax:** obj \<< Crosstab Transposed( state=0|1 ) **Description:** Generates a cross tabulation of counts with the response levels defining the rows and the grouping variable levels defining the columns. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Crosstab Transposed( 1 ); ``` ### [Exclude Nonresponses](#exclude-nonresponses) **Syntax:** obj \<< Exclude Nonresponses( state=0|1 ) **Description:** Excludes nonresponses for count and homogeneity tests when comparing multiple response categories. Empty or missing cells are treated as nonresponses. Using a separate category for none-of-these is recommended. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Color Preference Survey.jmp" ); obj = dt << Categorical( Structured( :"What is your gender ? "n, :"What colors do you like? (with nonresponse)"n ), Share Chart( 0 ), Homogeneity Test( 1 ) ); Wait( 1 ); obj << Exclude Nonresponses( 1 ); ``` ### [FDR Adjusted PValues](#fdr-adjusted-pvalues) **Syntax:** obj \<< FDR Adjusted PValues( state=0|1 ) **Description:** False discovery rate adjusted p-values (Benjamini and Hochberg, 1995) are used when there are many p-values and it becomes easy for some tests to be significant by chance alone. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); obj = dt << Categorical( Structured( :I am working on my career, :Age Group * :Employee Tenure ), Share Chart( 0 ), Test Response Homogeneity( 1 ) ); obj << FDR Adjusted PValues( 1 ); ``` ### [Filter](#filter) **Syntax:** obj \<< Filter( state=0|1 ) **Description:** Filters data to specific groups or ranges, locally. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( Responses( :country ), Legend( 0 ), Local Data Filter( Location( {634, 43} ), Mode( Select( 0 ), Show( 1 ), Include( 1 ) ), Add Filter( columns( :sex ), Where( :sex == "Female" ) ) ) ); Wait( 1.0 ); obj << Filter( 0 ); ``` ### [Force Crosstab Shading](#force-crosstab-shading) **Syntax:** obj \<< Force Crosstab Shading( state=0|1 ) **Description:** Uses shading on Crosstab reports even if Global Preferences are set not to shade. On by default. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Force Crosstab Shading( 0 ); Wait( 1 ); obj << Force Crosstab Shading( 1 ); ``` ### [Force Labels Horizontal](#force-labels-horizontal) **Syntax:** obj \<< Force Labels Horizontal( state=0|1 ) **Description:** Uses horizontal labels on the crosstab table regardless of the length of the text. The label text is wrapped rather than rotated. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); obj = dt << Categorical( X( :Employee Tenure ), Responses( :Job Satisfaction ) ); Wait( 1 ); obj << Force Labels Horizontal( 1 ); ``` ### [Format Elements](#format-elements) **Syntax:** obj \<< Format Elements **Description:** Opens a window that enables you to specify formats for various elements of the report. ### [Frequencies](#frequencies) **Syntax:** obj \<< Frequencies( state=0|1 ) **Description:** Shows or hides the Frequency table in the report. On by default. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ), Frequencies( 0 ) ); Wait( 1 ); obj << Frequencies( 1 ); ``` ### [Frequencies Format](#frequencies-format) **Syntax:** obj \<< Frequencies Format( format, ) **Description:** Formats the Frequency values in the table. The default value is "Fixed Dec", 7, 0. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); Wait( 1 ); obj << Frequencies Format( "Fixed Dec", 7, 2 ); ``` ### [Frequency Chart](#frequency-chart) **Syntax:** obj \<< Frequency Chart( state=0|1 ) **Description:** Shows or hides the Frequency Chart in the report. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Frequency Chart( 1 ); ``` ### [Grouping Option](#grouping-option) **Syntax:** obj = Categorical(...Grouping Option( "Combinations"|"Each Individually"|"Both" )...) **Description:** Sets the grouping method for the X variables. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Aligned Responses( :country, :size ), Grouping Option( Each Individually ) ); ``` ### [Hide Nonsignificant](#hide-nonsignificant) **Syntax:** obj \<< Hide Nonsignificant( state=0|1 ) **Description:** Suppresses reports that are non-significant. ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); obj = dt << Categorical( Grouping Option( Each Individually ), X( :Age Group, :School Age Children ), Responses( :I am working on my career ), Responses( :My home needs some major improvements ), Responses( :I have vast interests outside of work ), Responses( :I come from a large family ), Crosstab Transposed( 1 ), Test Response Homogeneity( 1 ) ); obj << Hide Nonsignificant( 1 ); ``` ### [Highlight Cells](#highlight-cells) **Syntax:** obj \<< Highlight Cells **Description:** Highlights the cells that satisfy the specified conditions. #### [Highlight by Category](#highlight-by-category) ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); Categorical( Structured( :Position Tenure + :Age Group, :I am working on my career + :Brush ), Mean Score( 1 ), Highlight Cells( Share >= 0.5, Color( "Magenta" ), Category( "30-34" ) ), Highlight Cells( Share >= 0.46, Color( "Green" ), Category( "5 to 10 years" ) ), Highlight Cells( Share < 0.5, Color( "Blue" ), Category( "Agree" ) ), Highlight Cells( Mean Score <= 2, Color( "Yellow" ), Category( "25-29" ) ) ); ``` #### [Highlight by Column](#highlight-by-column) ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); Categorical( Structured( :Position Tenure + :Age Group, :I am working on my career + :Brush ), Mean Score( 1 ), Highlight Cells( Share >= 0.5, Column( :Age Group ) ), Highlight Cells( Share >= 0.46, Color( "Fuchsia" ), Column( :Brush ) ) ); ``` #### [Highlight by Highest and Lowest in Table](#highlight-by-highest-and-lowest-in-table) ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failures3Delimited.jmp" ); Categorical( ID( :ID ), X( :clean, :date ), Multiple Delimited( :failures ), Share Chart( 1 ), Highlight Cells( Highest in Table( Freq ), Color( "Green" ) ), Highlight Cells( Lowest in Table( Freq ), Color( "Purple" ) ) ); ``` #### [Highlight by Highest Response and Highest Sample](#highlight-by-highest-response-and-highest-sample) ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failures3Delimited.jmp" ); obj = dt << Categorical( Multiple Delimited( :failures ), ID( :ID ), X( :clean, :date ), Highlight Cells( Highest Response( Share ), Color( "Green" ) ), Highlight Cells( Highest Sample( Share ), Color( "Purple" ) ) ); ``` #### [Highlight by Lowest Response and Lowest Sample](#highlight-by-lowest-response-and-lowest-sample) ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failures3Delimited.jmp" ); obj = dt << Categorical( Multiple Delimited( :failures ), ID( :ID ), X( :clean, :date ), Highlight Cells( Lowest Response( Share ), Color( "Green" ) ), Highlight Cells( Lowest Sample( Share ), Color( "Purple" ) ) ); ``` #### [Highlight by Mean Score and Share](#highlight-by-mean-score-and-share) ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); Categorical( X( :Gender, :Age Group ), Responses( :Job Satisfaction ), Responses( :I am working on my career ), Mean Score( 1 ), Mean Std Error( 1 ), Mean Confidence Interval( 1 ), Std Dev Score( 1 ), Share Chart( 0 ), Highlight Cells( Mean Score > 2.3, Color( "Blue" ) ), Highlight Cells( Share >= 0.6, Color( "Cyan" ) ), Highlight Cells( Share > 0.7, Color( "Green" ) ) ); ``` ### [Homogeneity Test](#homogeneity-test) **Syntax:** obj \<< Homogeneity Test( state=0|1 ) **Description:** Performs a chi-square test of independence of response levels assuming a binomial distribution for each category. Note: Available only for multiple responses. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( Multiple Response( :country, :size ), X( :sex, :marital status ) ); obj << Homogeneity Test( 1 ); ``` ### [Include Response Categories in Excluded Rows](#include-response-categories-in-excluded-rows) **Syntax:** obj = Categorical(...Include Response Categories in Excluded Rows( state=0|1 )...) **Description:** Specifies that the report include response categories that appear only in excluded rows. The counts for these categories are zero. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Select Where( :size == "Small" ); dt << Exclude; obj = Categorical( Include Response Categories in Excluded Rows( 1 ), X( :marital status ), Responses( :size ) ); ``` ### [Include Responses Not in Data](#include-responses-not-in-data) **Syntax:** obj = Categorical(...Include Responses Not in Data( state=0|1 )...) **Description:** Shows response categories that have value labels, even if they do not occur in the data. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); :type << Set Property( Value Labels, {"Family" = "Family", "Sporty" = "Sporty", "Utility" = "SUV", "Work" = "Work"} ); obj = Categorical( X( :marital status ), Responses( :type ) ); obj << Include Responses Not in Data( 1 ); ``` ### [Indicator Group](#indicator-group) **Syntax:** obj = Categorical(...Indicator Group( columns )...) **Description:** Summarizes data from a multiple response variable where the responses are in multiple indicator columns. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failures3Indicators.jmp" ); obj = dt << Categorical( X( :clean, :date ), Indicator Group( :contamination, :corrosion, :doping, :metallization, :miscellaneous, :oxide defect, :silicon defect ) ); ``` ### [Mean Confidence Interval](#mean-confidence-interval) **Syntax:** obj \<< Mean Confidence Interval( state=0|1 ) **Description:** Shows or hides the confidence interval for the means **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Mean Confidence Interval( 1 ); ``` ### [Mean Score](#mean-score) **Syntax:** obj \<< Mean Score( state=0|1 ) **Description:** Displays the mean score, based on raw numeric codes or value scores, in the crosstab table. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Mean Score( 1 ); ``` ### [Mean Score Comparisons](#mean-score-comparisons) **Syntax:** obj \<< Mean Score Comparisons( state=0|1 ) **Description:** Compares the mean scores across grouping categories. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Mean Score Comparisons( 1 ); ``` ### [Mean Score Comparisons FDR](#mean-score-comparisons-fdr) **Syntax:** obj \<< Mean Score Comparisons FDR( state=0|1 ) **Description:** Compares the mean scores across grouping categories. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Mean Score Comparisons FDR( 1 ); ``` ### [Mean Score Comparisons as Suffix](#mean-score-comparisons-as-suffix) **Syntax:** obj \<< Mean Score Comparisons as Suffix( state=0|1 ) **Description:** Compares the mean scores across grouping categories. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Mean Score Comparisons Suffixed( 1 ); ``` ### [Mean Std Error](#mean-std-error) **Syntax:** obj \<< Mean Std Error( state=0|1 ) **Description:** Shows or hides the standard error for the means **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Mean Std Error( 1 ); ``` ### [Means Format](#means-format) **Syntax:** obj \<< Means Format( format, ) **Description:** Formats the mean scores in the table. The default value is "Fixed", 6, 2. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Mean Score( 1 ); Wait( 1 ); obj << Means Format( "Fixed", 6, 4 ); ``` ### [Multiple Delimited](#multiple-delimited) **Syntax:** obj = Categorical(...Multiple Delimited( column )...) **Description:** Summarizes data from a multiple response variable where the responses are in a single column and each response is separated by a comma, semicolon, or tab. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failures3Delimited.jmp" ); obj = dt << Categorical( Multiple Delimited( :failureS ), ID( :ID ), X( :clean, :date ) ); ``` ### [Multiple Response](#multiple-response) **Syntax:** obj = Categorical(...Multiple Response( columns )...) **Description:** Summarizes data from a multiple response variable where each possible response is recorded in its own individual column. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure3MultipleField.jmp" ); obj = dt << Categorical( X( :clean, :date ), Multiple Response( :Failure1, :Failure2, :Failure3 ), Frequency Chart( 0 ) ); ``` ### [Multiple Response by ID](#multiple-response-by-id) **Syntax:** obj = Categorical(...Multiple Response by ID( column )...) **Description:** Summarizes data from a multiple response variable where there is a single column of responses and a second column containing an ID for the subject. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure3ID.jmp" ); obj = dt << Categorical( Multiple Response by ID( :failure ), Freq( :N ), Sample Size( :SampleSize ), ID( :ID ), X( :clean, :date ) ); ``` ### [Order Response Levels High to Low](#order-response-levels-high-to-low) **Syntax:** obj = Categorical(...Order Response Levels High to Low( state=0|1 )...) **Description:** Reorders the report so that categories with the highest value are at the top. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Order Response Levels High to Low( 1 ), Responses( :country ) ); ``` ### [Order by Significance](#order-by-significance) **Syntax:** obj \<< Order by Significance( state=0|1 ) **Description:** Reorders the reports so that the most significant reports are at the top. ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); obj = dt << Categorical( Grouping Option( Each Individually ), X( :Age Group, :School Age Children ), Responses( :I am working on my career ), Responses( :My home needs some major improvements ), Responses( :I have vast interests outside of work ), Responses( :I come from a large family ), Crosstab Transposed( 1 ), Test Response Homogeneity( 1 ) ); obj << Order by Significance( 1 ); ``` ### [Poisson](#poisson) **Syntax:** obj \<< Poisson( state=0|1 ) **Description:** Performs a chi-square test of independence of rates using Poisson regression. Note: Available only for multiple responses. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( Multiple Response( :country, :size ), X( :sex, :marital status ) ); obj << Count Test( 1 ); ``` ### [Rate Confidence Interval](#rate-confidence-interval) **Syntax:** obj \<< Rate Confidence Interval( state=0|1 ) **Description:** Shows or hides the confidence interval for the rate probability. The confidence interval is a normal interval using the standard errors from the Poisson linear model. ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); obj = dt << Categorical( X( :Gender ), Multiple Delimited( :Brush Delimited ) ); obj << Rate Confidence Interval( 1 ); ``` ### [Rate Per Case](#rate-per-case) **Syntax:** obj \<< Rate Per Case( state=0|1 ) **Description:** Shows or hides the Rate per Case table in the report. On by default. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure3ID.jmp" ); obj = dt << Categorical( Multiple Response by ID( :failure ), Freq( :N ), Sample Size( :SampleSize ), ID( :ID ), X( :clean, :date ), Rate Per Case( 0 ) ); Wait( 1 ); obj << Rate Per Case( 1 ); ``` ### [Rate per Case Responding](#rate-per-case-responding) **Syntax:** obj \<< Rate per Case Responding( state=0|1 ) **Description:** Shows or hides the rate of response per case responding (excluding missing). ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure3ID.jmp" ); obj = dt << Categorical( Multiple Response by ID( :failure ), Freq( :N ), Sample Size( :SampleSize ), ID( :ID ), X( :clean, :date ) ); obj << Rate Per Case Responding( 1 ); ``` ### [Rater Agreement](#rater-agreement_1) **Syntax:** obj = Categorical(...Rater Agreement( columns )...) **Description:** Summarizes data from multiple columns where each column is a rating for the same question or item, but is given by a different individual (rater). ``` dt = Open( "$SAMPLE_DATA/Prime Minister Ratings.jmp" ); obj = dt << Categorical( Rater Agreement( :First Survey, :Second Survey ), Freq( :Count ) ); ``` ### [Relative Risk](#relative-risk) **Syntax:** obj \<< Relative Risk( state=0|1, {}, {level of interest} ) **Description:** Shows or hides the relative risks for a two-level grouping variable for each level of the response. Available when the grouping variable has two levels and either the response has two levels or is a multiple response and the Unique occurrences within ID option has been selected. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure3Freq.jmp" ); obj = dt << Categorical( Response Frequencies( :contamination, :corrosion, :doping, :metallization, :miscellaneous, :oxide defect, :silicon defect, ), Sample Size( :SampleSize ), X( :clean ) ); obj << Relative Risk( 1, {}, {"after"} ); ``` ### [Repeated Measures](#repeated-measures_1) **Syntax:** obj = Categorical(...Repeated Measures( columns )...) **Description:** Summarizes data from multiple columns where each column contains responses to the same question made at different time points. ``` dt = Open( "$SAMPLE_DATA/Prime Minister Ratings.jmp" ); obj = dt << Categorical( Repeated Measures( :First Survey, :Second Survey ), Freq( :Count ) ); ``` ### [Response Frequencies](#response-frequencies) **Syntax:** obj = Categorical(...Response Frequencies( columns )...) **Description:** Summarizes a multiple response variable where the frequency of each possible response is recorded in its own column. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure3Freq.jmp" ); obj = dt << Categorical( Response Frequencies( :contamination, :corrosion, :doping, :metallization, :miscellaneous, :oxide defect, :silicon defect ), X( :clean, :date ), Sample Size( :SampleSize ) ); ``` ### [Response Levels](#response-levels) **Syntax:** obj \<< Response Levels( state=0|1 ) **Description:** Shows or hides data levels for each response. On by default. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Response Levels( 0 ); Wait( 1 ); obj << Response Levels( 1 ); ``` ### [Responses](#responses) **Syntax:** obj = Categorical(...Responses( column )...) **Description:** Summarizes responses from a single column. If multiple columns are selected, the categorical report contains a separate report for each individual column. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); ``` ### [Save Contingency Table](#save-contingency-table) **Syntax:** obj \<< Save Contingency Table **Description:** Saves the values in the crosstab table to a new data table. The new table uses the original column names. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :size ) ); obj << Save Contingency Table; ``` ### [Save DocX File](#save-docx-file) **Syntax:** obj \<< Save DocX File **Description:** Undocumented and Experimental Feature ### [Save Excel File](#save-excel-file) **Syntax:** obj \<< Save Excel File **Description:** Saves the tables to an Excel spreadsheet file. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :size ) ); obj << Save Excel File( "$DOCUMENTS\ExcelCarSize.xlsx", Separate Rows for Each Cell Statistic( 1 ) ); ``` ### [Save Frequencies](#save-frequencies) **Syntax:** obj \<< Save Frequencies **Description:** Saves the frequencies to a new table. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Save Frequencies; ``` ### [Save Mean Scores](#save-mean-scores) **Syntax:** obj \<< Save Mean Scores **Description:** Saves the mean scores for each sample group to a new table. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :size ) ); obj << Save Mean Scores; ``` ### [Save Rate Per Case](#save-rate-per-case) **Syntax:** obj \<< Save Rate Per Case **Description:** Saves the rate per case to a new table. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure3ID.jmp" ); obj = dt << Categorical( Multiple Response by ID( :failure ), Freq( :N ), Sample Size( :SampleSize ), ID( :ID ), X( :clean, :date ) ); obj << Rate Per Case( 1 ); obj << Save Rate Per Case; ``` ### [Save Share of Responses](#save-share-of-responses) **Syntax:** obj \<< Save Share of Responses **Description:** Saves the share of responses to a new table. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Save Share of Responses; ``` ### [Save Stacked Table](#save-stacked-table) **Syntax:** obj \<< Save Stacked Table **Description:** Saves the values in the crosstab table to a new data table. The new table uses general column names. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :size ) ); obj << Save Stacked Table; ``` ### [Save Test Homogeneity](#save-test-homogeneity) **Syntax:** obj \<< Save Test Homogeneity **Description:** Saves the results from the tests for homogeneity to a new table. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Save Test Homogeneity; ``` ### [Save Test Rates](#save-test-rates) **Syntax:** obj \<< Save Test Rates **Description:** Saves the results of the Test Multiple Response option to a new data table. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure3ID.jmp" ); obj = dt << Categorical( Multiple Response by ID( :failure ), Freq( :N ), Sample Size( :SampleSize ), ID( :ID ), X( :clean, :date ) ); obj << Rate Per Case( 1 ); obj << Save Test Rates; ``` ### [Save Transposed Frequencies](#save-transposed-frequencies) **Syntax:** obj \<< Save Transposed Frequencies **Description:** Saves the transposed frequencies to a new table. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Save Transposed Frequencies; ``` ### [Save Transposed Rate Per Case](#save-transposed-rate-per-case) **Syntax:** obj \<< Save Transposed Rate Per Case **Description:** Saves the transformed rate per case to a new table. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure3ID.jmp" ); obj = dt << Categorical( Multiple Response by ID( :failure ), Freq( :N ), Sample Size( :SampleSize ), ID( :ID ), X( :clean, :date ) ); obj << Rate Per Case( 1 ); obj << Save Transposed Rate Per Case; ``` ### [Save Transposed Share of Responses](#save-transposed-share-of-responses) **Syntax:** obj \<< Save Transposed Share of Responses **Description:** Saves the transposed share of responses to a new table. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Save Transposed Share of Responses; ``` ### [Save tTests and pValues](#save-ttests-and-pvalues) **Syntax:** obj \<< Save tTests and pValues **Description:** Save t tests and p-values from the Compare Means tests to a new data table. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :size ) ); obj << Save ttests and pvalues; ``` ### [Share Chart](#share-chart) **Syntax:** obj \<< Share Chart( state=0|1 ) **Description:** Shows or hides the Share Chart in the report. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ), Share Chart( 0 ) ); Wait( 1 ); obj << Share Chart( 1 ); ``` ### [Share Confidence Interval](#share-confidence-interval) **Syntax:** obj \<< Share Confidence Interval( state=0|1 ) **Description:** Shows or hides the confidence interval for the share response probability. The confidence interval is constructed using Wilson's Score test method. ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); obj = dt << Categorical( X( :Age Group ), Responses( :I am working on my career ) ); obj << Share Confidence Interval( 1 ); ``` ### [Share Of Responses](#share-of-responses) **Syntax:** obj \<< Share Of Responses( state=0|1 ) **Description:** Shows or hides the Share of Responses table in the report. On by default. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ), Share of Responses( 0 ) ); Wait( 1 ); obj << Share of Responses( 1 ); ``` ### [Shares and Rates Format](#shares-and-rates-format) **Syntax:** obj \<< Shares and Rates Format( format, ) **Description:** Formats the Share, Rate, and Rate per Response values in the table. The default value is "Percent", 6, 1. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); Wait( 1 ); obj << Shares and Rates Format( "Percent", 7, 2 ); ``` ### [Shorten Labels](#shorten-labels) **Syntax:** obj = Categorical(...Shorten Labels( state=0|1 )...) **Description:** Shortens labels by removing common prefixes and suffixes. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << New Column( "Age Range", Numeric, "Continuous", Formula( :age > 12 ), Value Labels( {0 = "Age Range: Adolescent", 1 = "Age Range: Teenager"} ) ); obj = dt << Categorical( Responses( :Age Range ), Legend( 0 ) ); Wait( 2 ); obj << Shorten Labels( 1 ); ``` ### [Show Columns Used in Report](#show-columns-used-in-report) **Syntax:** obj \<< Show Columns Used in Report( state=0|1 ) **Description:** Shows or hides Columns Used in Report information. This option affects only columns that have an SPSS or SAS Name or SPSS or SAS Label Column Property. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); :country << Set Property( "SAS Label", "Country of Manufacture Origin" ); obj = Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Show Columns Used in Report( 1 ); ``` ### [Show Highlight Legend](#show-highlight-legend) **Syntax:** obj \<< Show Highlight Legend( state=0|1 ) **Description:** On by default. ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); obj = dt << Categorical( Structured( :Position Tenure + :Age Group, :I am working on my career + :Brush ), Mean Score( 1 ), Highlight Cells( Share >= 0.8 ), Highlight Cells( Mean Score >= 2.7, Color( "Blue" ) ) ); obj << Show Highlight Legend( 0 ); Wait( 1 ); obj << Show Highlight Legend( 1 ); ``` ### [Show Supercategories](#show-supercategories) **Syntax:** obj \<< Show Supercategories( state=0|1 ) **Description:** Shows or hides supercategories. On by default. ``` dt = Open( "$SAMPLE_DATA/Color Preference Survey.jmp" ); obj = dt << Categorical( X( :"What is your gender ? "n, :"How old are you ? "n ), Responses( :I like the color orange. ), Supercategories( :I like the color orange.( {Group( "Positive Response", {"Neutral", "Agree", "Strongly agree"} )} ) ), Legend( 0 ) ); obj << Show Supercategories( 0 ); Wait( 1 ); obj << Show Supercategories( 1 ); ``` ### [Show Warnings](#show-warnings) **Syntax:** obj \<< Show Warnings( state=0|1 ) **Description:** Shows warnings for chi-square tests related to small sample size. ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); obj = dt << Categorical( Structured( :I am working on my career, :Age Group * :Employee Tenure ), Share Chart( 0 ), Test Response Homogeneity( 1 ) ); obj << Show Warnings( 1 ); ``` ### [Std Dev Format](#std-dev-format) **Syntax:** obj \<< Std Dev Format( format, ) **Description:** Formats the standard deviation scores in the table. The default value is "Fixed", 6, 2. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Std Dev Score( 1 ); Wait( 1 ); obj << Std Dev Format( "Fixed", 6, 4 ); ``` ### [Std Dev Score](#std-dev-score) **Syntax:** obj \<< Std Dev Score( state=0|1 ) **Description:** Displays the standard deviation score, based on raw numeric codes or value scores, in the crosstab table ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Std Dev Score( 1 ); ``` ### [Structured](#structured) **Syntax:** obj = Categorical(...Structured( Column * nestedColumn ... + rightColumn, sideColumn + lowerColumns... )...) **Description:** Generates a structured cross tabulation of two or more variables. ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); obj = dt << Categorical( Structured( :Gender * :Age Group + :Position Tenure, :Job Satisfaction + :Salary Group ) ); ``` ### [Supercategories](#supercategories) **Syntax:** obj \<< Supercategories( column, ({Group (name, {level1, level2, ... levelN})}) ) **Description:** Specifies supercategories to locally aggregate response categories. ``` dt = Open( "$SAMPLE_DATA/Color Preference Survey.jmp" ); obj = dt << Categorical( X( :"What is your gender ? "n, :"How old are you ? "n ), Responses( :I like the color orange. ), Supercategories( :I like the color orange.( {Group( "Positive Response", {"Neutral", "Agree", "Strongly agree"} )} ) ), Legend( 0 ) ); ``` ### [Test Response Homogeneity](#test-response-homogeneity) **Syntax:** obj \<< Test Response Homogeneity( state=0|1 ) **Description:** Tests the response column for homogeneity, giving both Likelihood Ratio and Pearson Chi-Squared tests. Available only for a single response. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Test Response Homogeneity( 1 ); ``` ### [Total Cases](#total-cases) **Syntax:** obj \<< Total Cases( state=0|1 ) **Description:** For multiple-response variables, shows the total number of cases in the crosstab table. On by default. ``` dt = Open( "$SAMPLE_DATA/Color Preference Survey.jmp" ); obj = dt << Categorical( X( :"What is your gender ? "n, :"How old are you ? "n ), Multiple Response( :I like the color blue., :I like the color red., :I like the color orange. ) ); obj << Total Cases( 0 ); Wait( 1 ); obj << Total Cases( 1 ); ``` ### [Total Cases Responding](#total-cases-responding) **Syntax:** obj \<< Total Cases Responding( state=0|1 ) **Description:** For multiple-response variables, shows the total number of cases who responded at least once in the crosstab table. On by default. ``` dt = Open( "$SAMPLE_DATA/Color Preference Survey.jmp" ); obj = dt << Categorical( X( :"What is your gender ? "n, :"How old are you ? "n ), Multiple Response( :I like the color blue., :I like the color red., :I like the color orange. ) ); obj << Total Cases Responding( 0 ); Wait( 1 ); obj << Total Cases Responding( 1 ); ``` ### [Total Responses](#total-responses) **Syntax:** obj \<< Total Responses( state=0|1 ) **Description:** Shows the total number of responses in the crosstab table. On by default. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Total Responses( 0 ); Wait( 1 ); obj << Total Responses( 1 ); ``` ### [Totals First](#totals-first) **Syntax:** obj \<< Totals First( state=0|1 ) **Description:** Shows the Response Totals near the top or left of the crosstab, but only if the totals are the same across multiple tables down each column. ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); obj = Categorical( Structured( :Single Status + :School Age Children, :Employee Tenure + :Position Tenure + :Age Group ), Frequencies( 0 ), Totals First( 1 ), Total Responses( 0 ) ); ``` ### [Transition Report](#transition-report) **Syntax:** obj \<< Transition Report( state=0|1 ) **Description:** Shows or hides a report showing how the categories have changed across time. Available only for a Repeated Measures model. On by default. ``` dt = Open( "$SAMPLE_DATA/Prime Minister Ratings.jmp" ); obj = dt << Categorical( Repeated Measures( :First Survey, :Second Survey ), Freq( :Count ) ); obj << Transition Report( 1 ); ``` ### [Transposed Freq Chart](#transposed-freq-chart) **Syntax:** obj \<< Transposed Freq Chart( state=0|1 ) **Description:** Shows or hides a transposed frequency chart that contains a column for each response level and horizontal rows for the different sample levels. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :marital status ), Responses( :country ) ); obj << Transposed Freq Chart( 1 ); ``` ### [Unique Occurrences within ID](#unique-occurrences-within-id) **Syntax:** obj = Categorical(...Unique Occurrences within ID( state=0|1 )...) **Description:** Aligns multiple responses across rows that have the same ID. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure3ID.jmp" ); obj = dt << Categorical( Freq( :N ), Sample Size( :SampleSize ), ID( :ID ), X( :clean, :date ), Unique occurrences within ID( 1 ), Multiple Response by ID( :failure ) ); ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Automatic Recalc](#automatic-recalc) **Syntax:** obj \<< Automatic Recalc( state=0|1 ) **Description:** Redoes the analysis automatically for exclude and data changes. If the Automatic Recalc option is turned on, you should consider using Wait(0) commands to ensure that the exclude and data changes take effect before the recalculation. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Automatic Recalc( 1 ); dt << Select Rows( 5 ) << Exclude( 1 ); ``` ### [Broadcast](#broadcast) **Syntax:** obj \<< Broadcast(message) **Description:** Broadcasts a message to a platform. If return results from individual objects are tables, they are concatenated if possible, and the final format is identical to either the result from the Save Combined Table option in a Table Box or the result from the Concatenate option using a Source column. Other than those, results are stored in a list and returned. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" ); objs = Control Chart Builder( Variables( Subgroup( :DAY ), Y( :DIAMETER ) ), By( :OPERATOR ) ); objs[1] << Broadcast( Save Summaries ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy ByGroup Script](#copy-bygroup-script) **Syntax:** obj \<< Copy ByGroup Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Copy ByGroup Script; ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get ByGroup Script](#get-bygroup-script) **Syntax:** obj \<< Get ByGroup Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); t = obj[1] << Get ByGroup Script; Show( t ); ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Group Platform](#get-group-platform) **Syntax:** obj \<< Get Group Platform **Description:** Return the Group Platform object if this platform is part of a Group. Otherwise, returns Empty(). ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Y( :weight ), X( :height ), By( :sex ) ); group = biv[1] << Get Group Platform; Wait( 1 ); group << Layout( "Arrange in Tabs" ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \<, < \<, < \<, < \< ); **Description:** Creates a JSL script to produce this analysis, and save it as a table property in the data table. You can specify a name for the script. The Append Suffix option appends a numeric suffix to the script name, which differentiates the script from an existing script with the same name. The Prompt option prompts the user to specify a script name. The Replace option replaces an existing script with the same name. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Data Table; ``` ### [Save ByGroup Script to Journal](#save-bygroup-script-to-journal) **Syntax:** obj \<< Save ByGroup Script to Journal **Description:** Create a JSL script to produce this analysis, and add a Button to the journal containing this script. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Journal; ``` ### [Save ByGroup Script to Script Window](#save-bygroup-script-to-script-window) **Syntax:** obj \<< Save ByGroup Script to Script Window **Description:** Create a JSL script to produce this analysis, and append it to the current Script text window. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Script Window; ``` ### [Save Script for All Objects](#save-script-for-all-objects) **Syntax:** obj \<< Save Script for All Objects **Description:** Creates a script for all report objects in the window and appends it to the current Script window. This option is useful when you have multiple reports in the window. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Save Script for All Objects; ``` ### [Save Script for All Objects To Data Table](#save-script-for-all-objects-to-data-table) **Syntax:** obj \<< Save Script for All Objects To Data Table( ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); obj << Save Script to Data Table( "My Analysis", <(... Transform Column(, Formula(), \[Random Seed()\], [Numeric|Character|Expression], [Continuous|Nominal|Ordinal|Unstructured Text], [column properties]) ...) **Description:** Create a transform column in the local context of an object, usually a platform. The transform column is active only for the lifetime of the platform. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Distribution( Transform Column( "age^2", Format( "Fixed Dec", 5, 0 ), Formula( :age * :age ) ), Continuous Distribution( Column( :"age^2"n ) ) ); ``` ### [View Web XML](#view-web-xml) **Syntax:** obj \<< View Web XML **Description:** Returns the XML code that is used to create the interactive HTML report. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); xml = obj << View Web XML; ``` ### [Window View](#window-view) **Syntax:** obj = Categorical(...Window View( "Visible"|"Invisible"|"Private" )...) **Description:** Set the type of the window to be created for the report. By default a Visible report window will be created. An Invisible window will not appear on screen, but is discoverable by functions such as Window(). A Private window responds to most window messages but is not discoverable and must be addressed through the report object ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Window View( "Private" ), Y( :weight ), X( :height ), Fit Line ); eqn = Report( biv )["Linear Fit", Text Edit Box( 1 )] << Get Text; biv << Close Window; New Window( "Bivariate Equation", Outline Box( "Big Class Linear Fit", Text Box( eqn, < ) **Description:** Produces a rectangular grid of cells drawn with one-to-one correspondence to data table values. The cells in the grid are colored by the values in the cells. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); ``` ## [Columns](#columns) ### [By](#by) **Syntax:** obj \<< By( column(s) ) **Description:** Performs a separate analysis for each level of the specified column. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); ``` ### [Grouping](#grouping) **Syntax:** obj \<< Grouping( column(s) ) ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); ``` ### [Label](#label) **Syntax:** obj \<< Label( column(s) ) ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); ``` ### [Response](#response) **Syntax:** obj \<< Response( column(s) ) ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); ``` ### [X](#x) **Syntax:** obj \<< X( column(s) ) ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); ``` ### [Y](#y) **Syntax:** obj \<< Y( column(s) ) ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); ``` ## [Item Messages](#item-messages) ### [Arrange Plots](#arrange-plots) **Syntax:** obj \<< Arrange Plots( number across ) **Description:** Arranges the plots horizontally. Only available when an X variable is present. ``` dt = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj = dt << Cell Plot( Y( :hist0, :hist1, :hist3, :hist5 ), X( :drug ) ); obj << Arrange Plots( 1 ); ``` ### [Center at zero](#center-at-zero) **Syntax:** Cell Plot( Y( columns ), Center at Zero( state=0|1 ) ) **Description:** Centers all the plots at zero. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ), Center at Zero( 1 ) ); ``` ### [Legend](#legend) **Syntax:** obj \<< Legend( state=0|1 ) **Description:** Displays or hides the legend appended to the end of the plot. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); obj << Legend( 1 ); ``` ### [Scale Uniformly](#scale-uniformly) **Syntax:** Cell Plot( Y( columns ), Scale Uniformly( state=0|1 ) ) **Description:** Scales all the plots uniformly. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ), Scale Uniformly( 1 ) ); ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Broadcast](#broadcast) **Syntax:** obj \<< Broadcast(message) **Description:** Broadcasts a message to a platform. If return results from individual objects are tables, they are concatenated if possible, and the final format is identical to either the result from the Save Combined Table option in a Table Box or the result from the Concatenate option using a Source column. Other than those, results are stored in a list and returned. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" ); objs = Control Chart Builder( Variables( Subgroup( :DAY ), Y( :DIAMETER ) ), By( :OPERATOR ) ); objs[1] << Broadcast( Save Summaries ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy ByGroup Script](#copy-bygroup-script) **Syntax:** obj \<< Copy ByGroup Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Copy ByGroup Script; ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get ByGroup Script](#get-bygroup-script) **Syntax:** obj \<< Get ByGroup Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); t = obj[1] << Get ByGroup Script; Show( t ); ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Group Platform](#get-group-platform) **Syntax:** obj \<< Get Group Platform **Description:** Return the Group Platform object if this platform is part of a Group. Otherwise, returns Empty(). ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Y( :weight ), X( :height ), By( :sex ) ); group = biv[1] << Get Group Platform; Wait( 1 ); group << Layout( "Arrange in Tabs" ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \<, < \<, < \<, < \< ); **Description:** Creates a JSL script to produce this analysis, and save it as a table property in the data table. You can specify a name for the script. The Append Suffix option appends a numeric suffix to the script name, which differentiates the script from an existing script with the same name. The Prompt option prompts the user to specify a script name. The Replace option replaces an existing script with the same name. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Data Table; ``` ### [Save ByGroup Script to Journal](#save-bygroup-script-to-journal) **Syntax:** obj \<< Save ByGroup Script to Journal **Description:** Create a JSL script to produce this analysis, and add a Button to the journal containing this script. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Journal; ``` ### [Save ByGroup Script to Script Window](#save-bygroup-script-to-script-window) **Syntax:** obj \<< Save ByGroup Script to Script Window **Description:** Create a JSL script to produce this analysis, and append it to the current Script text window. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Script Window; ``` ### [Save Script for All Objects](#save-script-for-all-objects) **Syntax:** obj \<< Save Script for All Objects **Description:** Creates a script for all report objects in the window and appends it to the current Script window. This option is useful when you have multiple reports in the window. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); obj << Save Script for All Objects; ``` ### [Save Script for All Objects To Data Table](#save-script-for-all-objects-to-data-table) **Syntax:** obj \<< Save Script for All Objects To Data Table( ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); obj << Save Script to Data Table( "My Analysis", <(... Transform Column(, Formula(), \[Random Seed()\], [Numeric|Character|Expression], [Continuous|Nominal|Ordinal|Unstructured Text], [column properties]) ...) **Description:** Create a transform column in the local context of an object, usually a platform. The transform column is active only for the lifetime of the platform. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Distribution( Transform Column( "age^2", Format( "Fixed Dec", 5, 0 ), Formula( :age * :age ) ), Continuous Distribution( Column( :"age^2"n ) ) ); ``` ### [View Web XML](#view-web-xml) **Syntax:** obj \<< View Web XML **Description:** Returns the XML code that is used to create the interactive HTML report. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); xml = obj << View Web XML; ``` ### [Window View](#window-view) **Syntax:** obj = Cell Plot(...Window View( "Visible"|"Invisible"|"Private" )...) **Description:** Set the type of the window to be created for the report. By default a Visible report window will be created. An Invisible window will not appear on screen, but is discoverable by functions such as Window(). A Private window responds to most window messages but is not discoverable and must be addressed through the report object ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Window View( "Private" ), Y( :weight ), X( :height ), Fit Line ); eqn = Report( biv )["Linear Fit", Text Edit Box( 1 )] << Get Text; biv << Close Window; New Window( "Bivariate Equation", Outline Box( "Big Class Linear Fit", Text Box( eqn, <, \, \, \, \, \, \, \, \ ) **Description:** Models data from a choice experiment that studies customer preferences. Estimates the probability that a specific configuration is preferred using a form of conditional logistic regression. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Pizza Combined.jmp" ); obj = Choice( One Table( 1 ), Profile DataTable( dt ), Profile ID( :Indicator ), Profile Effects( :Crust, :Cheese, :Topping ), Profile Grouping( :Subject, :Trial ) ); ``` ## [Columns](#columns) ### [Choice Set ID](#choice-set-id) **Syntax:** Choice( Choice Set ID( column ), ... ) **Description:** A column that identifies the choice set that was presented to the subject for a given preference determination in the one data table situation. ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); ``` ### [Profile Effects](#profile-effects) **Syntax:** obj = Choice(...\...) **Description:** One or more columns that contain the effect or factor values in the profile data table. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); ``` ### [Profile Grouping](#profile-grouping) **Syntax:** Choice( Profile Grouping( column(s) ), ... ) **Description:** A column which, when used with the Profile ID column, uniquely designates each choice set. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); ``` ### [Profile ID](#profile-id) **Syntax:** Choice( Profile ID( column ), ... ) **Description:** A column that contains the ID in the profile data table. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); ``` ### [Response Freq](#response-freq) **Syntax:** Choice( Response Freq( column ), ... ) **Description:** Specifies a column whose values assign a frequency to each row for the analysis. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); ``` ### [Response Grouping](#response-grouping) **Syntax:** Choice( Response Grouping( column(s) ), ... ) **Description:** A column which, when used with the Profile ID Chosen column, uniquely designates each choice set. ``` Open( "$Sample_Data/Laptop Profile.jmp" ); Open( "$Sample_Data/Laptop Runs.jmp" ); Choice( Response Data Table( Data Table( "Laptop Runs" ) ), Profile DataTable( Data Table( "Laptop Profile" ) ), Response Grouping( :Survey, :Choice Set ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :Choice ID ), Profile Grouping( :Survey, :Choice Set ), Profile Effects( :Hard Disk, :Speed, :Battery Life, :Price ), "Firth Bias-Adjusted Estimates"n( 1 ), Response Profile ID Chosen( :Response ), Likelihood Ratio Tests( 1 ), Willingness to Pay( Hard Disk( Feature Factor, "40 GB" ), Speed( Feature Factor, "1.5 GHz" ), Battery Life( Feature Factor, "4 hours" ), Price( Price Factor, 1000 ) ) ); ``` ### [Response Profile ID Choices](#response-profile-id-choices) **Syntax:** Choice( Response Profile ID Choice( columns ), ... ) **Description:** At least two columns that contain the possible choices available as responses. **Choice Example** ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt3 = Open( "$SAMPLE_DATA/Pizza Subjects.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Subject DataTable( dt3 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), Subject Subject ID( :Subject ), Subject Effects( :Gender ) ); ``` **MaxDiff Example** ``` dt1 = Open( "$SAMPLE_DATA/Potato Chip Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Potato Chip Responses.jmp" ); dt3 = Open( "$SAMPLE_DATA/Potato Chip Subjects.jmp" ); obj = MaxDiff( Response Data Table( dt2 ), Profile DataTable( dt1 ), Subject DataTable( dt3 ), Response Subject ID( :Respondent ), Response Profile ID Choices( :Choice 1, :Choice 2, :Choice 3 ), Profile ID( :Profile ID ), Profile Effects( :Flavor ), Subject Subject ID( :Respondent ), Subject Effects( :Citizenship, :Gender ), Response Best Option( :Best Profile ), Response Worst Option( :Worst Profile ) ); ``` ### [Response Profile ID Chosen](#response-profile-id-chosen) **Syntax:** Choice( Response Profile ID Chosen( column ), ... ) **Description:** A column that contains the profile ID that represents the subject's selected profile. ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt3 = Open( "$SAMPLE_DATA/Pizza Subjects.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Subject DataTable( dt3 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), Subject Subject ID( :Subject ), Subject Effects( :Gender ) ); ``` ### [Response Subject ID](#response-subject-id) **Syntax:** Choice( Response Subject ID( column ), ... ) **Description:** A column that identifies the study participant in the response data table. **Choice Example** ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt3 = Open( "$SAMPLE_DATA/Pizza Subjects.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Subject DataTable( dt3 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), Subject Subject ID( :Subject ), Subject Effects( :Gender ) ); ``` **MaxDiff Example** ``` dt1 = Open( "$SAMPLE_DATA/Potato Chip Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Potato Chip Responses.jmp" ); dt3 = Open( "$SAMPLE_DATA/Potato Chip Subjects.jmp" ); obj = MaxDiff( Response Data Table( dt2 ), Profile DataTable( dt1 ), Subject DataTable( dt3 ), Response Subject ID( :Respondent ), Response Profile ID Choices( :Choice 1, :Choice 2, :Choice 3 ), Profile ID( :Profile ID ), Profile Effects( :Flavor ), Subject Subject ID( :Respondent ), Subject Effects( :Citizenship, :Gender ), Response Best Option( :Best Profile ), Response Worst Option( :Worst Profile ) ); ``` ### [Response Weight](#response-weight) **Syntax:** Choice( Response Weight( column ), ... ) **Description:** Specifies a column whose values assign a weight to each row for the analysis. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); ``` ### [Subject Effects](#subject-effects) **Syntax:** obj = Choice(...\...) **Description:** One or more columns that contain the effect or factor values in the subject data table. **Choice Example** ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt3 = Open( "$SAMPLE_DATA/Pizza Subjects.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Subject DataTable( dt3 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), Subject Subject ID( :Subject ), Subject Effects( :Gender ) ); ``` **MaxDiff Example** ``` dt1 = Open( "$SAMPLE_DATA/Potato Chip Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Potato Chip Responses.jmp" ); dt3 = Open( "$SAMPLE_DATA/Potato Chip Subjects.jmp" ); obj = MaxDiff( Response Data Table( dt2 ), Profile DataTable( dt1 ), Subject DataTable( dt3 ), Response Subject ID( :Respondent ), Response Profile ID Choices( :Choice 1, :Choice 2, :Choice 3 ), Profile ID( :Profile ID ), Profile Effects( :Flavor ), Subject Subject ID( :Respondent ), Subject Effects( :Citizenship, :Gender ), Response Best Option( :Best Profile ), Response Worst Option( :Worst Profile ) ); ``` ### [Subject ID](#subject-id) **Syntax:** Choice( Subject ID( column ), ... ) **Description:** A column that identifies the study participant in the subject data table or in the one data table situation. ``` dt = Open( "$SAMPLE_DATA/Pizza Combined.jmp" ); obj = Choice( One Table( 1 ), Subject ID( :Subject ), Choice Set ID( :Trial ), Profile ID( :Indicator ), Profile Effects( :Crust, :Cheese, :Topping ) ); ``` ### [Subject Subject ID](#subject-subject-id) **Syntax:** Choice( Subject Subject ID( column ), ... ) **Description:** A column that identifies the study participant in the subject data table. **Choice Example** ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt3 = Open( "$SAMPLE_DATA/Pizza Subjects.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Subject DataTable( dt3 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), Subject Subject ID( :Subject ), Subject Effects( :Gender ) ); ``` **MaxDiff Example** ``` dt1 = Open( "$SAMPLE_DATA/Potato Chip Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Potato Chip Responses.jmp" ); dt3 = Open( "$SAMPLE_DATA/Potato Chip Subjects.jmp" ); obj = MaxDiff( Response Data Table( dt2 ), Profile DataTable( dt1 ), Subject DataTable( dt3 ), Response Subject ID( :Respondent ), Response Profile ID Choices( :Choice 1, :Choice 2, :Choice 3 ), Profile ID( :Profile ID ), Profile Effects( :Flavor ), Subject Subject ID( :Respondent ), Subject Effects( :Citizenship, :Gender ), Response Best Option( :Best Profile ), Response Worst Option( :Worst Profile ) ); ``` ## [Item Messages](#item-messages) ### [Comparisons](#comparisons) **Syntax:** obj \<< Comparisons( {term1(value1a),term2(value2a),...},{term1(value1b),term2(value2b),...} ) **Description:** Performs comparisons between specific alternative choice profiles. Enables you to specify the factors and the values that you want to compare. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Comparisons( {Crust( "Thick" ), Cheese( "Jack" ), Topping( "Pepperoni" )}, {Crust( "Thin" ), Cheese( "Mozzarella" ), Topping( "None" )} ); ``` ### [Confidence Intervals](#confidence-intervals) **Syntax:** obj \<< Confidence Intervals( state=0|1, ) **Description:** Shows or hides (1-alpha)% confidence intervals for each parameter in the Parameter Estimates report. ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Confidence Intervals( 1, 0.01 ); ``` ### [Confidence Limits](#confidence-limits) **Syntax:** obj \<< Confidence Limits( state=0|1, ) **Description:** Shows or hides confidence limits for each parameter in the Bayesian Parameter Estimates report. The limits are constructed based on the 2.5 and 97.5 quantiles of the posterior distribution. **JMP Version Added:** 14 ### [Convergence Criterion](#convergence-criterion) **Syntax:** obj = Choice(...Convergence Criterion( number )...) **Description:** Sets the acceptable criterion for convergence when estimating the parameters. ### [Correlation of Estimates](#correlation-of-estimates) **Syntax:** obj \<< Correlation of Estimates( state=0|1 ) **Description:** Shows or hides the correlation matrix for the parameter estimates. ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Correlation of Estimates( 1 ); ``` ### [Effect Marginals](#effect-marginals) **Syntax:** obj \<< Effect Marginals( state=0|1 ) **Description:** Shows or hides marginal probabilities and marginal utilities for each main effect in the model. The marginal probability is the probability that an individual selects attribute A over B with all other attributes set to their mean or default levels. ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Effect Marginals( 1 ); ``` ### [Firth Bias-Adjusted Estimates](#firth-bias-adjusted-estimates) **Syntax:** obj = Choice(...Firth Bias-Adjusted Estimates( state=0|1 )...) **Description:** Computes bias-corrected maximum likelihood estimates (MLEs) that produce better estimates and tests than MLEs without bias correction. These estimates also improve separation problems that tend to occur in logistic models. On by default. **Choice Example** ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); ``` **MaxDiff Example** ``` dt1 = Open( "$SAMPLE_DATA/Potato Chip Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Potato Chip Responses.jmp" ); obj = MaxDiff( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Subject ID( :Respondent ), Response Profile ID Choices( :Choice 1, :Choice 2, :Choice 3 ), Profile ID( :Profile ID ), Profile Effects( :Flavor ), Response Best Option( :Best Profile ), Response Worst Option( :Worst Profile ) ); Report( obj )["Parameter Estimates"] << Close( 0 ); ``` ### [Hierarchical Bayes](#hierarchical-bayes) **Syntax:** obj = Choice(...Hierarchical Bayes( state=0|1 )...) **Description:** Uses a Bayesian approach to estimate subject-specific parameters. ### [Joint Factor Tests](#joint-factor-tests) **Syntax:** obj \<< Joint Factor Tests( state=0|1 ) **Description:** Tests each factor in the model by constructing a likelihood ratio test for all the effects involving that factor. Subject Data Table is required for this option when an interaction is not present in the model. ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt3 = Open( "$SAMPLE_DATA/Pizza Subjects.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Subject DataTable( dt3 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), Subject Subject ID( :Subject ), Subject Effects( :Gender ) ); obj << Joint Factor Tests( 1 ); ``` ### [Likelihood Ratio Tests](#likelihood-ratio-tests) **Syntax:** obj \<< Likelihood Ratio Tests( state=0|1 ) **Description:** Performs likelihood ratio tests for each effect in the model. On by default for models that converge in less than five seconds. ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Likelihood Ratio Tests( 1 ); ``` ### [Model Dialog](#model-dialog) **Syntax:** obj \<< Model Dialog **Description:** Opens the Model Dialog window. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Model Dialog; ``` ### [Multiple Choice Profiler](#multiple-choice-profiler) **Syntax:** obj \<< Multiple Choice Profiler( state=0|1, N Choices( number ) ) **Description:** Shows or hides a specified number of prediction profilers. This enables you to compare the prediction probabilities across alternative sets of choices. ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Multiple Choice Profiler( 1, N Choices( 3 ) ); ``` ### [Number of Bayesian Iterations](#number-of-bayesian-iterations) **Syntax:** obj = Choice(...Number of Bayesian Iterations( number )...) ### [Number of Burn In Iterations](#number-of-burn-in-iterations) **Syntax:** obj \<< Number of Burn In Iterations( number ) ### [One Table](#one-table) **Syntax:** obj = Choice(...One Table...) **Description:** Specifies that the data are in stacked format in one data table. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); ``` ### [Probability Profiler](#probability-profiler) **Syntax:** obj \<< Probability Profiler( state=0|1 ) **Description:** Shows or hides a prediction profiler of the probability of the current choice compared to a reference set. ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Probability Profiler( 1 ); ``` ### [Profile DataTable](#profile-datatable) **Syntax:** Choice( Profile Data Table( table ), ... ) **Description:** Identifies the profile data table. **Choice Example** ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); ``` **MaxDiff Example** ``` dt1 = Open( "$SAMPLE_DATA/Potato Chip Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Potato Chip Responses.jmp" ); obj = MaxDiff( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Subject ID( :Respondent ), Response Profile ID Choices( :Choice 1, :Choice 2, :Choice 3 ), Profile ID( :Profile ID ), Profile Effects( :Flavor ), Response Best Option( :Best Profile ), Response Worst Option( :Worst Profile ) ); ``` ### [Remove Subject Effects](#remove-subject-effects) **Syntax:** obj = Choice(...Remove Subject Effects...) ### [Respondents Are Allowed to Choose None](#respondents-are-allowed-to-choose-none) **Syntax:** Choice( Respondents Are Allowed to Choose None( state=0|1 ), ... ) **Description:** Specifies that a No Choice Indicator be included in the model for response rows that contain missing values. ``` dt = Open( "$SAMPLE_DATA/Pizza Combined No Choice.jmp" ); obj = Choice( One Table( 1 ), Response Subject ID( :Subject ), Profile ID( :Indicator ), Profile Grouping( :Subject, :Trial ), Profile Effects( :Crust, :Cheese, :Topping ), "Firth Bias-adjusted Estimates"n( 1 ), Respondents Are Allowed to Choose None( 1 ), Likelihood Ratio Tests( 1 ) ); ``` ### [Response Data Table](#response-data-table) **Syntax:** Choice( Response Data Table( table ), ... ) **Description:** Identifies the response data table. **Choice Example** ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); ``` **MaxDiff Example** ``` dt1 = Open( "$SAMPLE_DATA/Potato Chip Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Potato Chip Responses.jmp" ); obj = MaxDiff( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Subject ID( :Respondent ), Response Profile ID Choices( :Choice 1, :Choice 2, :Choice 3 ), Profile ID( :Profile ID ), Profile Effects( :Flavor ), Response Best Option( :Best Profile ), Response Worst Option( :Worst Profile ) ); ``` ### [Save Bayes Chain](#save-bayes-chain) **Syntax:** obj \<< Save Bayes Chain ### [Save Gradients by Subject](#save-gradients-by-subject) **Syntax:** obj \<< Save Gradients by Subject **Description:** Creates a new table with a row for each subject containing the average steps on each parameter. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Save Gradients by Subject; ``` ### [Save Subject Estimates](#save-subject-estimates) **Syntax:** obj \<< Save Subject Estimates ### [Save Utility Formula](#save-utility-formula) **Syntax:** obj \<< Save Utility Formula **Description:** Creates a new column in the profile data table with a formula for the linear model that is estimated. ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Save Utility Formula; ``` ### [Show MLE Parameter Estimates](#show-mle-parameter-estimates) **Syntax:** obj \<< Show MLE Parameter Estimates( state=0|1 ) **Description:** Shows maximum likelihood estimates with Bayes parameter estimates. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), Hierarchical Bayes( 1 ) ); obj << Show MLE Parameter Estimates( 1 ); ``` ### [Subject DataTable](#subject-datatable) **Syntax:** Choice( Subject Data Table( table ), ... ) **Description:** Identifies the subject data table. **Choice Example** ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt3 = Open( "$SAMPLE_DATA/Pizza Subjects.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Subject DataTable( dt3 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), Subject Subject ID( :Subject ), Subject Effects( :Gender ) ); ``` **MaxDiff Example** ``` dt1 = Open( "$SAMPLE_DATA/Potato Chip Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Potato Chip Responses.jmp" ); dt3 = Open( "$SAMPLE_DATA/Potato Chip Subjects.jmp" ); obj = MaxDiff( Response Data Table( dt2 ), Profile DataTable( dt1 ), Subject DataTable( dt3 ), Response Subject ID( :Respondent ), Response Profile ID Choices( :Choice 1, :Choice 2, :Choice 3 ), Profile ID( :Profile ID ), Profile Effects( :Flavor ), Subject Subject ID( :Respondent ), Subject Effects( :Citizenship, :Gender ), Response Best Option( :Best Profile ), Response Worst Option( :Worst Profile ) ); ``` ### [Use Adaptive Bayes](#use-adaptive-bayes) **Syntax:** obj \<< Use Adaptive Bayes( state=0|1 ) ### [Utility Profiler](#utility-profiler) **Syntax:** obj \<< Utility Profiler( state=0|1 ) **Description:** Shows or hides the predicted utility for different factor settings. The utility is the value predicted by the linear model. ``` dt1 = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Utility Profiler( 1 ); ``` ### [Willingness to Pay](#willingness-to-pay) **Syntax:** obj \<< Willingness to Pay **Description:** Requires that your model includes a continuous price column. Calculates the maximum price increase (decrease) that a customer is willing to pay for a new feature over the baseline feature cost. The result is calculated using the Baseline settings for each background setting. ``` dt1 = Open( "$SAMPLE_DATA/Laptop Profile.jmp" ); dt2 = Open( "$SAMPLE_DATA/Laptop Runs.jmp" ); Choice( Response Data Table( dt2 ), Profile DataTable( dt1 ), Response Grouping( :Survey, :Choice Set ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :Choice ID ), Profile Grouping( :Survey, :Choice Set ), Profile Effects( :Hard Disk, :Speed, :Battery Life, :Price ), "Firth Bias-Adjusted Estimates"n( 1 ), Response Profile ID Chosen( :Response ), Likelihood Ratio Tests( 1 ), Willingness to Pay( Hard Disk( Feature Factor, "40 GB" ), Speed( Feature Factor, "1.5 GHz" ), Battery Life( Feature Factor, "4 hours" ), Price( Price Factor, 1000 ) ) ); ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Broadcast](#broadcast) **Syntax:** obj \<< Broadcast(message) **Description:** Broadcasts a message to a platform. If return results from individual objects are tables, they are concatenated if possible, and the final format is identical to either the result from the Save Combined Table option in a Table Box or the result from the Concatenate option using a Source column. Other than those, results are stored in a list and returned. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" ); objs = Control Chart Builder( Variables( Subgroup( :DAY ), Y( :DIAMETER ) ), By( :OPERATOR ) ); objs[1] << Broadcast( Save Summaries ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy ByGroup Script](#copy-bygroup-script) **Syntax:** obj \<< Copy ByGroup Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Copy ByGroup Script; ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get ByGroup Script](#get-bygroup-script) **Syntax:** obj \<< Get ByGroup Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); t = obj[1] << Get ByGroup Script; Show( t ); ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Group Platform](#get-group-platform) **Syntax:** obj \<< Get Group Platform **Description:** Return the Group Platform object if this platform is part of a Group. Otherwise, returns Empty(). ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Y( :weight ), X( :height ), By( :sex ) ); group = biv[1] << Get Group Platform; Wait( 1 ); group << Layout( "Arrange in Tabs" ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \<, < \<, < \<, < \< ); **Description:** Creates a JSL script to produce this analysis, and save it as a table property in the data table. You can specify a name for the script. The Append Suffix option appends a numeric suffix to the script name, which differentiates the script from an existing script with the same name. The Prompt option prompts the user to specify a script name. The Replace option replaces an existing script with the same name. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Data Table; ``` ### [Save ByGroup Script to Journal](#save-bygroup-script-to-journal) **Syntax:** obj \<< Save ByGroup Script to Journal **Description:** Create a JSL script to produce this analysis, and add a Button to the journal containing this script. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Journal; ``` ### [Save ByGroup Script to Script Window](#save-bygroup-script-to-script-window) **Syntax:** obj \<< Save ByGroup Script to Script Window **Description:** Create a JSL script to produce this analysis, and append it to the current Script text window. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Script Window; ``` ### [Save Script for All Objects](#save-script-for-all-objects) **Syntax:** obj \<< Save Script for All Objects **Description:** Creates a script for all report objects in the window and appends it to the current Script window. This option is useful when you have multiple reports in the window. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Save Script for All Objects; ``` ### [Save Script for All Objects To Data Table](#save-script-for-all-objects-to-data-table) **Syntax:** obj \<< Save Script for All Objects To Data Table( ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); obj << Save Script to Data Table( "My Analysis", <(... Transform Column(, Formula(), \[Random Seed()\], [Numeric|Character|Expression], [Continuous|Nominal|Ordinal|Unstructured Text], [column properties]) ...) **Description:** Create a transform column in the local context of an object, usually a platform. The transform column is active only for the lifetime of the platform. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Distribution( Transform Column( "age^2", Format( "Fixed Dec", 5, 0 ), Formula( :age * :age ) ), Continuous Distribution( Column( :"age^2"n ) ) ); ``` ### [View Web XML](#view-web-xml) **Syntax:** obj \<< View Web XML **Description:** Returns the XML code that is used to create the interactive HTML report. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); xml = obj << View Web XML; ``` ### [Window View](#window-view) **Syntax:** obj = Choice(...Window View( "Visible"|"Invisible"|"Private" )...) **Description:** Set the type of the window to be created for the report. By default a Visible report window will be created. An Invisible window will not appear on screen, but is discoverable by functions such as Window(). A Private window responds to most window messages but is not discoverable and must be addressed through the report object ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Window View( "Private" ), Y( :weight ), X( :height ), Fit Line ); eqn = Report( biv )["Linear Fit", Text Edit Box( 1 )] << Get Text; biv << Close Window; New Window( "Bivariate Equation", Outline Box( "Big Class Linear Fit", Text Box( eqn, <, \, { method *| member* | function\* } ) **Description:** Creates a class where all class methods and class variables created are defined only within the specified class name. ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); ``` ## [Item Messages](#item-messages) ### [Clone](#clone) **Syntax:** obj \<< Clone **Description:** Clone the contents of a class reference making a new object **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); nclref = clref << Clone; Show( clref << Equal( nclref ) ); Show( clref == nclref ); ``` ### [Contains](#contains) **Syntax:** obj \<< Contains( string ) **Description:** Returns a 1 if the class contains the specified string expression, or a 0 otherwise. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); result = clref << Contains( "nObs" ); ``` ### [Delete Class](#delete-class) **Syntax:** clref \<< Delete Class( < Force( boolean ) > ) **Description:** Deletes this class. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); clref << Delete Class; Show( clref ); ``` ### [Equal](#equal) **Syntax:** obj \<< Equal( classref ) **Description:** Compare the class reference argument to the target class reference for equality **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); nclref = New Object( Test() ); Show( clref << Equal( nclref ) ); nclref:nObs = 50; Show( clref << Equal( nclref ) ); ``` ### [First](#first) **Syntax:** obj \<< First **Description:** Returns the string expression for the first item in this class. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); result = clref << First; ``` ### [Get Contents](#get-contents) **Syntax:** obj \<< Get Contents **Description:** Returns a list of items within this class. Each element is a two-item list containing a key and its associated value. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); result = clref << Get Contents; ``` ### [Get Keys](#get-keys) **Syntax:** obj \<< Get Keys **Description:** Returns a list of keys within this class. Each key is a string representation of an individual item contained in the class. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); result = clref << Get Keys; ``` ### [Get Name](#get-name) **Syntax:** obj \<< Get Name **Description:** Returns the name of this class. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); class name = clref << Get Name; ``` ### [Get Value](#get-value) **Syntax:** obj \<< Get Value( string ) **Description:** Returns the value of the specified item within this class. The "string" is the key to the item. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); result = clref << Get Value( "nObs" ); ``` ### [Get Values](#get-values) **Syntax:** obj \<< Get Values **Description:** Returns a list of values corresponding to each item within this class. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); result = clref << Get Values; ``` ### [Insert](#insert) **Syntax:** obj \<< Insert( string, value ) **Description:** Inserts a string expression with the specified value into this class. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); clref << Insert( "X", 25 ); Show( clref ); ``` ### [Lock Class](#lock-class) **Syntax:** obj \<< Lock Class( \\* ) **Description:** Locks all method members or specified named members in this class and prevents them from being added, changed, or removed. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); clref << Lock Class; Try( clref:nObs = 40, "clref is locked." ); ``` ### [N Items](#n-items) **Syntax:** obj \<< N Items **Description:** Returns the number of items contains in this class. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); n = clref << N Items; ``` ### [Next](#next) **Syntax:** obj \<< Next( string ) **Description:** Returns the string expression for the next item following the key specified in this class. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); result = clref << Next( "addition" ); ``` ### [Remove](#remove) **Syntax:** obj \<< Remove( \\* ) **Description:** Removes the specified string expression from the class. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); clref << Remove( "nObs" ); Show( clref ); ``` ### [Show Contents](#show-contents) **Syntax:** obj \<< Show Contents **Description:** Shows the contents of a class in the JMP log. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); result = clref << Show Contents; ``` ### [Unlock Class](#unlock-class) **Syntax:** obj \<< Unlock Class( \\* ) **Description:** Unlocks a locked class containing method members that were prevented from being added, changed, or removed. **JMP Version Added:** 14 ``` Define Class( "Test", nObs = 20; addition = Method( {x, y}, (x + y) * nObs ); append = Method( {a, b}, Char( a ) || " + " || Char( b ) ); ); clref = New Object( Test() ); clref << Lock Class( "nObs" ); Try( clref:nObs = 30, Show( "clref is locked." ) ); //Try again after unlocking. clref << Unlock Class( "nObs" ); Try( clref:nObs = 40, Show( "clref is locked." ) ); ``` # [Cluster Variables](#cluster-variables) ## [Associated Constructors](#associated-constructors) ### [Cluster Variables](#cluster-variables_1) **Syntax:** Cluster Variables( Y( columns ) ) **Description:** Clusters variables (columns) into groups that can be represented by a single component or variable. Cluster variables can be used as a dimension reduction technique. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); ``` ## [Columns](#columns) ### [By](#by) **Syntax:** obj = Cluster Variables(...\...) **Description:** Performs a separate analysis for each level of the specified column. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); ``` ### [Freq](#freq) **Syntax:** obj = Cluster Variables(...\...) **Description:** Specifies a column whose values assign a frequency to each row for the analysis. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << New Column( "_freqcol", Numeric, Continuous, Set Each Value( Random Integer( 1, 5 ) ) ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ), Freq( :_freqcol ) ); ``` ### [Weight](#weight) **Syntax:** obj = Cluster Variables(...\...) **Description:** Specifies a column whose values assign a weight to each row for the analysis. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << New Column( "_weightcol", Numeric, Continuous, Set Each Value( Random Beta( 1, 1 ) ) ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ), Weight( :_weightcol ) ); ``` ### [Y](#y) **Syntax:** obj = Cluster Variables(...Y( column(s) )...) **Description:** Specifies the variables to be clustered. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); ``` ## [Item Messages](#item-messages) ### [Cluster Components](#cluster-components) **Syntax:** obj \<< Cluster Components( state=0|1 ) **Description:** Shows or hides the Standardized Components report, which contains the eigenvectors of the first principal component within each cluster. On by default. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); obj << Cluster Components( 1 ); ``` ### [Cluster Members](#cluster-members) **Syntax:** obj \<< Cluster Members( state=0|1 ) **Description:** Shows or hides a report of the variables in each cluster. On by default. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); obj << Cluster Members( 1 ); ``` ### [Cluster Summary](#cluster-summary) **Syntax:** obj \<< Cluster Summary( state=0|1 ) **Description:** Shows or hides a report that summarizes the results of variable clustering. On by default. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); obj << Cluster Summary( 1 ); ``` ### [Color Map on Correlations](#color-map-on-correlations) **Syntax:** obj \<< Color Map on Correlations( state=0|1 ) **Description:** Shows or hides a color map of the correlations between variables, where the variables are arranged so that members of the same cluster are adjacent in the plot. On by default. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); obj << Color Map On Correlations( 1 ); ``` ### [Launch Fit Model](#launch-fit-model) **Syntax:** obj \<< Launch Fit Model **Description:** Launches Fit Model with the Most Representative variables as predictors. Select Save Cluster Components first if you want to use these as predictors. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); obj << Launch Fit Model; ``` ### [Save Cluster Components](#save-cluster-components) **Syntax:** obj \<< Save Cluster Components **Description:** Saves the cluster (first principal) component for each cluster to the data table. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); obj << Save Cluster Components; ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Automatic Recalc](#automatic-recalc) **Syntax:** obj \<< Automatic Recalc( state=0|1 ) **Description:** Redoes the analysis automatically for exclude and data changes. If the Automatic Recalc option is turned on, you should consider using Wait(0) commands to ensure that the exclude and data changes take effect before the recalculation. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); obj << Automatic Recalc( 1 ); dt << Select Rows( 5 ) << Exclude( 1 ); ``` ### [Broadcast](#broadcast) **Syntax:** obj \<< Broadcast(message) **Description:** Broadcasts a message to a platform. If return results from individual objects are tables, they are concatenated if possible, and the final format is identical to either the result from the Save Combined Table option in a Table Box or the result from the Concatenate option using a Source column. Other than those, results are stored in a list and returned. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" ); objs = Control Chart Builder( Variables( Subgroup( :DAY ), Y( :DIAMETER ) ), By( :OPERATOR ) ); objs[1] << Broadcast( Save Summaries ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy ByGroup Script](#copy-bygroup-script) **Syntax:** obj \<< Copy ByGroup Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Copy ByGroup Script; ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get ByGroup Script](#get-bygroup-script) **Syntax:** obj \<< Get ByGroup Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); t = obj[1] << Get ByGroup Script; Show( t ); ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Group Platform](#get-group-platform) **Syntax:** obj \<< Get Group Platform **Description:** Return the Group Platform object if this platform is part of a Group. Otherwise, returns Empty(). ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Y( :weight ), X( :height ), By( :sex ) ); group = biv[1] << Get Group Platform; Wait( 1 ); group << Layout( "Arrange in Tabs" ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \<, < \<, < \<, < \< ); **Description:** Creates a JSL script to produce this analysis, and save it as a table property in the data table. You can specify a name for the script. The Append Suffix option appends a numeric suffix to the script name, which differentiates the script from an existing script with the same name. The Prompt option prompts the user to specify a script name. The Replace option replaces an existing script with the same name. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Data Table; ``` ### [Save ByGroup Script to Journal](#save-bygroup-script-to-journal) **Syntax:** obj \<< Save ByGroup Script to Journal **Description:** Create a JSL script to produce this analysis, and add a Button to the journal containing this script. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Journal; ``` ### [Save ByGroup Script to Script Window](#save-bygroup-script-to-script-window) **Syntax:** obj \<< Save ByGroup Script to Script Window **Description:** Create a JSL script to produce this analysis, and append it to the current Script text window. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Script Window; ``` ### [Save Script for All Objects](#save-script-for-all-objects) **Syntax:** obj \<< Save Script for All Objects **Description:** Creates a script for all report objects in the window and appends it to the current Script window. This option is useful when you have multiple reports in the window. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); obj << Save Script for All Objects; ``` ### [Save Script for All Objects To Data Table](#save-script-for-all-objects-to-data-table) **Syntax:** obj \<< Save Script for All Objects To Data Table( ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); obj << Save Script to Data Table( "My Analysis", <(... Transform Column(, Formula(), \[Random Seed()\], [Numeric|Character|Expression], [Continuous|Nominal|Ordinal|Unstructured Text], [column properties]) ...) **Description:** Create a transform column in the local context of an object, usually a platform. The transform column is active only for the lifetime of the platform. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Distribution( Transform Column( "age^2", Format( "Fixed Dec", 5, 0 ), Formula( :age * :age ) ), Continuous Distribution( Column( :"age^2"n ) ) ); ``` ### [View Web XML](#view-web-xml) **Syntax:** obj \<< View Web XML **Description:** Returns the XML code that is used to create the interactive HTML report. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); xml = obj << View Web XML; ``` ### [Window View](#window-view) **Syntax:** obj = Cluster Variables(...Window View( "Visible"|"Invisible"|"Private" )...) **Description:** Set the type of the window to be created for the report. By default a Visible report window will be created. An Invisible window will not appear on screen, but is discoverable by functions such as Window(). A Private window responds to most window messages but is not discoverable and must be addressed through the report object ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Window View( "Private" ), Y( :weight ), X( :height ), Fit Line ); eqn = Report( biv )["Linear Fit", Text Edit Box( 1 )] << Get Text; biv << Close Window; New Window( "Bivariate Equation", Outline Box( "Big Class Linear Fit", Text Box( eqn, <...) **Description:** For stacked data, this identifies attributes, which would be columns (variables) if the data was not stacked. ### [Freq](#freq) **Syntax:** obj \<< Freq( column ) **Description:** Specifies a column whose values assign a frequency to each row for the analysis. ### [Label](#label) **Syntax:** obj \<< Label( column ) ### [Object ID](#object-id) **Syntax:** obj = Y(...\...) **Description:** For stacked data, this identifies individuals to cluster. Otherwise, it is used to aggregate across each rows of a data. ### [Ordering](#ordering) **Syntax:** obj \<< Ordering( column ) ### [Weight](#weight) **Syntax:** obj \<< Weight( column ) **Description:** Specifies a column whose values assign a weight to each row for the analysis. ### [Y](#y) **Syntax:** obj \<< Y( column(s) ) ## [Hierarchical Cluster](#hierarchical-cluster) ### [Associated Constructors](#associated-constructors) #### [Hierarchical Cluster](#hierarchical-cluster_1) **Syntax:** Hierarchical Cluster( Y( columns ) ) **Description:** Clusters rows based on continuous or categorical variables. Hierarchical clustering begins by treating each row as its own cluster, then successively combining two clusters at a time. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ) ); ``` ### [Columns](#columns_1) #### [By](#by) **Syntax:** obj \<< By( column(s) ) **Description:** Performs a separate analysis for each level of the specified column. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); ``` ### [Item Messages](#item-messages) #### [Add Spatial Measures](#add-spatial-measures) **Syntax:** obj = Hierarchical Cluster(...Add Spatial Measures( state=0|1 )...) **Description:** Enables you to select and weight spatial components to aid in clustering defect patterns. Available only if the specified data structure is Data is stacked. ``` dt = Open( "$SAMPLE_DATA/Wafer Stacked.jmp" ); obj = dt << Hierarchical Cluster( Y( :Defects ), Object ID( :Lot, :Wafer ), Attribute ID( :X_Die, :Y_Die ), Method( "Ward" ), Standardize Data( 0 ), Dendrogram Scale( "Distance Scale" ), Number of Clusters( 12 ), g Add Spatial Measures( Attributes( 1 ), Angle( 1 ), Radius( 1 ), Streak Angle( 1 ), Streak Distance( 1 ) ) ); ``` #### [Cluster Criterion](#cluster-criterion) **Syntax:** obj \<< Cluster Criterion( state=0|1 ) **Description:** Shows or hides the Cubic Clustering Criterion (CCC) for the entire range of number of clusters. The CCC is used to estimate the number of clusters, where larger values indicate a better fit. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Cluster Criterion ); ``` #### [Cluster Summary](#cluster-summary) **Syntax:** obj \<< Cluster Summary( state=0|1 ) **Description:** Shows or hides summary statistics for each of the specified number of clusters. ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << Hierarchical Cluster( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ), Number of Clusters( 3 ), Cluster Summary ); ``` #### [Clustering History](#clustering-history) **Syntax:** obj \<< Clustering History( state=0|1 ) **Description:** Shows or hides the agglomeration history in order of joins. The table contains distances and is sorted from nearest to farthest. On by default. **JMP Version Added:** 17 ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << Hierarchical Cluster( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ), Clustering History( 0 ) ); ``` #### [Color Clusters](#color-clusters) **Syntax:** obj \<< Color Clusters( state=0|1 ) **Description:** Colors the rows and the dendrogram labels by cluster membership. The colors are updated as the number of clusters is changed. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ) ); obj << Color Clusters( 1 ); ``` #### [Color Map](#color-map) **Syntax:** obj \<< Color Map **Description:** Shows or hides a color map next to the dendrogram. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ) ); obj << Color Map( Green to Black to Red ); Wait( 1 ); obj << Color Map( Blue to Gray to Red ); ``` #### [Column Cluster Criterion](#column-cluster-criterion) **Syntax:** obj \<< Column Cluster Criterion( state=0|1 ) #### [Column Dendrogram Position](#column-dendrogram-position) **Syntax:** obj \<< Column Dendrogram Position( "Below"|"Above" ) **Description:** Moves the position of the dendrogram for columns when two-way clustering is used. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :"1-Octanol"n, :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ), Number of Clusters( 5 ), Two Way Clustering, Column Dendrogram Position( "Above" ) ); ``` #### [Column Label Position](#column-label-position) **Syntax:** obj \<< Column Label Position( "Below"|"Above" ) **Description:** Moves the position of the labels on the dendrogram for columns when two-way clustering is used. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :"1-Octanol"n, :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ), Number of Clusters( 5 ), Two Way Clustering, Distance Graph( 0 ), Column Label Position( "Above" ) ); ``` #### [Constellation Plot](#constellation-plot) **Syntax:** obj \<< Constellation Plot( state=0|1 ) **Description:** Shows or hides an alternative way to present the information in the hierarchical clustering dendrogram. Each observation (row) is represented by an endpoint and each cluster join is represented by a new point. The lines that are drawn represent cluster membership. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ) ); obj << Constellation Plot( 1 ); ``` #### [Dendrogram Scale](#dendrogram-scale) **Syntax:** obj \<< Dendrogram Scale( "Distance Scale"|"Even Spacing"|"Geometric Spacing" ) **Description:** Specifies the scale for the dendrogram. Even Spacing makes the spacing even across dendrogram branches. Geometric Spacing increases the spacing as a scale multiple up the tree in the dendrogram. Distance Scale uses branch spacing proportional to distances. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ) ); obj << Dendrogram Scale( Geometric Spacing ); ``` #### [Dendrogram Width](#dendrogram-width) **Syntax:** obj \<< Dendrogram Width( number=min(max(256,n\*3),500) ) **Description:** How wide the dendrogram frame is for the clustering of rows. "min(max(256,n\*3),500)" by default. #### [Distance Graph](#distance-graph) **Syntax:** obj \<< Distance Graph( state=0|1 ) **Description:** Shows or hides a graph that shows the distance overcome at each cluster join. On by default. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ), Distance Graph( 0 ) ); Wait( 1 ); obj << Distance Graph( 1 ); ``` #### [Get Clusters](#get-clusters) **Syntax:** obj \<< Get Clusters **Description:** Returns a vector of cluster assignments for each row. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 3 ) ); c = obj << Get Clusters; Show( c ); ``` #### [Get Column Display Order](#get-column-display-order) **Syntax:** obj \<< Get Column Display Order **Description:** Returns a vector of the display position for each column in two-way clustering. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane, :"1-Octanol"n ), Twoway Clustering ); rowOrder = obj << Get Column Display Order; ``` #### [Get Column Names](#get-column-names) **Syntax:** obj \<< Get Column Names **Description:** Returns the column names in cluster order after two-way clustering. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ) ); c = obj << Get Column Names; Show( c ); ``` #### [Get Display Order](#get-display-order) **Syntax:** obj \<< Get Display Order **Description:** Returns a vector of the display position for each row in the cluster, with missing values for undisplayed rows. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane, :"1-Octanol"n ) ); rowOrder = obj << Get Display Order; ``` #### [Get Distance Matrix](#get-distance-matrix) **Syntax:** obj \<< Get Distance Matrix **Description:** Returns the distance matrix used for hierarchical clustering. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :"1-Octanol"n, :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ), Number of Clusters( 8 ) ); m = obj << Get Distance Matrix; Show( m ); ``` #### [Hybrid Cycles](#hybrid-cycles) **Syntax:** obj = Hierarchical Cluster(...Hybrid Cycles( number=30 )...) **Description:** Specifies the minimum number of near-neighbor joining cycles that are performed before switching to the hierarchical clustering routine. "30" by default. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :"1-Octanol"n, :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ), Method( "Hybrid Ward" ), Hybrid Cycles( 20 ) ); ``` #### [Hybrid Goal](#hybrid-goal) **Syntax:** obj = Hierarchical Cluster(...Hybrid Goal( number=400 )...) **Description:** Specifies the maximum number of clusters allowed before switching to the hierarchical clustering routine. When the hierarchical clustering routine starts, the number of clusters must be less than or equal to the Hybrid Goal. "400" by default. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :"1-Octanol"n, :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ), Method( "Hybrid Ward" ), Hybrid Goal( 300 ) ); ``` #### [Hybrid Initial K](#hybrid-initial-k) **Syntax:** obj = Hierarchical Cluster(...Hybrid Initial K( number=10 )...) **Description:** Specifies the initial number of neighbors used in the near-neighbor joining cycles. The number of neighbors can increase or decrease depending on how many unique near neighbors are found in the previous cycle. "10" by default. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :"1-Octanol"n, :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ), Method( "Hybrid Ward" ), Hybrid Initial K( 8 ) ); ``` #### [Hybrid Log Details](#hybrid-log-details) **Syntax:** obj = Hierarchical Cluster(...Hybrid Log Details( state=0|1 )...) **Description:** Specifies whether to show the status and timings of each state of the Hybrid Ward method in the log. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :"1-Octanol"n, :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ), Method( "Hybrid Ward" ), Hybrid Log Details( 1 ) ); ``` #### [Hybrid RandomPCA Dim](#hybrid-randompca-dim) **Syntax:** obj = Hierarchical Cluster(...Hybrid RandomPCA Dim( number=0 )...) **Description:** Specifies the number of dimensions to use in the Randomized PCA dimension reduction technique. This technique is used when the value of Hybrid RandomPCA Dim is any value greater than zero and provides further speed improvements. "0" by default. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :"1-Octanol"n, :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ), Method( "Hybrid Ward" ), Hybrid RandomPCA Dim( 3 ) ); ``` #### [Late Join Outliers](#late-join-outliers) **Syntax:** obj \<< Late Join Outliers( state=0|1 ) **Description:** Shows or hides a report on which items clustered very late in the agglomeration. **JMP Version Added:** 17 ``` dt = Open( "$SAMPLE_DATA/Birth Death.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Late Join Outliers( 1 ) ); ``` #### [Legend](#legend) **Syntax:** obj \<< Legend( state=0|1 ) **Description:** Shows or hides a legend for the color map to the right of the dendrogram. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ), Color Map( Blue to Gray to Red ) ); obj << Legend( 1 ); ``` #### [Mark Clusters](#mark-clusters) **Syntax:** obj \<< Mark Clusters( state=0|1 ) **Description:** Assigns markers to the rows of the data table corresponding to the cluster to which the row belongs. The markers update if you change the number of clusters. If you deselect this option, the markers are no longer updated based on the number of clusters. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ) ); obj << Mark Clusters; ``` #### [Method](#method) **Syntax:** Method( "Average"|"Centroid"|"Ward"|"Single"|"Complete"|"Fast Ward"|"Hybrid Ward" ) **Description:** Specifies the distance method used to form the clusters. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ), Method( "Complete" ) ); ``` #### [Missing value imputation](#missing-value-imputation) **Syntax:** obj = Hierarchical Cluster(...Missing value imputation( state=0|1 )...) **Description:** Imputes missing values using multivariate normal or multivariate SVD imputation. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Hierarchical Cluster( Y( :OZONE, :CO, :SO2, :NO, :PM10, :Lead ), Method( "Ward" ), Standardize Data( 1 ), Missing value imputation( 1 ), Dendrogram Scale( "Distance Scale" ), Number of Clusters( 6 ) ); ``` #### [More Color Map Columns](#more-color-map-columns) **Syntax:** obj \<< More Color Map Columns( column ) **Description:** Adds another color map based on the column specified. ``` dt = Open( "$SAMPLE_DATA/Skull.jmp" ); obj = dt << Hierarchical Cluster( Y( :length, :basilar, :zygomat, :postorb ), Color Map( "Blue to Gray to Red" ), More Color Map columns( :sex ) ); ``` #### [Number of Clusters](#number-of-clusters) **Syntax:** obj \<< Number of Clusters( number ) **Description:** To set the number-of-clusters, the place to cut the tree to define cluster groups. There is a diamond-shaped drag icon that can also change the number of clusters. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 3 ) ); ``` #### [Number of Column Clusters](#number-of-column-clusters) **Syntax:** obj \<< Number of Column Clusters( number ) **Description:** Specifies the number of column clusters prior to saving. Available only for two-way clustering. **JMP Version Added:** 17 #### [Parallel Coord Plots](#parallel-coord-plots) **Syntax:** obj \<< Parallel Coord Plots **Description:** Creates a parallel coordinate plot for each cluster, all contained in a separate window. ``` dt = Open( "$SAMPLE_DATA/Car Physical Data.jmp" ); obj = dt << Hierarchical Cluster( Y( :Type, :Weight, :Turning Circle, :Displacement, :Horsepower, :Gas Tank Size ), Label( :Model ), Number of Clusters( 3 ) ); obj << Parallel Coord Plots; ``` #### [Pivot on Selected Cluster](#pivot-on-selected-cluster) **Syntax:** obj \<< Pivot on Selected Cluster **Description:** Reverses the order of the two sub-clusters of the currently selected cluster. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ) ); dt << Select Rows( Loc( (obj << Get Clusters) == 3 ) ); Wait( 2 ); obj << Pivot on Selected Cluster; ``` #### [Release Zoom](#release-zoom) **Syntax:** obj \<< Release Zoom **Description:** Releases the zoom on the dendrogram to the selected rows. ``` dt = Open( "$SAMPLE_DATA/Car Physical Data.jmp" ); dt << Select Rows( [19, 22, 45, 61, 62, 64] ); obj = dt << Hierarchical Cluster( Y( :Type, :Weight, :Turning Circle, :Displacement, :Horsepower, :Gas Tank Size ), Label( :Model ) ); obj << Zoom to Selected Rows; Wait( 2 ); obj << Release Zoom; ``` #### [Row Dendrogram Position](#row-dendrogram-position) **Syntax:** obj \<< Row Dendrogram Position( "Left"|"Right" ) **Description:** Moves the position of the dendrogram for rows. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :"1-Octanol"n, :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ), Two Way Clustering, Row Dendrogram Position( "Left" ) ); ``` #### [Row Label Position](#row-label-position) **Syntax:** obj \<< Row Label Position( "Left"|"Right" ) **Description:** Moves the position of the labels on the dendrogram for rows. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :"1-Octanol"n, :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ), Two Way Clustering, Row Label Position( "Right" ) ); ``` #### [Row More Position](#row-more-position) **Syntax:** obj \<< Row More Position( "Left"|"Right" ) **Description:** Moves the position of the color map added with the More Color Map Columns command. ``` dt = Open( "$SAMPLE_DATA/Skull.jmp" ); obj = dt << Hierarchical Cluster( Y( :length, :basilar, :zygomat, :postorb ), Color Map( "Blue to Gray to Red" ), More Color Map Columns( :sex ), Row More Position( "Right" ) ); ``` #### [Save Cluster Hierarchy](#save-cluster-hierarchy) **Syntax:** obj \<< Save Cluster Hierarchy **Description:** Creates a data table that contains information useful in reconstructing the dendrogram. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ) ); obj << Save Cluster Hierarchy; ``` #### [Save Cluster History](#save-cluster-history) **Syntax:** obj \<< Save Cluster History **Description:** Saves the table that appears in the Clustering History report as a new data table. ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << Hierarchical Cluster( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ), Number of Clusters( 3 ), Save Cluster History ); ``` #### [Save Cluster Means](#save-cluster-means) **Syntax:** obj \<< Save Cluster Means **Description:** Saves a table of cluster means for the given number of clusters. ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << Hierarchical Cluster( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ), Number of Clusters( 3 ), Save Cluster Means ); ``` #### [Save Cluster Tree](#save-cluster-tree) **Syntax:** obj \<< Save Cluster Tree **Description:** Creates a data table that contains the nodes of the cluster tree. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ) ); obj << Save Cluster Tree; ``` #### [Save Clusters](#save-clusters) **Syntax:** obj \<< Save Clusters **Description:** Creates a data table column that contains the cluster numbers. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ) ); obj << Save Clusters; ``` #### [Save Column Clusters](#save-column-clusters) **Syntax:** obj \<< Save Column Clusters **Description:** Save a new data table that contains cluster membership information for the columns. Available only for two-way clustering. **JMP Version Added:** 17 #### [Save Constellation Coordinates](#save-constellation-coordinates) **Syntax:** obj \<< Save Constellation Coordinates **Description:** Saves the coordinates of the constellation plot to a new column in the data table. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ) ); obj << Constellation Plot( 1 ); obj << Save Constellation Coordinates( 1 ); ``` #### [Save Display Order](#save-display-order) **Syntax:** obj \<< Save Display Order **Description:** Creates a data table column that contains the order in which the row appears in the dendrogram. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ) ); obj << Save Display Order; ``` #### [Save Distance Matrix](#save-distance-matrix) **Syntax:** obj \<< Save Distance Matrix **Description:** Creates a data table that contains the distances between observations. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Save Distance Matrix ); ``` #### [Save Formula for Closest Cluster](#save-formula-for-closest-cluster) **Syntax:** obj \<< Save Formula for Closest Cluster **Description:** Saves a formula column to the data table that gives the cluster number of the closest cluster mean. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ) ); obj << Save Formula for Closest Cluster; ``` #### [Scatterplot Matrix](#scatterplot-matrix) **Syntax:** obj \<< Scatterplot Matrix **Description:** Creates a scatterplot matrix in a new window with confidence ellipses based on the current number of clusters. ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << Hierarchical Cluster( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ), Number of Clusters( 3 ), Scatterplot Matrix ); ``` #### [Set Random Seed](#set-random-seed) **Syntax:** obj \<< Set Random Seed( number ) **Description:** Specifies a random seed to reproduce the results for future launches of the platform. #### [Show Dendrogram](#show-dendrogram) **Syntax:** obj \<< Show Dendrogram( state=0|1 ) **Description:** Enables you to turn off dendrogram if you want to see only the color map. On by default. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 3 ), Distance Graph( 0 ), Color Map( Green to Black to Red ), Color Clusters( 1 ), Show Dendrogram( 0 ) ); ``` #### [Show NCluster Handle](#show-ncluster-handle) **Syntax:** obj \<< Show NCluster Handle( state=0|1 ) **Description:** Shows or hides the diamond handle that is used to choose the number of clusters on the dendrogram. On by default. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ), Number of Clusters( 4 ), Color Clusters( 1 ), Show NCluster Handle( 0 ) ); ``` #### [Standardize](#standardize) **Syntax:** obj \<< Standardize( "Unstandardized"|"Columns"|"Rows"|"Columns and Rows" ) **Description:** Alias for 'Standardize By', which specifies how to standardize the values prior to clustering. #### [Standardize By](#standardize-by) **Syntax:** obj = Hierarchical Cluster(...Standardize By( "Unstandardized"|"Columns"|"Rows"|"Columns and Rows" )...) **Description:** Specifies how to standardize the values prior to clustering. You can standardize by columns, rows, columns and rows, or not at all. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :"1-Octanol"n, :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ), Standardize( "Unstandardized" ), Two Way Clustering, Row Label Position( "Right" ) ); ``` #### [Standardize Data](#standardize-data) **Syntax:** obj \<< Standardize Data( state=0|1 ) **Description:** Old option name, still supported, but replaced by 'Standardize By'. #### [Standardize Robustly](#standardize-robustly) **Syntax:** obj = Hierarchical Cluster(...Standardize Robustly( state=0|1 )...) **Description:** Uses robust estimates of the mean and standard deviation to standardize the data. #### [Two Way Clustering](#two-way-clustering) **Syntax:** obj = Hierarchical Cluster(...Two Way Clustering...) **Description:** Clusters together columns as well as rows. The columns must be measured on the same scale. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Hierarchical Cluster( Y( :"1-Octanol"n, :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ), Number of Clusters( 8 ) ); Wait( .1 ); obj << Two Way Clustering; ``` #### [Use Saved Cluster Table](#use-saved-cluster-table) **Syntax:** obj = Hierarchical Cluster(...Use Saved Cluster Table( state=0|1 )...) **Description:** Uses a separate cluster history table to specify the clustering. #### [Zoom to Selected Rows](#zoom-to-selected-rows) **Syntax:** obj \<< Zoom to Selected Rows **Description:** Zooms the dendrogram to the selected rows. ``` dt = Open( "$SAMPLE_DATA/Car Physical Data.jmp" ); dt << Select Rows( [19, 22, 45, 61, 62, 64] ); obj = dt << Hierarchical Cluster( Y( :Type, :Weight, :Turning Circle, :Displacement, :Horsepower, :Gas Tank Size ), Label( :Model ) ); Wait( 2 ); obj << Zoom to Selected Rows; ``` ## [KDTable](#kdtable) ### [Associated Constructors](#associated-constructors_1) #### [KDTable](#kdtable_1) **Syntax:** tbl = KDTable( [ point1, point2, point3, point4, point5, ... ] ) **Description:** Returns a table for efficiently looking up near neighbors. The matrix arguments are k-dimensional points. There is no built in limit on the number of dimensions or points. ``` tbl = KDTable( [1 1 1, 1 2 1, 1 2 2, 2 2 2, 3 3 3, 4 5 6] ); {rows, dist} = tbl << K nearest rows( 2, 1 ); //2 nearest rows to row 1 are: Show( rows ); ``` ### [Item Messages](#item-messages_1) #### [Distance between rows](#distance-between-rows) **Syntax:** distance = KDTable \<< Distance between rows( row1, row2 ) **Description:** Returns the distance between two rows. Distance applies to removed rows as well as inserted rows. ``` tbl = KDTable( [1 1, 2 2, 1 2, 2 1, 4 4] ); distance = tbl << Distance between rows( 1, 2 ); //distance from row 1 to row 2 is: Show( distance ); ``` #### [Insert rows](#insert-rows) **Syntax:** n = KDTable \<< Insert rows( number|[ vector ] ) **Description:** Enables you to re-insert rows into table searches. The row indexes do not change when rows are inserted or removed, and only the original rows can be removed and then (re)inserted. Returns the number of rows inserted. If a row was already inserted, it is ignored. ``` tbl = KDTable( [1 1, 2 2, 1 2, 2 1, 4 4] ); // remove 3 rows tbl << Remove Rows( [2 1 3] ); // re-insert 1 row tbl << InsertRows( 2 ); // re-insert 2 rows, ignoring row 2 tbl << InsertRows( [3 2] ); {rows, dist} = tbl << K nearest rows( 2, 4 ); //2 nearest rows to row 4, ignoring row 1, are: Show( rows ); ``` #### [K nearest rows](#k-nearest-rows) **Syntax:** {rows, dist} = KDTable \<< K nearest rows( stop, ) **Description:** Returns the n nearest rows and distances to either a point or row (if position is specified) or all rows (if position is omitted), stopping the search when the distance limit is exceeded. Stop can be either n or {n,limit}. The optional position is a point either as (1xK) matrix where K is the number of dimensions or the number of a row. If position is not supplied, the nearest n rows to each row are returned in a (rows x n) matrix. ``` tbl = KDTable( [1 1 1, 1 2 1, 1 2 2, 2 2 2, 3 3 3, 4 5 6] ); {rows, dist} = tbl << K nearest rows( {3, 2.0} ); //3 nearest rows to each row are: Show( rows ); ``` #### [Remove rows](#remove-rows) **Syntax:** n = KDTable \<< Remove rows( number|[ vector ] ) **Description:** Remove rows from table searches. The row indexes do not change when rows are inserted or removed, and only the original rows can be removed then (re)inserted. The removed row's index can still be used as a starting point for K nearest rows. Returns the number of rows removed. If a row was already removed, it is ignored. ``` tbl = KDTable( [1 1, 2 2, 1 2, 2 1, 4 4] ); // remove 2 rows tbl << RemoveRows( [2 1] ); // re-insert 1 row tbl << Insert rows( 2 ); {rows, dist} = tbl << K nearest rows( 2, [1.5 1.5] ); //2 nearest rows to point at [1.5 1.5], ignoring row 1, are: Show( rows ); ``` # [Column Switcher](#column-switcher) ## [Item Messages](#item-messages) ### [Close Outline](#close-outline) **Syntax:** obj \<< Close Outline( state=0|1 ) **Description:** Opens or closes the Column Switcher outline box ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Close Outline( 1 ); ``` ### [Get Current](#get-current) **Syntax:** obj \<< Get Current **Description:** get the name of the current variable ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Set Current( "country" ); ColumnSwitcherObject << Get Current/*country*/ ; ``` ### [Get Layout](#get-layout) **Syntax:** obj \<< Get Layout **Description:** Gets the layout for multiple Column Switchers. Vertical(0) or horizontal(1). ``` dt = Open( "$SAMPLE_DATA/Car Physical Data.jmp" ); gb = dt << Graph Builder( Variables( X( :Country ), Y( :Weight ) ), Elements( Bar( X, Y, Legend( 4 ) ) ) ); cs1 = gb << Column Switcher( :Country, {:Model, :Country, :Type}, Layout( 1 ) ); cs2 = gb << Column Switcher( :Weight, {:Weight, :Turning Circle, :Displacement, :Horsepower, :Gas Tank Size} ); If( cs2 << Get Layout() == 1, Print( "Horizontal" ), Print( "Vertical" ) ); ``` ### [Get List](#get-list) **Syntax:** obj \<< Get List **Description:** get the list of available variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Get List/*{"sex","country","marital status"}*/ ; ``` ### [Get Original](#get-original) **Syntax:** obj \<< Get Original **Description:** get the name of the original variable ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Next; ColumnSwitcherObject << Get Original/*marital status*/ ; ``` ### [Get Speed](#get-speed) **Syntax:** obj \<< Get Speed **Description:** fpm = obj\<> " || (nextColumn << get name ) || " [Column Switcher] current: " || (columnSwitcher << Get Current) ); If( nextColumn << get name == "Process 4", 0, 1 ); ); post = Function( {previousColumn, currentColumn, switcher}, Print( "After switch: " || (previousColumn << get name) || " >> " || (currentColumn << get name) || " [Column Switcher] current: " || (columnSwitcher << Get Current) ) ); handler = columnSwitcher << Make Column Switch Handler( pre, post ); columnSwitcher << Run; ``` ### [Next](#next) **Syntax:** obj \<< Next **Description:** Change the column switcher's selection to the next available choice ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Next; ``` ### [Pause](#pause) **Syntax:** obj \<< Pause **Description:** pause the animation ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Run; Wait( 5/*seconds, while it animates*/ ); ColumnSwitcherObject << Pause; ``` ### [Previous](#previous) **Syntax:** obj \<< Previous **Description:** Change the column switcher's selection to the previous available choice ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Previous; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Remove this Column Switcher ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Run; Wait( 2/*seconds, while it animates*/ ); ColumnSwitcherObject << Remove Column Switcher; ``` ### [Retain Axis Settings](#retain-axis-settings) **Syntax:** obj \<< Retain Axis Settings( state=0|1 ) **Description:** Some graphs store axis customizations based on the name of the column. By default, these customizations are removed when switching columns. If this option is enabled, the column is updated when switching so that the customizations are applied to the new graph. ``` dt = Open( "$SAMPLE_DATA/Process Measurements.jmp" ); Graph Builder( Variables( X( :Process 1 ), Y( :Process 2 ) ), Elements( Points( X, Y, Legend( 2 ) ), Smoother( X, Y, Legend( 3 ) ) ), Column Switcher( :Process 1, {:Process 1, :Process 3, :Process 4, :Process 5, :Process 6, :Process 7}, Retain Axis Settings( 1 ) ), SendToReport( Dispatch( {}, "Process 1", ScaleBox, {Min( -0.5 ), Max( 22 ), Inc( 4 ), Minor Ticks( 3 ), Add Ref Line( 12, "Solid", "Black", "", 1 )} ) ) ); ``` ### [Run](#run) **Syntax:** obj \<< Run **Description:** start the animation ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Run; ``` ### [Script](#script) **Syntax:** obj \<< Script( script ) **Description:** Set a script that is run when the column switches **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Set Script( Print( "New Value: " || Char( ColumnSwitcherObject << Get Current ) ) ); ColumnSwitcherObject << Run; Wait( 5/*seconds, while it animates*/ ); ``` ### [Set Current](#set-current) **Syntax:** obj \<< Set Current( string ) **Description:** set the current variable ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Set Current( "country" ); ``` ### [Set Layout](#set-layout) **Syntax:** obj \<< Set Layout( 0 = Vertical | 1 = Horizontal ) **Description:** Sets the layout for multiple Column Switchers to vertical(0) or horizontal(1). ``` dt = Open( "$SAMPLE_DATA/Car Physical Data.jmp" ); gb = dt << Graph Builder( Variables( X( :Country ), Y( :Weight ) ), Elements( Bar( X, Y, Legend( 4 ) ) ) ); cs1 = gb << Column Switcher( :Country, {:Model, :Country, :Type} ); cs2 = gb << Column Switcher( :Weight, {:Weight, :Turning Circle, :Displacement, :Horsepower, :Gas Tank Size} ); cs1 << Set Layout( 1 ); ``` ### [Set N Lines](#set-n-lines) **Syntax:** obj \<< Set N Lines( number ) **Description:** Set the number of lines in the List Box of column names ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Set N Lines( 20 ); ``` ### [Set Script](#set-script) **Syntax:** obj \<< Set Script( script ) **Description:** Set a script that is run when the column switches **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Set Script( Print( "New Value: " || Char( ColumnSwitcherObject << Get Current ) ) ); ColumnSwitcherObject << Run; Wait( 5/*seconds, while it animates*/ ); ``` ### [Set Size](#set-size) **Syntax:** obj \<< Set Size( number ) **Description:** Set the pixel width of the List Box of column names ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ColumnSwitcherObject << Set Size( 300 ); ``` ### [Set Speed](#set-speed) **Syntax:** obj \<< Set Speed( number ) **Description:** obj\<) **Description:** Override the default set of extended statistics without having to configure the list in preferences. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager( Include Extended Statistics( 1 ) ); obj << Extended Statistics( {"Median Absolute Deviation", "Q1"} ); ``` ### [Force calculations for all categorical columns](#force-calculations-for-all-categorical-columns) **Syntax:** obj \<< Force calculations for all categorical columns( state=0|1 ) **Description:** With this option enabled, stats are calculated for all categorical columns, not just character columns. For example, an expression column calculates the number of missing values. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Columns Manager; obj << Force calculations for all categorical columns( 1 ); ``` ### [Force calculations for all numeric columns](#force-calculations-for-all-numeric-columns) **Syntax:** obj \<< Force calculations for all numeric columns( state=0|1 ) **Description:** With this option enabled, numeric stats are calculated for all numeric columns, if possible. For example, the number of unique values is calculated for columns designated as continuous. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager; obj << Force calculations for all numeric columns( 1 ); ``` ### [Get Summary Table](#get-summary-table) **Syntax:** obj \<< Get Summary Table **Description:** Get the Table Box for the summary table ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager; tab = obj << Get Summary table; tab << Sort By Column( "n unique" ); ``` ### [Hide Excluded Columns](#hide-excluded-columns) **Syntax:** obj \<< Hide Excluded Columns( state=0|1 ) **Description:** Include or remove columns marked Excluded from the summary table. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager; obj << Hide Excluded Columns( 0 ); ``` ### [Hide Hidden Columns](#hide-hidden-columns) **Syntax:** obj \<< Hide Hidden Columns( state=0|1 ) **Description:** Include or remove columns marked Hidden from the summary table. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager; obj << Hide Hidden Columns( 0 ); ``` ### [Include Extended Statistics](#include-extended-statistics) **Syntax:** obj \<< Include Extended Statistics( state=0|1 ) **Description:** The set of additional statistics can be configured in Preferences. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager; obj << Include Extended Statistics( 1 ); ``` ### [Select Rows](#select-rows) **Syntax:** obj \<< Select Rows( | All | None | ) **Description:** This option selects rows in the summary table corresponding to columns. Clear by passing in no arguments. Select all or none of the visible rows by passing in All or None. Selected specific rows by passing a list of column references. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager; obj << Select Rows( :age, :height ); ``` ### [Set Columns](#set-columns) **Syntax:** obj \<< Set Columns() **Description:** By default the Columns Manager includes all of the columns in the data table as its base set of columns. That set might (or might not) be reduced in the report by applying the removal of excluded columns. This option allows the restriction of the set of columns that the Columns Manager has access to. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager; obj << Set Columns( {:height, :weight} ); ``` ### [Set Modeling Type Filter](#set-modeling-type-filter) **Syntax:** obj \<< Set Modeling Type Filter( | \) **Description:** This option sets the modeling type filter. Clear by passing no arguments, or specify one or more modeling type names. The filter is satisfied by columns that match any of the analysis types. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager; obj << Set Modeling Type Filter( "Continuous", "Ordinal" ); ``` ### [Set Property Filter](#set-property-filter) **Syntax:** obj \<< Set Property Filter( | At Least One Property | ) **Description:** This option sets the property filter. Clear by passing no arguments, or specify one or more property names. The filter is specified by columns that contain any of the properties. There is also a special value that is matched by columns having any properties. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Columns Manager; obj << Set Property Filter( "Matrix Column Names", "Value colors" ); ``` ### [Set Selection Filter](#set-selection-filter) **Syntax:** obj \<< Set Selection Filter( | Keep | Hide) **Description:** This option sets the selection filter. It allows the user to make arbitrary selection of columns and then filter the list to that set of columns (with Keep, or its inverse with Hide). Clear by passing no arguments. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager; obj << Select Rows( :age, :height ); obj << Set Selection Filter( "Keep" ); ``` ### [Set Text Filter](#set-text-filter) **Syntax:** obj \<< Set Text Filter( | ) **Description:** This option sets the current text filter data, which reduces the number of columns shown in the summary table. The text filter is applied only to column names. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager; obj << Set Text Filter( "me" ); ``` ### [Show Attributes](#show-attributes) **Syntax:** obj \<< Show Attributes( state=0|1 ) **Description:** Expand or collapse the section of the summary table that contains column attributes. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager; obj << Show Attributes( 0 ); ``` ### [Show Properties](#show-properties) **Syntax:** obj \<< Show Properties( state=0|1 ) **Description:** Expand or collapse the section of the summary table that contains column properties. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager; obj << Show Properties( 0 ); ``` ### [Show Statistics](#show-statistics) **Syntax:** obj \<< Show Statistics( state=0|1 ) **Description:** Expand or collapse the section of the summary table that contains column statistics. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Columns Manager; obj << Show Statistics( 0 ); ``` # [Compare Data Tables](#compare-data-tables) ## [Associated Constructors](#associated-constructors) ### [Compare Data Tables](#compare-data-tables_1) **Syntax:** Compare Data Tables( \, \, \, \, \, \, \, \)>, \, \ ) **Description:** Compares two open data tables and reports differences between data, as well as metadata. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); ``` ## [Item Messages](#item-messages) ### [Are Data Different](#are-data-different) **Syntax:** obj \<< Are Data Different **Description:** Returns true or false depending on whether the data of the two tables are different or not. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); how = (obj << Are Data Different); ``` ### [Auto compare](#auto-compare) **Syntax:** Auto Compare(0|1) **Description:** Perform comparisons as soon as any setting is changed **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Auto Compare( 1 ); ``` ### [Close](#close) **Syntax:** obj \<< Close **Description:** Close the Compare Data Table object ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << close; ``` ### [Compare](#compare) **Syntax:** Compare() **Description:** Perform comparisons now **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Compare(); ``` ### [Compare Column Attributes and Properties](#compare-column-attributes-and-properties) **Syntax:** obj \<< Compare Column Attributes and Properties( state=0|1 ) **Description:** Set or clear the flag to compare the columns attributes and properties. On by default. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << compare column attributes and properties( 1 ); ``` ### [Compare Data](#compare-data) **Syntax:** obj \<< Compare Data( state=0|1 ) **Description:** Set or clear the flag to compare the columns data. On by default. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << compare data( 0 ); ``` ### [Compare Table Properties](#compare-table-properties) **Syntax:** obj \<< Compare Table Properties( state=0|1 ) **Description:** Set or clear the flag to compare the table variables and scripts. On by default. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << compare table properties; ``` ### [Compare With](#compare-with) **Syntax:** obj \<< Compare With( Data Table( name ) ) **Description:** Compare the first table with this table. Returns true or false. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); obj = dt << Compare Data Tables(); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); same = obj << compare with( dt2 ); ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Put the Compare Data Tables script on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Copy Script; ``` ### [Fuzzy Compare](#fuzzy-compare) **Syntax:** obj \<< Fuzzy Compare( \<(state= 1 | 0)>, \ ) **Description:** Set or clear the flag to compare the columns data. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << fuzzy compare( relative error( 0.0001 ) ); ``` ### [Get column attributes differences](#get-column-attributes-differences) **Syntax:** obj \<< Get column attributes differences( columns( column) ) **Description:** Get the list of column attributes which are different for the compared columns. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); attribDiff = (obj << Get columns attributes differences( :name )); ``` ### [Get column properties differences](#get-column-properties-differences) **Syntax:** obj \<< Get column properties differences( columns( column) ) **Description:** Get the list of column properties which are different for the compared columns. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); propDiff = (obj << Get columns properties differences( :name )); ``` ### [Get columns list](#get-columns-list) **Syntax:** obj \<< Get columns list( ( | | | ) ) **Description:** Get the list of columns that differ in data, column properties, data type, or other column attributes. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); colDiff = (obj << Get columns list( differed in attributes )); Show( colDiff ); ``` ### [Get difference summary matrix](#get-difference-summary-matrix) **Syntax:** obj \<< Get difference summary matrix **Description:** Gets the difference summary as a matrix. The matrix columns correspond to the columns in the difference summary. The first column, action, is represented in the matrix with -1 for Delete, 0 for Replace, and 1 for Add. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); mtx = (obj << Get Difference Summary matrix); ``` ### [Get table scripts difference list](#get-table-scripts-difference-list) **Syntax:** obj \<< Get table scripts difference list **Description:** Get the list of table scripts that are different or missing. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); scriptDiff = (obj << Get table scripts difference list); ``` ### [Get table variables difference list](#get-table-variables-difference-list) **Syntax:** obj \<< Get table variables difference list **Description:** Get the list of table variables which are different or missing. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); tvdiff = (obj << Get table variables difference list); ``` ### [Get unmatched columns list](#get-unmatched-columns-list) **Syntax:** obj \<< Get unmatched columns list **Description:** Get the list of unmatched columns, those that do not have corresponding columns to be compared ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); colDiff = (obj << Get unmatched columns list); ``` ### [Hide column properties with no differences](#hide-column-properties-with-no-differences) **Syntax:** Hide column properties with no differences(0|1) **Description:** Hide properties that are the same when comparing column properties. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Hide column properties with no differences( 0 ); ``` ### [Hide columns with no differences](#hide-columns-with-no-differences) **Syntax:** Hide columns with no differences(0|1) **Description:** Hide columns that are the same when comparing table data. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Hide columns with no differences( 0 ); ``` ### [Hide rows with no differences](#hide-rows-with-no-differences) **Syntax:** Hide rows with no differences(0|1) **Description:** Hide rows that are the same when comparing table data. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Hide rows with no differences( 0 ); ``` ### [Hide table properties with no differences](#hide-table-properties-with-no-differences) **Syntax:** Hide table properties with no differences(0|1) **Description:** Hide items that are the same when comparing table metadata. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Hide table properties with no differences( 0 ); ``` ### [Ignore case](#ignore-case) **Syntax:** Ignore Case(0|1) **Description:** Ignore character case during data comparison **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Ignore Case( 1 ); ``` ### [Ignore missing](#ignore-missing) **Syntax:** Ignore Missing(0|1) **Description:** Ignore missing values during data comparison **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Ignore Missing( 1 ); ``` ### [Ignore whitespace](#ignore-whitespace) **Syntax:** Ignore Whitespce(0|1) **Description:** Ignore whitespace characters during data comparison **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Ignore Whitespace( 1 ); ``` ### [Limit](#limit) **Syntax:** obj \<< Limit( integer ) **Description:** Set the limit for the number of difference. Compare will stop when the limit is reached. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << limit( 100 ); ``` ### [Link](#link) **Syntax:** Link({"col1", "col2", \, \, \, \, \, \)>)> **Description:** Specify column pairs to compare and other comparison options. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Link( {:age, :weight}, ); ``` ### [Relative Error](#relative-error) **Syntax:** obj \<< Relative Error( integer ) **Description:** Set the relative error for fuzzy compare. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Relative Error( 0.00001 ); ``` ### [Report](#report) **Syntax:** obj \<< Report **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Row Alignment](#row-alignment) **Syntax:** obj \<< Row Alignment (Flexible by Row|By Row|Use ID Columns) **Description:** Set how the rows are aligned for comparison. Flexible By Row: attempt to find as many matching rows as possible in order by skipping over blocks of non-matching rows. By Row: compare each row by line number. Use ID Columns: the ID columns specified are used to create a key for each row. This key is used to match rows. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Row Alignment( "By Row" ); ``` ### [Save Difference Summary](#save-difference-summary) **Syntax:** obj \<< Save Difference Summary( \ ) **Description:** Save the difference summary in a data table. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); summaryDT = (obj << save difference summary( invisible )); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** obj \<< Save Script to Data Table **Description:** Save the Compare Data Tables script as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Save Script to Data Table; ``` ### [Save Script to Journal](#save-script-to-journal) **Syntax:** obj \<< Save Script to Journal **Description:** Add a Button to the journal containing the Compare Data Tables script. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Save Script to Journal; ``` ### [Save Script to Script Window](#save-script-to-script-window) **Syntax:** obj \<< Save Script to Script Window **Description:** Append the Compare Data Tables script to the current Script text window. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Save Script to Script Window; ``` ### [Show Window](#show-window) **Syntax:** obj \<< Show Window( Show window( 0|1) ) **Description:** Show or hide the window for Compare Data Table ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << show window( 1 ); ``` ### [Show fuzzy differences](#show-fuzzy-differences) **Syntax:** Show Fuzzy Differences(0|1) **Description:** Hilite differences in data comparison for values that are equal only because of fuzzy comparison settings **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Show Fuzzy Differences( 1 ); ``` ### [Unlink](#unlink) **Syntax:** Unlink(\, \) **Description:** Remove the column comparison. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Unlink( {"a", "b"} ); ``` ### [Unlink All](#unlink-all) **Syntax:** Unlink All **Description:** Remove all column comparisons. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); obj = dt << Compare Data Tables( compare With( Data Table( "Students2" ) ) ); obj << Unlink All; ``` # [Constant Stress ALT Design](#constant-stress-alt-design) ## [Associated Constructors](#associated-constructors) ### [ALT Plan](#alt-plan) **Syntax:** ALT Plan ### [Factors](#factors) **Syntax:** Factors **Description:** Creates the Factor Table in the CSALT platform. ``` d = Constant Stress ALT Design( Factors( Factor( Factor Name( "X1" ), Number of Levels( 3 ), Factor Transformation( "Arrhenius Celsius" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ), Factor( Factor Name( "X2" ), Number of Levels( 3 ), Factor Transformation( "Log" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ) ) ); ``` ## [Item Messages](#item-messages) ### [Factor](#factor) **Syntax:** obj \<< Factor **Description:** Adds a factor with the specified properties. ``` d = Constant Stress ALT Design( Factors( Factor( Factor Name( "X1" ), Number of Levels( 3 ), Factor Transformation( "Arrhenius Celsius" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ), Factor( Factor Name( "X2" ), Number of Levels( 3 ), Factor Transformation( "Log" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ) ) ); ``` ### [Factor Name](#factor-name) **Syntax:** obj \<< Factor Name **Description:** Sets the name of the factor. ``` d = Constant Stress ALT Design( Factors( Factor( Factor Name( "X1" ), Number of Levels( 3 ), Factor Transformation( "Arrhenius Celsius" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ), Factor( Factor Name( "X2" ), Number of Levels( 3 ), Factor Transformation( "Log" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ) ) ); ``` ### [Factor Transformation](#factor-transformation) **Syntax:** obj \<< Factor Transformation( Arrhenius Celsius|Arrhenius Fahrenheit|Arrhenius Kelvin|Reciprocal|Log|Root|None ) **Description:** Sets the transformation function for the levels of the factor. ``` d = Constant Stress ALT Design( Factors( Factor( Factor Name( "X1" ), Number of Levels( 3 ), Factor Transformation( "Arrhenius Celsius" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ), Factor( Factor Name( "X2" ), Number of Levels( 3 ), Factor Transformation( "Log" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ) ) ); ``` ### [High Test Condition](#high-test-condition) **Syntax:** obj \<< High Test Condition **Description:** Sets the highest testing level for the factor. ``` d = Constant Stress ALT Design( Factors( Factor( Factor Name( "X1" ), Number of Levels( 3 ), Factor Transformation( "Arrhenius Celsius" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ), Factor( Factor Name( "X2" ), Number of Levels( 3 ), Factor Transformation( "Log" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ) ) ); ``` ### [High Usage Condition](#high-usage-condition) **Syntax:** obj \<< High Usage Condition **Description:** Sets the highest level for the usage condition for the factor. This value can be the same as the lowest usage condition. ``` d = Constant Stress ALT Design( Factors( Factor( Factor Name( "X1" ), Number of Levels( 3 ), Factor Transformation( "Arrhenius Celsius" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ), Factor( Factor Name( "X2" ), Number of Levels( 3 ), Factor Transformation( "Log" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ) ) ); ``` ### [Low Test Condition](#low-test-condition) **Syntax:** obj \<< Low Test Condition **Description:** Sets the lowest testing level for the factor. ``` d = Constant Stress ALT Design( Factors( Factor( Factor Name( "X1" ), Number of Levels( 3 ), Factor Transformation( "Arrhenius Celsius" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ), Factor( Factor Name( "X2" ), Number of Levels( 3 ), Factor Transformation( "Log" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ) ) ); ``` ### [Low Usage Condition](#low-usage-condition) **Syntax:** obj \<< Low Usage Condition **Description:** Sets the lowest level for the usage condition for the factor. This value can be the same as the highest usage condition. ``` d = Constant Stress ALT Design( Factors( Factor( Factor Name( "X1" ), Number of Levels( 3 ), Factor Transformation( "Arrhenius Celsius" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ), Factor( Factor Name( "X2" ), Number of Levels( 3 ), Factor Transformation( "Log" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ) ) ); ``` ### [Number of Levels](#number-of-levels) **Syntax:** obj \<< Number of Levels **Description:** Sets the number of levels for the factor. Primarily used for balanced designs. ``` d = Constant Stress ALT Design( Factors( Factor( Factor Name( "X1" ), Number of Levels( 3 ), Factor Transformation( "Arrhenius Celsius" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ), Factor( Factor Name( "X2" ), Number of Levels( 3 ), Factor Transformation( "Log" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ) ) ); ``` ### [Save Script to Script Window](#save-script-to-script-window) **Syntax:** obj \<< Save Script to Script Window **Description:** Create a Script that will reproduce this design. ``` d = Constant Stress ALT Design( Factors( Factor( Factor Name( "X1" ), Number of Levels( 3 ), Factor Transformation( "Arrhenius Celsius" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ), Factor( Factor Name( "X2" ), Number of Levels( 3 ), Factor Transformation( "Log" ), Low Usage Condition( 20 ), High Usage Condition( 30 ), Low Test Condition( 90 ), High Test Condition( 110 ), ) ), ALT Plan(), Save Script to Script Window ); ``` # [Contour Plot](#contour-plot) ## [Associated Constructors](#associated-constructors) ### [Contour Plot](#contour-plot_1) **Syntax:** Contour Plot( X( column, column ), Y( column ) ) **Description:** Produces a graph of three variables in a two-dimensional view, where the third variable is represented by contour curves of equal value. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); ``` ## [Columns](#columns) ### [By](#by) **Syntax:** obj = Contour Plot(...\...) **Description:** Produce multiple reports, one for each level of the variable(s). ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); ``` ### [X](#x) **Syntax:** obj = Contour Plot(...X( column, column )...) **Description:** Two independent variables that define the domain. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); ``` ### [Y](#y) **Syntax:** obj = Contour Plot(...Y( column(s) )...) **Description:** The response variable that will be used to compute curves of constant value over the domain. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); ``` ## [Item Messages](#item-messages) ### [Fill Areas](#fill-areas) **Syntax:** obj \<< Fill Areas( state=0|1 ) **Description:** Fills the areas between the contours with a solid color on the contour plot. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Fill Areas( 1 ); ``` ### [Fit to Window](#fit-to-window) **Syntax:** obj \<< Fit to Window( "Auto"|"On"|"Off" ) **Description:** Sets the auto stretching behavior of the report. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Fit to Window( "Off" ); ``` ### [Generate Grid](#generate-grid) **Syntax:** dt = obj \<< Generate Grid( Xsize, Ysize ) **Description:** Saves a grid of the contour information in a new data table for contours currently drawn on the contour plot. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Generate Grid( 11, 11 ); ``` ### [Label Contours](#label-contours) **Syntax:** obj \<< Label Contours( state=0|1 ) **Description:** Shows or hides the label or z-value of the contour lines. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Label Contours( 1 ); ``` ### [Retrieve Contours](#retrieve-contours) **Syntax:** obj \<< Retrieve Contours( table ) **Description:** Retrieves contour information stored in a data table for contours drawn on the contour plot. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Specify Contours( Min( -4 ), Max( 6 ), N( 3 ), Contour( 1, -4, -2768895 ), Contour( 2, 1, -9344469 ), Contour( 3, 6, -13927556 ) ); obj << Save Contours; obj << Revert Contours; obj << Retrieve Contours( Data Table( "Contours from Little Pond" ) ); ``` ### [Revert Contours](#revert-contours) **Syntax:** obj \<< Revert Contours **Description:** Reverts any changes to contours drawn on the contour plot. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Specify Contours( Min( -4 ), Max( 8 ), N( 4 ), Contour( 1, -4, -2768895 ), Contour( 2, 0, -7700704 ), Contour( 3, 4, -12632256 ), Contour( 4, 8, -14575206 ), Contour( 5, 8, -16517899 ) ); Wait( 2 ); obj << Revert Contours; ``` ### [Save Contours](#save-contours) **Syntax:** dt = obj \<< Save Contours **Description:** Saves contour information stored in a new data table for contours currently drawn on the contour plot. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Save Contours; ``` ### [Save Triangulation](#save-triangulation) **Syntax:** dt = obj \<< Save Triangulation **Description:** Lists the coordinates of each triangle used to construct the contours in a new data table. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Save Triangulation; ``` ### [Set Alpha](#set-alpha) **Syntax:** obj \<< Set Alpha( number ) **Description:** Set the alpha value to control the shape of the boundary. A value of 0 results in the convex hull of the point set. Larger values of alpha remove triangles with long edges. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Contour Plot( X( :Longitude, :Latitude ), Y( :Pop ), Fill Areas( 1 ) ); obj << Set Alpha( 0.06 ); ``` ### [Show Boundary](#show-boundary) **Syntax:** obj \<< Show Boundary( state=0|1 ) **Description:** Shows or hides the boundary around the total contour area on the contour plot. On by default. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Show Boundary( 1 ); ``` ### [Show Contours](#show-contours) **Syntax:** obj \<< Show Contours( state=0|1 ) **Description:** Shows or hides the data points on the contour plot. On by default. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Show Contours( 1 ); ``` ### [Show Control Panel](#show-control-panel) **Syntax:** obj \<< Show Control Panel( state=0|1 ) **Description:** Shows or hides the controls for the shape boundary. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Contour Plot( X( :Longitude, :Latitude ), Y( :Pop ), Fill Areas( 1 ) ); obj << Set Alpha( 0.06 ); obj << Show Control Panel( 1 ); ``` ### [Show Data Points](#show-data-points) **Syntax:** obj \<< Show Data Points( state=0|1 ) **Description:** Shows or hides the data points on the contour plot. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Show Data Points( 1 ); ``` ### [Show Missing Data Points](#show-missing-data-points) **Syntax:** obj \<< Show Missing Data Points( state=0|1 ) **Description:** Shows or hides points with missing Y values if data points are shown ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); dt << New Column( "SqrtZ", Numeric, Continuous, Formula( Sqrt( Z ) ) ); r = dt << Select Where( :Z < 0 ); r << Colors( "Red" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :SqrtZ ) ); obj << Show Data Points( 1 ); Wait( 2 ); obj << Show Missing Data Points( 1 ); ``` ### [Specify Contours](#specify-contours) **Syntax:** obj \<< Specify Contours( Min( value ), Max( value ), N( number ), Contour(1, value, color), Contour(2, value, color), ... Contour(n+1, value, color) ) **Description:** Changes the number and size of the contours on the contour plot. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Specify Contours( Min( -4 ), Max( 8 ), N( 4 ), Contour( 1, -4, -2768895 ), Contour( 2, 0, -7700704 ), Contour( 3, 4, -12632256 ), Contour( 4, 8, -14575206 ), Contour( 5, 8, -16517899 ) ); ``` ### [Transform](#transform) **Syntax:** obj \<< Transform( "None"|"Range Normalized" ) **Description:** Set the transform for the triangulation computation. Transformation will not affect the coordinates of the output, but the triangulation will be computed in the transformed space. This might result in a different triangulation depending on the aspect ratio of the coordinate space and transformed space. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Contour Plot( X( :Longitude, :Latitude ), Y( :Pop ), Fill Areas( 1 ) ); Wait( 2 ); obj << Transform( "Range Normalized" ); ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Automatic Recalc](#automatic-recalc) **Syntax:** obj \<< Automatic Recalc( state=0|1 ) **Description:** Redoes the analysis automatically for exclude and data changes. If the Automatic Recalc option is turned on, you should consider using Wait(0) commands to ensure that the exclude and data changes take effect before the recalculation. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Automatic Recalc( 1 ); dt << Select Rows( 5 ) << Exclude( 1 ); ``` ### [Broadcast](#broadcast) **Syntax:** obj \<< Broadcast(message) **Description:** Broadcasts a message to a platform. If return results from individual objects are tables, they are concatenated if possible, and the final format is identical to either the result from the Save Combined Table option in a Table Box or the result from the Concatenate option using a Source column. Other than those, results are stored in a list and returned. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" ); objs = Control Chart Builder( Variables( Subgroup( :DAY ), Y( :DIAMETER ) ), By( :OPERATOR ) ); objs[1] << Broadcast( Save Summaries ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy ByGroup Script](#copy-bygroup-script) **Syntax:** obj \<< Copy ByGroup Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Copy ByGroup Script; ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get ByGroup Script](#get-bygroup-script) **Syntax:** obj \<< Get ByGroup Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); t = obj[1] << Get ByGroup Script; Show( t ); ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Group Platform](#get-group-platform) **Syntax:** obj \<< Get Group Platform **Description:** Return the Group Platform object if this platform is part of a Group. Otherwise, returns Empty(). ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Y( :weight ), X( :height ), By( :sex ) ); group = biv[1] << Get Group Platform; Wait( 1 ); group << Layout( "Arrange in Tabs" ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \<, < \<, < \<, < \< ); **Description:** Creates a JSL script to produce this analysis, and save it as a table property in the data table. You can specify a name for the script. The Append Suffix option appends a numeric suffix to the script name, which differentiates the script from an existing script with the same name. The Prompt option prompts the user to specify a script name. The Replace option replaces an existing script with the same name. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Data Table; ``` ### [Save ByGroup Script to Journal](#save-bygroup-script-to-journal) **Syntax:** obj \<< Save ByGroup Script to Journal **Description:** Create a JSL script to produce this analysis, and add a Button to the journal containing this script. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Journal; ``` ### [Save ByGroup Script to Script Window](#save-bygroup-script-to-script-window) **Syntax:** obj \<< Save ByGroup Script to Script Window **Description:** Create a JSL script to produce this analysis, and append it to the current Script text window. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save ByGroup Script to Script Window; ``` ### [Save Script for All Objects](#save-script-for-all-objects) **Syntax:** obj \<< Save Script for All Objects **Description:** Creates a script for all report objects in the window and appends it to the current Script window. This option is useful when you have multiple reports in the window. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Save Script for All Objects; ``` ### [Save Script for All Objects To Data Table](#save-script-for-all-objects-to-data-table) **Syntax:** obj \<< Save Script for All Objects To Data Table( ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); obj << Save Script to Data Table( "My Analysis", <(... Transform Column(, Formula(), \[Random Seed()\], [Numeric|Character|Expression], [Continuous|Nominal|Ordinal|Unstructured Text], [column properties]) ...) **Description:** Create a transform column in the local context of an object, usually a platform. The transform column is active only for the lifetime of the platform. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Distribution( Transform Column( "age^2", Format( "Fixed Dec", 5, 0 ), Formula( :age * :age ) ), Continuous Distribution( Column( :"age^2"n ) ) ); ``` ### [View Web XML](#view-web-xml) **Syntax:** obj \<< View Web XML **Description:** Returns the XML code that is used to create the interactive HTML report. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); xml = obj << View Web XML; ``` ### [Window View](#window-view) **Syntax:** obj = Contour Plot(...Window View( "Visible"|"Invisible"|"Private" )...) **Description:** Set the type of the window to be created for the report. By default a Visible report window will be created. An Invisible window will not appear on screen, but is discoverable by functions such as Window(). A Private window responds to most window messages but is not discoverable and must be addressed through the report object ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( Window View( "Private" ), Y( :weight ), X( :height ), Fit Line ); eqn = Report( biv )["Linear Fit", Text Edit Box( 1 )] << Get Text; biv << Close Window; New Window( "Bivariate Equation", Outline Box( "Big Class Linear Fit", Text Box( eqn, <...) **Description:** Specifies noise factors, which must be columns that are ingredients to the formula columns. Noise factors are used to study robustness (or flatness) with respect to transmitted variation from these factors. The resulting profiler includes derivatives of the formulas with respect to the noise factors. **Contour Profiler Example** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), Noise Factors( :SILANE ) ); ``` **Custom Profiler Example** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), Noise Factors( :SILANE ) ); ``` **Mixture Profiler Example** ``` dt = Open( "$SAMPLE_DATA/Plasticizer.jmp" ); obj = dt << Mixture Profiler( Y( :Pred Formula Y ), Noise Factors( :p1 ) ); ``` **Profiler Example** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), Noise Factors( :SILANE ) ); ``` ### [Prediction Formula](#prediction-formula) **Syntax:** obj = Contour Profiler(...Prediction Formula( column(s) )...) **Description:** Specifies the response columns that contain formulas. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); ``` ### [Y](#y) **Syntax:** obj = Contour Profiler(...Y( column(s) )...) **Description:** Specifies the response columns that contain formulas. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); ``` ## [Item Messages](#item-messages) ### [Animation](#animation) **Syntax:** obj \<< Animation( \, \, , ) **Description:** Starts or stops the animation of the profiler. You can also specify how the animation cycles through factor combinations. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Animation( Tour Type( "Sequential" ), Go ); Wait( 3 ); obj << Animation( "Stop" ); ``` ### [Append Settings to Table](#append-settings-to-table) **Syntax:** obj \<< Append Settings to Table **Description:** Saves the settings of the current profiler as a new row at the end of the data table. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Append Settings to Table; ``` ### [Arrange X Controls Left](#arrange-x-controls-left) **Syntax:** obj \<< Arrange X Controls Left( state=0|1 ) **Description:** Rearranges the X and Y controls horizontally so that the X controls are on the left. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj << Arrange X Controls Left( 1 ); ``` ### [Broadcast Factor Settings](#broadcast-factor-settings) **Syntax:** obj \<< Broadcast Factor Settings **Description:** Sends the factor settings for the current profiler to all other profilers. This option does not link the profilers. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), Desirability Functions( 1 ), Term Value( SILICA( 1.75, Lock( 0 ), Show( 1 ) ), SILANE( 45.2, Lock( 0 ), Show( 1 ) ), SULFUR( 2.45, Lock( 0 ), Show( 1 ) ) ) ); obj << Contour Profiler( 1 ); Wait( 1 ); obj << Broadcast Factor Settings; ``` ### [Clipping](#clipping) **Syntax:** obj \<< Clipping( horizCenter,horizWidth,verticalCenter,VerticalWidth ) **Description:** Sets up a clipping region, which is circular for wafer maps. ``` dt = Open( "$Sample_Data/Wafer Stacked.jmp" ); Neural( Y( :Defects ), X( :X_Die, :Y_Die ), Informative Missing( 0 ), Validation Method( "Holdback", 0.3333 ), Fit( NGaussian( 9 ), Contour Profiler( 1, Term Value( :X_Die( 0, Lock( 0 ), Show( 1 ) ), :Y_Die( 0, Lock( 0 ), Show( 1 ) ) ), Contour Value( :Defects( 0.1309, Min( -0.28 ), Max( 7.28 ) ) ), Grid Density( "40 x 40" ), Contour Grid( 0, 0.275, 0.025, :Defects, Filled( 1 ), Reverse Scale( 0 ) ), Horizontal Factor( :X_Die ), Vertical Factor( :Y_Die ), Clipping( {0, 0}, {42, 42} ) ) ), SendToReport( Dispatch( {"Model NGaussian(9)", "Contour Profiler"}, "Contour Profiler Frame", FrameBox, {Frame Size( 400, 400 )} ) ) ); ``` ### [Conditional Predictions](#conditional-predictions) **Syntax:** scrobj \<< Conditional Predictions( state=0|1 ) **Description:** Includes random effects when formulating the predicted value and profiles. This option is available only when random effects are included in the model. ``` dt = Open( "$Sample_Data/Reactor.jmp" ); Column( "A" ) << Set Modeling Type( "Nominal" ); obj = dt << Fit Model( Y( :Y ), Effects( :Ct, :T, :Cn, :Ct * :T, :T * :Cn ), Random Effects( :A ), Emphasis( "Minimal Report" ), Run( Contour Profiler( 1 ) ) ); scrobj = (Report( obj )["Contour Profiler"] << get scriptable object); scrobj << Conditional Predictions( 1 ); ``` ### [Contour Grid](#contour-grid) **Syntax:** obj \<< Contour Grid( minimum, maximum, increment, y column, Filled( state=0|1 ), Reverse Scale( state=0|1 ) ) **Description:** Draws a contour grid on the contour profiler. The grid is based on the specified intervals. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj << Contour Grid( 525.7492294, 2173.9472704279, 206.024755128638, :PredFormulaMODULUS ); ``` ### [Contour Label](#contour-label) **Syntax:** obj \<< Contour Label( state=0|1 ) **Description:** Shows or hides the name of the response variables as labels on the contour profiler. On by default. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj << Contour Label( 0 ); ``` ### [Contour Value](#contour-value) **Syntax:** obj \<< Contour Value( y1( number, \, \, \, \), y2 (...) ) **Description:** Sets specific contour values for responses in the contour profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj << Contour Value( :PredFormulaAbrasion( 167, Lo Limit( 160 ), Hi Limit( 180 ) ), :Pred Formula Elong( 320 ) ); ``` ### [Copy Settings Script](#copy-settings-script) **Syntax:** obj \<< Copy Settings Script **Description:** Copies the current factor settings to the clipboard. The settings can then be pasted into another profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Set to Data in Row( 4 ); obj << Copy Settings Script; obj2 = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj2 << Paste Settings Script; ``` ### [Custom Profiler](#custom-profiler) **Syntax:** obj \<< Custom Profiler( state=0|1 ) **Description:** Shows or hides the Custom Profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Custom Profiler( 1 ); ``` ### [Data Points](#data-points) **Syntax:** obj \<< Data Points( state=0|1 ) **Description:** Shows or hides the data points. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Data Points( 1 ); ``` ### [Formulas for OPTMODEL](#formulas-for-optmodel) **Syntax:** obj \<< Formulas for OPTMODEL **Description:** Saves the prediction formulas from the model in a new file as SAS statements for PROC OPTMODEL. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Formulas for OPTMODEL; ``` ### [Get Constraints](#get-constraints) **Syntax:** obj \<< Get Constraints **Description:** Returns a list of factor constraints. ``` dt = Open( "$SAMPLE_DATA/Plasticizer.jmp" ); obj = dt << Profiler( Y( :Pred Formula Y ), Profiler( 1, Profile at Boundary( "Stop at Boundaries" ), ) ); obj << Get Constraints; ``` ### [Get Factor Settings](#get-factor-settings) **Syntax:** obj \<< Get Factor Settings **Description:** Returns the current factor settings as a list. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Get Factor Settings; ``` ### [Get Factor Settings Script](#get-factor-settings-script) **Syntax:** obj \<< Get Factor Settings Script **Description:** Returns the current factor settings as an expression that can be used in a script. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Get Factor Settings Script; ``` ### [Get Simulator](#get-simulator) **Syntax:** obj \<< Get Simulator **Description:** Returns a reference to the Simulator. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Simulator( 1, Factors( SILICA << Random( Normal( 1.25, 0.3266 ) ), SILANE << Fixed( 50 ), SULFUR << Fixed( 2.25 ) ), Responses( Pred Formula ABRASION << No Noise, Pred Formula MODULUS << No Noise, Pred Formula ELONG << Add Random Noise( 1 ), Pred Formula HARDNESS << Add Random Weighted Noise( 1 ) ) ); obj2 = obj << Get Simulator; obj2 << Simulation Experiment; ``` ### [Graph Updating](#graph-updating) **Syntax:** obj \<< Graph Updating( "Per Mouse Move"|"Per Mouse Up" ) **Description:** Sets the frequency of updating the Contour Profiler. The Per Mouse Move setting updates the graph as the mouse moves. The Per Mouse Up setting updates the graph after the mouse button has been released. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Graph Updating( "Per Mouse Up" ); // use your mouse to move the slider scale for a response ``` ### [Grid Density](#grid-density) **Syntax:** obj \<< Grid Density( "10 x 10"|"20 x 20"|"30 x 30"|"40 x 40"|"50 x 50"|"60 x 60" ) **Description:** Sets the density of the individual mesh or surface plots. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj << Grid Density( "10 x 10" ); ``` ### [Hide X Controls](#hide-x-controls) **Syntax:** obj \<< Hide X Controls( state=0|1 ) **Description:** Shows or hides the control settings for the factors. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Hide X Controls( 1 ); ``` ### [Hide Y Controls](#hide-y-controls) **Syntax:** obj \<< Hide Y Controls( state=0|1 ) **Description:** Shows or hides the control settings for the responses. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Hide Y Controls( 1 ); ``` ### [Horizontal Factor](#horizontal-factor) **Syntax:** obj \<< Horizontal Factor( column ) **Description:** Specifies the factor that is displayed on the horizontal axis. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 2 ); obj << Horizontal Factor( :SULFUR ); ``` ### [Link Profilers](#link-profilers) **Syntax:** obj \<< Link Profilers( state=0|1 ) **Description:** Links all the profilers in a single report together, so that a change in a factor in one profiler causes that factor to change to that value in all other profilers. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Prediction Profiler( 1 ); obj << Contour Profiler( 1 ); obj << Link Profilers( 1 ); Wait( 1 ); obj << Term Value( :Silica( 1.78 ), :Sulfur( 2.34 ) ); ``` ### [Multiple Contour Frames](#multiple-contour-frames) **Syntax:** obj \<< Multiple Contour Frames( Horizontal Factor( column ), Vertical Factor( column ), ) **Description:** Adds another contour plot that represents the specified combination of factors. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj << Multiple Contour Frames( Horizontal Factor( :SULFUR ), Vertical Factor( :SILANE ) ); ``` ### [Number of Plots Across](#number-of-plots-across) **Syntax:** obj \<< Number of Plots Across( number ) **Description:** Specifies the layout of the plots when multiple contour frames are shown in the report. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj << Multiple Contour Frames( Horizontal Factor( :Sulfur ), Vertical Factor( :Silane ) ); obj << Multiple Contour Frames( Horizontal Factor( :Silane ), Vertical Factor( :Silica ) ); obj << Number of Plots Across( 2 ); ``` ### [Paste Settings Script](#paste-settings-script) **Syntax:** obj \<< Paste Settings Script **Description:** Pastes the profiler settings from the clipboard to a profiler in another report. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Set to Data in Row( 4 ); obj << Copy Settings Script; obj2 = Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj2 << Paste Settings Script; ``` ### [Predict for Another Table](#predict-for-another-table) **Syntax:** obj \<< Predict for Another Table( ) **Description:** Adds prediction columns to a specified data table, using the factors in that table. This option is available only for continuous responses. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); dt2 = dt << Subset( All rows, columns( :SILICA, :SILANE, :SULFUR ), Output Table( "Subset" ) ); obj << Predict For Another Table( dt2 ); ``` ### [Prediction Profiler](#prediction-profiler) **Syntax:** obj \<< Prediction Profiler( state=0|1 ) **Description:** Shows or hides the Prediction Profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Prediction Profiler( 1 ); ``` ### [Remember Settings](#remember-settings) **Syntax:** obj \<< Remember Settings **Description:** Adds an outline node to the report with the values of the factor settings. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Remember Settings; ``` ### [Remove Contour Grid](#remove-contour-grid) **Syntax:** obj \<< Remove Contour Grid **Description:** Removes the contour grid that is overlaid on the contour profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Contour Grid( 525.7492294, 2173.9472704279, 206.024755128638, :PredFormulaMODULUS ); Wait( 2 ); obj << Remove Contour Grid; ``` ### [Reset](#reset) **Syntax:** obj \<< Reset **Description:** Updates the predictions at the current values. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Term Value( :Silica( 1.78 ), :Sulfur( 2.34 ) ); obj << Reset; ``` ### [Save Expanded Formulas](#save-expanded-formulas) **Syntax:** obj \<< Save Expanded Formulas **Description:** Saves a new formula column to the data table. The new column contains resolved formula references within the formulas used as Y variables to see the underlying variables. This is available only after the Expand Intermediate Formulas option is selected in the launch window or the Expand message is specified in the Profiler script. ``` dt = Open( "$SAMPLE_DATA/Nonlinear Examples/CES Production Function.jmp" ); obj = dt << Profiler( Y( :GP Fit, :NL Fit, :Difference ), Expand, Contour Profiler( 1 ) ); obj << Save Expanded Formulas; ``` ### [Set Contours to Current](#set-contours-to-current) **Syntax:** obj \<< Set Contours to Current **Description:** Resets the contour lines to where the current Y values are located. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Contour Value( :PredFormulaAbrasion( 167, Lo Limit( 160 ), Hi Limit( 180 ) ), :Pred Formula Elong( 320 ) ); Wait( 1 ); obj << Set Contours to Current; ``` ### [Set Script](#set-script) **Syntax:** obj \<< Set Script( Function( {arguments}, \<{locals}>, expr ) ) **Description:** Sets a script that is run each time a factor changes. ``` ProfileCallbackLog = Function( {arg}, Show( arg ) ); dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Set Script( ProfileCallbackLog ); obj << Term Value( :Silica( 1 ) ); ``` ### [Set to Data in Row](#set-to-data-in-row) **Syntax:** obj \<< Set to Data in Row( row number ) **Description:** Assigns the values of a data table row to the X variables in the profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 2 ); obj << Set to Data in Row( 4 ); ``` ### [Show Formulas](#show-formulas) **Syntax:** obj \<< Show Formulas **Description:** Opens a script window that contains JSL for all formulas that are being profiled. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Show Formulas; ``` ### [Simulator](#simulator) **Syntax:** obj \<< Simulator( state=0|1 ) **Description:** Shows or hides the Simulator. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Simulator( 1 ); ``` ### [Surface Plot](#surface-plot) **Syntax:** obj \<< Surface Plot( state=0|1 ) **Description:** Shows or hides the individual mesh plots. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Surface Plot( 1 ); ``` ### [Surface Profiler](#surface-profiler) **Syntax:** obj \<< Surface Profiler( state=0|1 ) **Description:** Shows or hides the Surface Profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Surface Profiler( 1 ); ``` ### [Term Value](#term-value) **Syntax:** obj \<< Term Value( (x1( number ),x2( number ), ... ) **Description:** Sets specific term values for factors on the contour profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj << Term Value( :Silica( 1.78 ), :Sulfur( 2.34 ) ); ``` ### [Unthreaded](#unthreaded) **Syntax:** obj \<< Unthreaded( state=0|1 ) **Description:** To suppress any multithreading in evaluating the profile traces, the contour grid, and the optimizer trips. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Desirability Functions( 1 ); obj << Unthreaded( 1 ); obj << Maximize Desirability; ``` ### [Up Dots](#up-dots) **Syntax:** obj \<< Up Dots( state=0|1 ) **Description:** Shows or hides dots next to the contour lines. These dots indicate the upward direction of the response. On by default. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj << Up Dots( 0 ); ``` ### [Vertical Factor](#vertical-factor) **Syntax:** obj \<< Vertical Factor( column ) **Description:** Specifies the factor that is displayed on the vertical axis. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 2 ); obj << Vertical Factor( :SULFUR ); ``` ### [Y Colors](#y-colors) **Syntax:** obj \<< Y Colors( color1, color2, ... ) **Description:** Specifies the colors for each Y term in both the contour plot and the individual mesh plots. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), Surface Plot( 1 ) ); obj << Y Colors( 8, 4, 5, 46 ); ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \< ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Save Script to Data Table( "My Analysis", < ), Limits( Sigma( "sigma" ), )> ) ) ) **Description:** Enables you to interactively create control charts, which are used to determine whether a process is stable and predictable. The Control Chart Builder platform can be used to create the following types of control charts: IMR, XBar, Short Run, Run, P, NP, C, U, Laney P', Laney U', Levey-Jennings, IMR on Means, Three Way, and Rare Event charts. #### [C Chart](#c-chart) ``` // Create a C chart by adding a Y variable, changing the Class to Shewhart Attribute, changing the Statistic to Count, and changing the Sigma to Poisson. dt = Open( "$SAMPLE_DATA/Quality Control/Orange Juice.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Sample ), Y( :Status ), Phase( :Phase ) ), Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Poisson" ) ) ), Show Control Panel( 0 ) ); ``` #### [IMR Chart](#imr-chart) ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); ``` #### [IMR on Group Standard Deviation Chart (Set Subgroup Size)](#imr-on-group-standard-deviation-chart-set-subgroup-size) ``` // Create an IMR on Group Standard Deviation chart by adding a Y variable and defining a subgroup size, and changing the Statistic on the location chart to Standard Deviation, on the dispersion chart to Moving Range on Std Dev and the Sigma on both charts to Moving Range. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Chart( Position( 1 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Std Dev" ) ), Limits( Sigma( "Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [IMR on Group Standard Deviation Chart (Subgroup Variable)](#imr-on-group-standard-deviation-chart-subgroup-variable) ``` // Create an IMR on Group Standard Deviation chart by adding a Y variable and a subgroup variable, and changing the Statistic on the location chart to Standard Deviation, on the dispersion chart to Moving Range on Std Dev and the Sigma on both charts to Moving Range. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Std Dev" ) ), Limits( Sigma( "Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [IMR on Means Chart (Set Subgroup Size)](#imr-on-means-chart-set-subgroup-size) ``` // Create an IMR on Means chart by adding a Y variable and defining a subgroup size, and changing the Statistic on the dispersion chart to Moving Range on Means and the Sigma on both charts to Moving Range. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Chart( Position( 1 ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [IMR on Means Chart (Subgroup Variable)](#imr-on-means-chart-subgroup-variable) ``` // Create an IMR on Means chart by adding a Y variable and a subgroup variable, and changing the Statistic on the dispersion chart to Moving Range on Means and the Sigma on both charts to Moving Range. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [Levey-Jennings Chart](#levey-jennings-chart) ``` // Create a Levey-Jennings chart by adding a Y variable, removing the dispersion chart, and changing the Sigma to Levey Jennings. Make sure that the Statistic is set to Individual. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Show Two Shewhart Charts( 0 ), Variables( Y( :Weight ) ), Chart( Points( Statistic( "Individual" ) ), Limits( Sigma( "Levey Jennings" ) ) ), Show Control Panel( 0 ) ); ``` #### [Median Moving Range Chart](#median-moving-range-chart) ``` // Create a Median Moving Range chart by adding a Y variable and changing the Sigma to Median Moving Range on both the location and dispersion charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Chart( Position( 1 ), Limits( Sigma( "Median Moving Range" ) ) ), Chart( Position( 2 ), Limits( Sigma( "Median Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [Median Moving Range on Group Means Chart (Set Subgroup Size)](#median-moving-range-on-group-means-chart-set-subgroup-size) ``` // Create a Median Moving Range on Group Means chart by adding a Y variable and defining a subgroup size, changing the Statistic on the dispersion chart to Moving Range on Means, and changing the Sigma to Median Moving Range on both the location and dispersion charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Chart( Position( 1 ), Limits( Sigma( "Median Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Median Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [Median Moving Range on Group Means Chart (Subgroup Variable)](#median-moving-range-on-group-means-chart-subgroup-variable) ``` // Create a Median Moving Range on Group Means chart by adding a Y variable and a subgroup variable, changing the Statistic on the dispersion chart to Moving Range on Means, and changing the Sigma to Median Moving Range on both the location and dispersion charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Limits( Sigma( "Median Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Median Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [Median Moving Range on Group Standard Deviations Chart (Set Subgroup Size)](#median-moving-range-on-group-standard-deviations-chart-set-subgroup-size) ``` // Create a Median Moving Range on Group Standard Deviations chart by adding a Y variable and defining a subgroup size, changing the Statistic on the location chart to Standard deviation, on the dispersion chart to Moving Range on Std Dev, and changing the Sigma to Median Moving Range on both the location and dispersion charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Chart( Position( 1 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Median Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Std Dev" ) ), Limits( Sigma( "Median Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [Median Moving Range on Group Standard Deviations Chart (Subgroup Variable)](#median-moving-range-on-group-standard-deviations-chart-subgroup-variable) ``` // Create a Median Moving Range on Group Standard Deviations chart by adding a Y variable and a subgroup variable, changing the Statistic on the location chart to Standard deviation, on the dispersion chart to Moving Range on Std Dev, and changing the Sigma to Median Moving Range on both the location and dispersion charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Median Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Std Dev" ) ), Limits( Sigma( "Median Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [NP Chart](#np-chart) ``` // Create an NP chart by adding a Y variable, changing the Class to Shewhart Attribute, changing the Statistic to Count, and changing the Sigma to Binomial (P, NP). dt = Open( "$SAMPLE_DATA/Quality Control/Orange Juice.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Sample ), Y( :Status ), Phase( :Phase ) ), Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Binomial" ) ) ), Show Control Panel( 0 ) ); ``` #### [P Chart](#p-chart) ``` // Create a P chart by adding a Y variable, changing the Class to Shewhart Attribute, changing the Statistic to Proportion, and changing the Sigma to Binomial (P, NP). dt = Open( "$SAMPLE_DATA/Quality Control/Orange Juice.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Sample ), Y( :Status ), Phase( :Phase ) ), Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Binomial" ) ) ), Show Control Panel( 0 ) ); ``` #### [P' Chart](#p-chart_1) ``` // Create a P' chart by adding a Y variable, changing the Class to Shewhart Attribute, changing the Statistic to Proportion, and changing the Sigma to Laney P'. dt = Open( "$SAMPLE_DATA/Quality Control/Washers.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Lot ), Y( :"# defective"n ), n Trials( :Lot Size ) ), Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Laney P Prime" ) ) ), Show Control Panel( 0 ) ); ``` #### [Rare Event G Chart](#rare-event-g-chart) ``` // Create a G chart by changing the class to Rare Event and adding a nonnegative discrete Y variable. Make sure that the Sigma is set to Negative Binomial. dt = Open( "$SAMPLE_DATA/Quality Control/Fan Burnout.jmp" ); obj = dt << Control Chart Builder( Class( "Rare Event" ), Variables( Subgroup( :Burnout ), Y( :Hours between Burnouts ) ), Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Negative Binomial" ) ) ), Show Control Panel( 0 ) ); ``` #### [Rare Event T Chart](#rare-event-t-chart) ``` // Create a T chart by changing the class to Rare Event, changing the Sigma to Weibull, and adding a nonnegative discrete Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Fan Burnout.jmp" ); obj = dt << Control Chart Builder( Class( "Rare Event" ), Variables( Subgroup( :Burnout ), Y( :Hours between Burnouts ) ), Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Weibull" ) ) ), Show Control Panel( 0 ) ); ``` #### [Run Chart](#run-chart) ``` // Create a Run chart by adding a Y variable, turning off the limits, and removing the dispersion chart. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Show Two Shewhart Charts( 0 ), Show Limit Summaries( 0 ), Variables( Y( :Weight ) ), Chart( Limits( Show Lower Limit( 0 ), Show Upper Limit( 0 ) ) ), Show Control Panel( 0 ) ); ``` #### [Short Run Difference Chart](#short-run-difference-chart) ``` // Create a Short Run Difference chart by changing the class to Short Run and adding a Product or Part variable. Make sure that the Statistic values for the location chart and dispersion chart are set to Centered and Moving Range Centered, respectively. Centered Short Run control charts are sometimes referred to as Deviation from Nominal (DNOM) charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Class( "Short Run" ), Variables( Y( :Weight ), Part( :Product ) ), Show Control Panel( 0 ) ); ``` #### [Short Run Difference Chart for XBar](#short-run-difference-chart-for-xbar) ``` // Create a Short Run Difference chart for summarized data by changing the class to Short Run and adding a Product or Part variable, Short Run Standardized charts are sometimes referred to as Z-MR charts. Centered Short Run control charts are sometimes referred to as Deviation from Nominal (DNOM) charts. dt = Open( "$SAMPLE_DATA/Quality Control/Fancy Chocolate Factory.jmp" ); obj = dt << Control Chart Builder( Show Product Separators( 0 ), Class( "Short Run" ), Variables( Subgroup( :Box ), Y( :"%Cocoa"n ), Part( :Product ) ), Show Control Panel( 0 ) ); ``` #### [Short Run Standardized Chart](#short-run-standardized-chart) ``` // Create a Short Run Standardized chart by changing the class to Short Run and adding a Subgroup and a Product or Part variable, changing the Statistic for the location chart type to Standardized, and changing the Statistic for the dispersion chart to Moving Range Standardized. Short Run Standardized charts are sometimes referred to as Z-MR charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Class( "Short Run" ), Variables( Y( :Weight ), Part( :Product ) ), Chart( Position( 1 ), Points( Statistic( "Standardized" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range Standardized" ) ) ), Show Control Panel( 0 ) ); ``` #### [Short Run Standardized Chart for XBar](#short-run-standardized-chart-for-xbar) ``` // Create a Short Run Standardized chart for summarized data by changing the class to Short Run and adding a Subgroup and a Product or Part variable, Short Run Standardized charts are sometimes referred to as Z-MR charts. Centered Short Run control charts are sometimes referred to as Deviation from Nominal (DNOM) charts. dt = Open( "$SAMPLE_DATA/Quality Control/Fancy Chocolate Factory.jmp" ); obj = dt << Control Chart Builder( Show Product Separators( 0 ), Class( "Short Run" ), Variables( Subgroup( :Box ), Y( :"%Cocoa"n ), Part( :Product ) ), Chart( Position( 1 ), Points( Statistic( "Standardized" ) ) ), Chart( Position( 2 ), Points( Statistic( "Range Standardized" ) ) ), Show Control Panel( 0 ) ); ``` #### [Three Way Chart (Set Subgroup Size)](#three-way-chart-set-subgroup-size) ``` // Create a Three Way chart by adding a dispersion chart after adding a Y variable and setting a subgroup size. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Chart( Position( 1 ), Points( Statistic( "Average" ) ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 3 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Standard Deviation" ) ) ), Show Control Panel( 0 ) ); ``` #### [Three Way Chart (Subgroup Variable)](#three-way-chart-subgroup-variable) ``` // Create a Three Way chart by adding a dispersion chart after adding a Y variable and adding a subgroup variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Points( Statistic( "Average" ) ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 3 ), Points( Statistic( "Range" ) ), Limits( Sigma( "Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [U Chart](#u-chart) ``` // Create a U chart by adding a Y variable, changing the Class to Shewhart Attribute, changing the Statistic to Proportion, and changing the Sigma to Poisson. dt = Open( "$SAMPLE_DATA/Quality Control/Orange Juice.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Sample ), Y( :Status ), Phase( :Phase ) ), Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Poisson" ) ) ), Show Control Panel( 0 ) ); ``` #### [U' Chart](#u-chart_1) ``` // Create a U' chart by adding a Y variable, changing the Class to Shewhart Attribute, changing the Statistic to Proportion, and changing the Sigma to Laney U'. dt = Open( "$SAMPLE_DATA/Quality Control/Washers.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Lot ), Y( :"# defective"n ), n Trials( :Lot Size ) ), Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Laney U Prime" ) ) ), Show Control Panel( 0 ) ); ``` #### [XBar/R Chart](#xbarr-chart) ``` // Create an XBar/R chart by adding a subgroup or setting a subgroup size after adding a Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Show Control Panel( 0 ) ); ``` #### [XBar/S Chart (Set Subgroup Size)](#xbars-chart-set-subgroup-size) ``` // Create an XBar/S chart by adding a Y variable and defining a subgroup size, changing the Statistic for the dispersion chart to Standard Deviation, and changing the Sigma for the location chart to Standard Deviation. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Chart( Position( 1 ), Limits( Sigma( "Standard Deviation" ) ) ), Chart( Position( 2 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Standard Deviation" ) ) ), Show Control Panel( 0 ) ); ``` #### [XBar/S Chart (Subgroup Variable)](#xbars-chart-subgroup-variable) ``` // Create an XBar/S chart by adding a Y variable and a subgroup variable, changing the Statistic for the dispersion chart to Standard Deviation, and changing the Sigma for the location chart to Standard Deviation. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Limits( Sigma( "Standard Deviation" ) ) ), Chart( Position( 2 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Standard Deviation" ) ) ), Show Control Panel( 0 ) ); ``` ## [Item Messages](#item-messages) ### [Add Limits](#add-limits) **Syntax:** obj \<< Chart( Position( number ), Add Limits( {LCL( number ), Avg( number ), UCL( number )} ) ) **Description:** Adds an additional set of limits for the specified chart. The added limits appear as dashed lines. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Chart( Position( 1 ), Add Limits( {LCL( 17.5 ), Avg( 20.25 ), UCL( 23 )} ) ); ``` ### [Add Spec Limits](#add-spec-limits) **Syntax:** obj \<< Chart( Position( number ), Add Spec Limits( {LSL( number ), Target( number ), USL( number )} ) ) **Description:** Sets the specification limits for each Y variable. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Chart( Position( 1 ), Add Spec Limits( {LSL( 18 ), Target( 20.1 ), USL( 22.2 )} ) ); ``` ### [Alarm Script](#alarm-script) **Syntax:** obj \<< Alarm Script( Write( "..." )|Speak( "..." )|Mail( address, subject,"..." ) ) **Description:** Sends a message whenever a point on a control chart fails a given test. The message can be sent to the log, can be spoken, or can be emailed. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Warnings( Test 1( 1 ) ) ), Show Control Panel( 0 ) ); obj << Alarm Script( Write( "Out of Control for test ", qc_test, " in column ", qc_col, " in sample ", qc_sample, " in phase ", qc_phase ) ); ``` ### [Chart](#chart) **Syntax:** obj \<< Chart( Position( number ), \, \, \, \, \, \ ) **Description:** Sets the warning, limit, and point attributes for the chart that is specified by the Position argument. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Warnings( Test 1( 1 ) ), Add Limits( {LCL( 18 ), UCL( 22.4 ), Avg( 20.2 )} ) ), Chart( Position( 2 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Standard Deviation" ) ) ), Show Control Panel( 0 ) ); ``` ### [Class](#class) **Syntax:** obj \<< Class( "Shewhart Variables"|"Shewhart Attribute"|"Short Run"|"Rare Event" ) **Description:** Specifies the class or family of point and sigma statistic combinations. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Orange Juice.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Sample ), Y( :Status ), Phase( :Phase ) ), Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma ) ), Show Control Panel( 0 ) ); ``` ### [Color By Product](#color-by-product) **Syntax:** obj \<< Color By Product( state=0|1 ) **Description:** Colors the points plotted by the level of the product variable. On by default. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Class( "Short Run" ), Variables( Y( :Weight ), Part( :Product ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << Color By Product( 1 ); ``` ### [Connect Thru Missing](#connect-thru-missing) **Syntax:** obj \<< Connect Thru Missing( state=0|1 ) **Description:** Determines whether points and lines are connected when some samples have missing values or excluded rows. **JMP Version Added:** 17 ``` Open( "$SAMPLE_DATA/Quality Control/Clips2.jmp" ); obj = Control Chart Builder( Variables( Y( :Gap ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << Connect Thru Missing( 1 ); ``` ### [Customize Tests](#customize-tests) **Syntax:** obj \<< Customize Tests( Test 1 | Test 2 | Test 3 | Test 4 | Test 5 | Test 6 | Test 7 | Test 8 (n, label) ) **Description:** Enables you to select, customize labels, and set the sigma-based distance parameters for Western Electric tests. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Customize Tests( Test 1( 2, "A" ) ), Chart( Position( 1 ), Warnings( Test 1( 1 ) ) ), Show Control Panel( 0 ) ); ``` ### [Fit to Window](#fit-to-window) **Syntax:** obj \<< Fit to Window( "Auto"|"On"|"Off"|"Maintain Aspect Ratio"="Off" ) **Description:** Sets the auto stretching behavior of the report. "Off" by default. ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Fit to Window( "On" ); ``` ### [Get Control Limits](#get-control-limits) **Syntax:** obj \<< Get Control Limits( filename ) **Description:** Imports control limits from a selected data table and replaces calculated limits on the chart. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Points( Statistic( "Average" ) ), Limits( Sigma( "Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Range" ) ), Limits( Sigma( "Range" ) ) ), Show Control Panel( 0 ) ); obj << Get Control Limits( "$SAMPLE_DATA/Quality Control/CoatingLimits.jmp" ); ``` ### [Get Product Statistics](#get-product-statistics) **Syntax:** obj \<< Get Product Statistics( filename ) **Description:** Imports values for the Short Run Product Target and Sigma from a specified data table. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Class( "Short Run" ), Variables( Y( :Weight ), Part( :Product ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << Get Product Statistics( "$SAMPLE_DATA/Quality Control/CoatingProductInfo.jmp" ); ``` ### [Get Spec Limits](#get-spec-limits) **Syntax:** obj \<< Get Spec Limits( filename ) **Description:** Imports specification limits from a file. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :OZONE, :CO ) ), Set Subgroup Size( 5 ), Show Control Panel( 0 ) ); obj << Get Spec Limits( "$SAMPLE_DATA/CitySpecLimits.jmp" ); ``` ### [Graph Borders](#graph-borders) **Syntax:** obj \<< Graph Borders( state=0|1 ) **Description:** Shows or hides the internal graph panel borders. **JMP Version Added:** 17 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); Wait( 0.5 ); obj << Graph Spacing( 5 ); obj << Graph Transparency( 0 ); obj << Graph Borders( 1 ); ``` ### [Graph Spacing](#graph-spacing) **Syntax:** obj \<< Graph Spacing( gap=2 ) **Description:** Specifies the amount of space between the graph panels. "2" by default. **JMP Version Added:** 16 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << Graph Spacing( 5 ); ``` ### [Graph Spacing Color](#graph-spacing-color) **Syntax:** obj \<< Graph Spacing Color( color ) **Description:** Specifies the color of the space between the graph panels. **JMP Version Added:** 17 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); Wait( 0.5 ); obj << Graph Spacing Color( "Red" ); ``` ### [Graph Spacing Transparency](#graph-spacing-transparency) **Syntax:** obj \<< Graph Spacing Transparency( number ) **Description:** Specifies the transparency level of the space between the graph panels. Must be between 0 and 1. **JMP Version Added:** 17 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); Wait( 0.5 ); obj << Graph Spacing Transparency( 0.3 ); ``` ### [Include Missing Categories](#include-missing-categories) **Syntax:** obj \<< Include Missing Categories( state=0|1 ) **Description:** Includes an extra level for nominal and ordinal variables when the data contain missing values. On by default. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Diameter ), Subgroup( :Day ) ), Show Control Panel( 0 ) ); :Day[{8, 9, 10, 11, 12}] = .; Wait( 1 ); obj << Include Missing Categories( 0 ); ``` ### [K Sigma](#k-sigma) **Syntax:** obj \<< K Sigma( value=3 ) **Description:** Sets the K value to be multiplied by sigma to form the control limits about the average. "3" by default. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( K Sigma( 2.5 ), Variables( Subgroup( :Sample ), Y( :Weight ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << K Sigma( 3 ); ``` ### [Limits](#limits) **Syntax:** obj \<< Chart( Position( number ), Limits( Sigma( "sigma" ), \, \, \, \, \, \ ) ) **Description:** Provides options for changing the limit characteristics of the chart. Depending on the type of chart, you can assign one of the following values as the sigma argument: Range, Standard Deviation, Moving Range, Median Moving Range, Levey-Jennings, Poisson, Binomial, Negative Binomial, Weibull, Laney P Prime, or Laney U Prime. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Limits( Sigma( "Standard Deviation" ), Shade Zones( 1 ) ) ), Show Control Panel( 0 ) ); obj << Chart( Position( 2 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Standard Deviation" ) ) ); ``` ### [Limits Label Precision](#limits-label-precision) **Syntax:** obj \<< Limits Label Precision( number ) **Description:** Specifies the decimal precision that is displayed in the limits labels beyond the vertical axis decimal specification. **JMP Version Added:** 18 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Show Limit Labels( 1 ); Wait( 1 ); obj << Limits Label Precision( 5 ); ``` ### [OC Curve](#oc-curve) **Syntax:** obj \<< OC Curve **Description:** Shows in a new window, an Operator Characteristic Curve using the control limits and sigma from the control chart. ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << OC Curve; ``` ### [Points](#points) **Syntax:** obj \<< Chart( Position( number ), Points( Statistic( "statistic" ), \, \, \, \ ) ) **Description:** Provides options for changing the point characteristics of the chart. Depending on the type of chart, you can assign one of the following values for the statistic argument: Average, Range, Standard Deviation, Moving Range on Means, Moving Range on Standard Deviation, Individual, Moving Range, Count, Proportion, Centered, Standardized, Range Centered, or Range Standardized. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Points( Box Plots( 1 ) ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << Chart( Position( 2 ), Points( Statistic( "Standard Deviation" ) ) ); ``` ### [Product Statistics](#product-statistics) **Syntax:** obj \<< Product Statistics( ( column ) ( Product Level( l1 ( Target( number ), Sigma ( number ) ), \ ) **Description:** Sets the values for the Short Run Product Target and Sigma. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Class( "Short Run" ), Variables( Y( :Weight ), Part( :Product ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << Product Statistics( :Weight( ProductLevel( A( Target( 20 ), Sigma( 1 ) ), B( Target( 22 ), Sigma( .7 ) ) ) ) ); ``` ### [Range Span](#range-span) **Syntax:** obj \<< Range Span( value=2 ) **Description:** Sets the value of the Range Span option that is used in the Moving Range charts. "2" by default. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( K Sigma( 2.5 ), Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << Range Span( 3 ); ``` ### [Rerun All Tests](#rerun-all-tests) **Syntax:** obj \<< Rerun All Tests **Description:** Reruns all the currently selected tests and any associated alarm script. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Alarm Script( Write( "Out of Control for test ", qc_test, " in column ", qc_col, " in sample ", qc_sample, " in phase ", qc_phase ) ), Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Warnings( Test 1( 1 ) ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << K Sigma( 2.5 ); obj << Rerun All Tests; ``` ### [Save Control Limits](#save-control-limits) **Syntax:** obj \<< Save Control Limits( "in Column"|"in New Table"|"in New Tall Table" ) **Description:** Saves control limits to either a column property or a new data table. If in Column is specified and the limits are constant, LCL, Avg, and UCL values for each chart type in the report are saved in a Control Limits column property. If the limits are not constant, no column property is saved. If in New Table is specified, the standard deviation and mean for each chart are saved to a new data table. If the limits are constant, the LCL, Avg, and UCL for each chart are saved as well. If there are phases, a new set of values is saved for each phase. **JMP Version Added:** Before version 14 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Save Control Limits( "in Column" ); obj << Save Control Limits( "in New Table" ); ``` ### [Save Product Statistics](#save-product-statistics) **Syntax:** obj \<< Save Product Statistics **Description:** Saves columns to a new data table. The new data table contains the product statistics (target and sigma) for each level of the Part / Product variable. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Class( "Short Run" ), Variables( Y( :Weight ), Part( :Product ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << Save Product Statistics; ``` ### [Save Spec Limits](#save-spec-limits) **Syntax:** obj \<< Save Spec Limits **Description:** Saves the specification limits to a new data table. This option is available only if specification limits have been set, with a Spec Limits column property, via JSL, Get Spec Limits file import or the Set Spec Limits option. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Chart( Position( 1 ), Add Spec Limits( {LSL( 18 ), Target( 20.1 ), USL( 22.2 )} ) ); obj << Save Spec Limits; ``` ### [Save Summaries](#save-summaries) **Syntax:** obj \<< Save Summaries **Description:** Saves a new data table for each chart. The data table includes a row for each sample and columns for the sample label, sample size, and product level, if a Product/Part variable is specified. For each chart, there are also columns for the individual point plotted, the chart type, UCL, Avg, LCL, and any selected tests that are failing. **JMP Version Added:** Before version 14 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Save Summaries; ``` ### [Set Control Limits](#set-control-limits) **Syntax:** obj \<< Chart( Position( number ), Set Control Limits( {LCL( number ), Avg( number ), UCL( number )} ) ) **Description:** Sets the control limits for the specified chart. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Chart( Position( 1 ), Set Control Limits( {LCL( 19 ), Avg( 20 ), UCL( 21 )} ) ); ``` ### [Set Last N Subgroups](#set-last-n-subgroups) **Syntax:** obj \<< Set Last N Subgroups( number ) **Description:** Changes the horizontal axis to show only the last N subgroups on the graph. The number of specified subgroups does not take into account excluded or hidden observations. This option is not available when there is a Phase variable with more than one level. **JMP Version Added:** 19 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Set Last n Subgroups( 5 ); ``` ### [Set Sigma](#set-sigma) **Syntax:** obj \<< Set Sigma( value ) **Description:** Sets the sigma value used in the Control Chart. **JMP Version Added:** 18 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << Set Sigma( 1.8 ); ``` ### [Set Subgroup Size](#set-subgroup-size) **Syntax:** obj \<< Set Subgroup Size( integer ) **Description:** Specifies the number of rows per subgroup. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Set Subgroup Size( 4 ); ``` ### [Show Alarm Report](#show-alarm-report) **Syntax:** obj \<< Show Alarm Report( state=0|1 ) **Description:** Shows or hides the table of alarm rates and out of control samples. **JMP Version Added:** 15 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Show Alarm Report( 1 ); ``` ### [Show Capability](#show-capability) **Syntax:** obj \<< Show Capability( state=0|1 ) **Description:** Shows or hides the Process Capability Analysis report. On by default. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Chart( Position( 1 ), Limits( Sigma( "Moving Range" ) ), Add Spec Limits( {LSL( 17 ), USL( 23 ), Target( 20 )} ) ) ); Wait( 1 ); obj << Show Capability( 0 ); ``` ### [Show Center Line](#show-center-line) **Syntax:** obj \<< Chart( Position( number ), Limits( Show Center Line( state=0|1 ) ) ) **Description:** Shows or hides the center line. On by default. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Chart( Position( 1 ), Limits( Show Center Line( 0 ) ) ); ``` ### [Show Control Panel](#show-control-panel) **Syntax:** obj \<< Show Control Panel( state=0|1 ) **Description:** Shows or hides the control panel. On by default. **JMP Version Added:** Before version 14 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << Show Control Panel( 1 ); ``` ### [Show Excluded Region](#show-excluded-region) **Syntax:** obj \<< Show Excluded Region( state=0|1 ) **Description:** Shows or hides the regions of the chart where samples have been excluded. On by default. **JMP Version Added:** Before version 14 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); r = dt << Select Where( :Sample < 4 ); r << Exclude; Wait( 1 ); obj << Show Excluded Region( 0 ); ``` ### [Show Limit Labels](#show-limit-labels) **Syntax:** obj \<< Show Limit Labels( state=0|1 ) **Description:** Shows or hides the limit labels on the graph. **JMP Version Added:** 16 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Show Limit Labels( 1 ); ``` ### [Show Limit Summaries](#show-limit-summaries) **Syntax:** obj \<< Show Limit Summaries( state=0|1 ) **Description:** Shows or hides the Limit Summaries report. This report contains the control limits (LCL and UCL), the center line (Avg), the Points and Limits plotted, and the Sample Size for the chart. On by default. **JMP Version Added:** Before version 14 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << Show Limit Summaries( 0 ); ``` ### [Show Lower Limit](#show-lower-limit) **Syntax:** obj \<< Chart( Position( number ), Limits( Show Lower Limit( state=0|1 ) ) ) **Description:** Shows or hides the lower control limit. On by default. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Limits( Show Lower Limit( 0 ) ) ), Show Control Panel( 0 ) ); ``` ### [Show Product Separators](#show-product-separators) **Syntax:** obj \<< Show Product Separators( state=0|1 ) **Description:** Shows or hides dashed vertical lines on the graph indicating the product changed. On by default. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Class( "Short Run" ), Variables( Y( :Weight ), Part( :Product ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << Show Product Separators( 0 ); ``` ### [Show Sigma Report](#show-sigma-report) **Syntax:** obj \<< Show Sigma Report( state=0|1 ) **Description:** Shows or hides the table of Overall Sigma, Within Sigma, Stability Index, and Mean. For Three Way charts, the Between Sigma and Between-and-Within Sigma are also shown. **JMP Version Added:** 15 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Show Sigma Report( 1 ); ``` ### [Show Two Shewhart or Short Run Charts](#show-two-shewhart-or-short-run-charts) **Syntax:** obj \<< Show Two Shewhart or Short Run Charts( state=0|1 ) **Description:** Shows both the location and the dispersion chart. When the value of this option is 0, the dispersion chart is not shown. On by default. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Diameter.jmp" ); obj = dt << Control Chart Builder( Show Two Shewhart Charts( 0 ), Variables( Y( :Diameter ), Subgroup( :Day ) ), Show Control Panel( 0 ) ); ``` ### [Show Upper Limit](#show-upper-limit) **Syntax:** obj \<< Chart( Position( number ), Limits( Show Upper Limit( state=0|1 ) ) ) **Description:** Shows or hides the upper control limit. On by default. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Limits( Show Upper Limit( 0 ) ) ), Show Control Panel( 0 ) ); ``` ### [Size](#size) **Syntax:** obj \<< Size( width, height ) **Description:** Sets the size of the graph. **JMP Version Added:** Before version 14 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Size( 808, 586 ); ``` ### [Sort by Subgroup](#sort-by-subgroup) **Syntax:** obj \<< Sort by Subgroup( state=0|1 ) **Description:** Sorts the process data by the subgroup variable, or combination of nested subgroup variables, before calculations are performed. This option is available only if a Subgroup variable is specified. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Airline Delays.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Day of Week ), Y( :Arrival Delay ) ), Show Control Panel( 0 ) ); Wait( 1 ); obj << Sort by Subgroup( 1 ); ``` ### [Test Excluded Subgroups](#test-excluded-subgroups) **Syntax:** obj \<< Test Excluded Subgroups( state=0|1 ) **Description:** Includes or excludes entirely excluded subgroups in the computation of tests. This option is available only when the Show Excluded Region option is selected. On by default. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Test Excluded Subgroups( 0 ), Show Control Panel( 0 ), Show Alarm Report( 1 ), Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Warnings( Test 1( 1 ) ) ) ); Wait( 1 ); dt << Select Rows( Index( 21, 24 ) ) << Exclude; ``` ### [Use Event Chooser](#use-event-chooser) **Syntax:** obj \<< Use Event Chooser( state=0|1 ) **Description:** Categorizes ordinal numeric data and offers individual numeric-level modeling selections. The Use Event Chooser option is available only for Attribute Charts that include numeric, non-continuous Y variables. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Y( :Age ) ), Show Control Panel( 0 ) ); obj << Use Event Chooser( 1 ); ``` ### [Use Excluded Points on MR](#use-excluded-points-on-mr) **Syntax:** Platform preferences( Control Chart Builder (Use Excluded Points on MR(1)) ) **Description:** Preference for including points which are excluded in the moving range calculations. **JMP Version Added:** 19 ``` Platform Preferences( Control Chart Builder( Use Excluded Points on MR( 1 ) ) ); dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); dt << Select Rows( 4 :: 6 ) << Exclude( 1 ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); ``` ### [Variables](#variables) **Syntax:** obj \<< Variables( Y( column ), \, \, \ ) **Description:** Assigns the indicated variables to roles. **JMP Version Added:** Before version 14 ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); ``` ### [n Trials](#n-trials) **Syntax:** obj \<< n Trials( column | integer ) **Description:** Assigns a lot size for an attribute control chart. **JMP Version Added:** Before version 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Washers.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Lot ), Y( :"# defective"n ), nTrials( :Lot Size ) ), Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Binomial" ) ) ), Show Control Panel( 0 ) ); ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Automatic Recalc](#automatic-recalc) **Syntax:** obj \<< Automatic Recalc( state=0|1 ) **Description:** Redoes the analysis automatically for exclude and data changes. If the Automatic Recalc option is turned on, you should consider using Wait(0) commands to ensure that the exclude and data changes take effect before the recalculation. ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Automatic Recalc( 1 ); dt << Select Rows( 5 ) << Exclude( 1 ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \< ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); obj << Save Script to Data Table( "My Analysis", < ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Automatic Recalc](#automatic-recalc) **Syntax:** obj \<< Automatic Recalc( state=0|1 ) **Description:** Redoes the analysis automatically for exclude and data changes. If the Automatic Recalc option is turned on, you should consider using Wait(0) commands to ensure that the exclude and data changes take effect before the recalculation. ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ) ); obj << Automatic Recalc( 1 ); dt << Select Rows( 5 ) << Exclude( 1 ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ) ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \< ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ) ); obj << Save Script to Data Table( "My Analysis", <) **Description:** Add an example that shows how to effectively use the function. The example should be passed in as a text string or as JSL code wrapped with the Expr command. You can send the message multiple times to add more than one example. **JMP Version Added:** 14 **Example 1** ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Example( "Add(1, 2)" ); ``` **Example 2** ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Example( "Add(1, 2)", "small add" ); myAdd << Example( "Add(1, 500)", "bigger add" ); ``` ### [Formula Category](#formula-category) **Syntax:** f \<< Formula Category(name|""|1|0) **Description:** Include the function in the specified Formula Editor category. If specified, this function will be added at the end of the matching category. If the category doesn't exist, a new category will be created. Specify 0 or empty string to not show the function in the formula editor tree. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Formula Category( "NumberStuff" ); ``` ### [Get Custom Format Category](#get-custom-format-category) **Syntax:** f \<< Get Custom Format Category **Description:** Get the custom format category for the custom function. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Custom Format Category( 1 ); myAdd << Get Custom Format Category; ``` ### [Get Description](#get-description) **Syntax:** f \<< Get Description **Description:** Get the description for the custom function. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Description( "Add two numbers together, but subtract 1" ); myAdd << Get Description; ``` ### [Get Examples](#get-examples) **Syntax:** f \<< Get Examples **Description:** Retrieve the list of examples, as strings **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Example( "Add(1, 2)", "small add" ); myAdd << Example( "Add(1, 500)", "bigger add" ); myAdd << Get Examples; ``` ### [Get Formula Category](#get-formula-category) **Syntax:** f \<< Get Formula Category **Description:** Return which Formula Editor category this function should be part of, if any. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Formula Category( "NumberStuff" ); myAdd << Get Formula Category; ``` ### [Get Function](#get-function) **Syntax:** f \<< Get Function **Description:** Retrieve the function definition. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Get Function; ``` ### [Get Name](#get-name) **Syntax:** f \<< Get Name **Description:** Retrieve the function name. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Get Name; ``` ### [Get Namespace](#get-namespace) **Syntax:** f \<< Get Namespace **Description:** Retrieve the function namespace. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Get Namespace; ``` ### [Get Parameters](#get-parameters) **Syntax:** f \<< Get Parameters **Description:** Retrieve the list of parameters. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Parameter( "Number", "number" ); myAdd << Parameter( "Number", "" ); myAdd << Get Parameters; ``` ### [Get Prototype](#get-prototype) **Syntax:** f \<< Get Prototype **Description:** Get the prototype that shows up for this function in the Scripting Index **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Prototype( "Add(number, )" ); myAdd << Get Prototype; ``` ### [Get Result Type](#get-result-type) **Syntax:** f \<< Get Result Type **Description:** Get the result type of the function. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Result Type( "Number" ); myAdd << Get Result Type; ``` ### [Get Scripting Index Category](#get-scripting-index-category) **Syntax:** f \<< Get Scripting Index Category **Description:** Get the category for the custom function in the Scripting Index. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Scripting Index Category( "My Functions" ); myAdd << Get Scripting Index Category; ``` ### [Get Transform Category](#get-transform-category) **Syntax:** f \<< Get Transform Category **Description:** Get the transform category for the custom function. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Transform Category( 1 ); myAdd << Get Transform Category; ``` ### [Parameter](#parameter) **Syntax:** f \<< Parameter(typename | {typename1, typename2, ...}, hint text) **Description:** Add information about a parameter of the function. Send this message once for each parameter the function takes. This can be used for code validation. Valid choices for the parameter types are Any, Name, Number, String, List, Matrix, RowState. If multiple result types are possible, supply the type names in a list. The hint text is used to indicate what data should be used in the corresponding argument in the formula editor. Specify an empty string if no hint text is desired. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Parameter( "Number", "number" ); myAdd << Parameter( "Number", "" ); ``` ### [Prototype](#prototype) **Syntax:** obj \<< Prototype( text ) **Description:** Set the prototype that shows up for this function in the Scripting Index **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Prototype( "Add(number, )" ); ``` ### [Result Type](#result-type) **Syntax:** f \<< Result Type(typename | {typename1, typename2 ...}) **Description:** Set the result type of the function. This can be used for code validation. Valid choices are Any, Name, Number, String, List, Matrix, RowState. If multiple result types are possible, supply the type names in a list. **JMP Version Added:** 14 **Example 1** ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Result Type( "Number" ); ``` **Example 2** ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Result Type( {"Number", "String"} ); ``` ### [Scripting Index Category](#scripting-index-category) **Syntax:** f \<< Scripting Index Category(name|""|1|0) **Description:** Sets the category for the custom function in the Scripting Index. Every custom function will be listed in the All Functions category in addition to the category that you specify. Specify 0 or "" to list the function in the All Functions category only. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Scripting Index Category( "My Functions" ); ``` ### [Transform Category](#transform-category) **Syntax:** f \<< Transform Category(1|0) **Description:** Treat the custom function as a column transform. Specify 0 to exclude the function from the column transform menu. **JMP Version Added:** 14 ``` myAdd = New Custom Function( "custom", "Add", Function( {x, y = 1}, x + y - 1 ) ); myAdd << Transform Category( 1 ); ``` # [Custom Graph](#custom-graph) ## [Associated Constructors](#associated-constructors) ### [Custom Graph](#custom-graph_1) **Syntax:** New Window(Window title, \, Graph Box( named arguments, ..., script segment **Description:** Creates a graph using a custom script. ``` obj = New Window( "Example", Graph Box( Y Scale( -10, 90 ), X Scale( -10, 90 ), Oval( X Origin() + 10, (Y Origin() + Y Range()) - 10, (X Origin() + X Range()) - 10, Y Origin() + 10, 1 ), Title( "Oval" ) ) ); ``` ## [Item Messages](#item-messages) ### [Append Seg](#append-seg) **Syntax:** obj \<< Append Seg( display seg ) **Description:** Adds a display seg to the FrameBox ``` x = [20, 40, 60, 80]; New Window( "Example", Graph Box( Frame Size( 300, 120 ), Append Seg( Marker Seg( x, x ), Line Seg( x, x ) ) ) ); ``` ### [Background Map](#background-map) **Syntax:** obj \<< Background Map ### [Bottom](#bottom) **Syntax:** obj \<< Bottom( number ) ### [FrameSize](#framesize) **Syntax:** Frame Size( width, height ) **Description:** Sets the size of the graph. **Example 1** ``` obj = New Window( "Example", Graph Box( Framesize( 400, 400 ), <...) **Description:** Specifies noise factors, which must be columns that are ingredients to the formula columns. Noise factors are used to study robustness (or flatness) with respect to transmitted variation from these factors. The resulting profiler includes derivatives of the formulas with respect to the noise factors. **Contour Profiler Example** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), Noise Factors( :SILANE ) ); ``` **Custom Profiler Example** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), Noise Factors( :SILANE ) ); ``` **Mixture Profiler Example** ``` dt = Open( "$SAMPLE_DATA/Plasticizer.jmp" ); obj = dt << Mixture Profiler( Y( :Pred Formula Y ), Noise Factors( :p1 ) ); ``` **Profiler Example** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), Noise Factors( :SILANE ) ); ``` ### [Prediction Formula](#prediction-formula) **Syntax:** obj = Custom Profiler(...Prediction Formula( column(s) )...) **Description:** Specifies the response columns that contain formulas. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); ``` ### [Y](#y) **Syntax:** obj = Custom Profiler(...Y( column(s) )...) **Description:** Specifies the response columns that contain formulas. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); ``` ## [Item Messages](#item-messages) ### [Append Settings to Table](#append-settings-to-table) **Syntax:** obj \<< Append Settings to Table **Description:** Saves the settings of the current profiler as a new row at the end of the data table. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Append Settings to Table; ``` ### [Broadcast Factor Settings](#broadcast-factor-settings) **Syntax:** obj \<< Broadcast Factor Settings **Description:** Sends the factor settings for the current profiler to all other profilers. This option does not link the profilers. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), Desirability Functions( 1 ), Term Value( SILICA( 1.75, Lock( 0 ), Show( 1 ) ), SILANE( 45.2, Lock( 0 ), Show( 1 ) ), SULFUR( 2.45, Lock( 0 ), Show( 1 ) ) ) ); obj << Contour Profiler( 1 ); Wait( 1 ); obj << Broadcast Factor Settings; ``` ### [Contour Profiler](#contour-profiler) **Syntax:** obj \<< Contour Profiler( state=0|1 ) **Description:** Shows or hides the Contour Profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Contour Profiler( 1 ); ``` ### [Converge Limit](#converge-limit) **Syntax:** obj \<< Converge Limit( number ) **Description:** Specifies the criterion for convergence for the optimization algorithm. If the convergence criterion is less than this value for two consecutive iterations, the algorithm stops. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Converge limit( 0.0001 ); obj << Optimize; ``` ### [Copy Settings Script](#copy-settings-script) **Syntax:** obj \<< Copy Settings Script **Description:** Copies the current factor settings to the clipboard. The settings can then be pasted into another profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Set to Data in Row( 4 ); obj << Copy Settings Script; obj2 = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj2 << Paste Settings Script; ``` ### [Edit Constraints](#edit-constraints) **Syntax:** obj \<< Edit Constraints **Description:** Adds, changes, or deletes linear constraints. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Edit Constraints; ``` ### [Formulas for OPTMODEL](#formulas-for-optmodel) **Syntax:** obj \<< Formulas for OPTMODEL **Description:** Saves the prediction formulas from the model in a new file as SAS statements for PROC OPTMODEL. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Formulas for OPTMODEL; ``` ### [Get Constraints](#get-constraints) **Syntax:** obj \<< Get Constraints **Description:** Returns a list of factor constraints. ``` dt = Open( "$SAMPLE_DATA/Plasticizer.jmp" ); obj = dt << Profiler( Y( :Pred Formula Y ), Profiler( 1, Profile at Boundary( "Stop at Boundaries" ), ) ); obj << Get Constraints; ``` ### [Get Factor Settings](#get-factor-settings) **Syntax:** obj \<< Get Factor Settings **Description:** Returns the current factor settings as a list. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Get Factor Settings; ``` ### [Get Factor Settings Script](#get-factor-settings-script) **Syntax:** obj \<< Get Factor Settings Script **Description:** Returns the current factor settings as an expression that can be used in a script. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Get Factor Settings Script; ``` ### [Get Objective](#get-objective) **Syntax:** obj \<< Get Objective **Description:** Returns the current value of the objective function in the custom profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS ) ); obj << Optimize; o = obj << Get Objective; Show( o ); ``` ### [Get Objective Formula](#get-objective-formula) **Syntax:** obj \<< Get Objective Formula **Description:** Returns the formula for the objective function as an expression in the custom profiler output. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS ) ); obj << Optimize; form = obj << Get Objective Formula; Show( form ); ``` ### [Get Simulator](#get-simulator) **Syntax:** obj \<< Get Simulator **Description:** Returns a reference to the Simulator. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Simulator( 1, Factors( SILICA << Random( Normal( 1.25, 0.3266 ) ), SILANE << Fixed( 50 ), SULFUR << Fixed( 2.25 ) ), Responses( Pred Formula ABRASION << No Noise, Pred Formula MODULUS << No Noise, Pred Formula ELONG << Add Random Noise( 1 ), Pred Formula HARDNESS << Add Random Weighted Noise( 1 ) ) ); obj2 = obj << Get Simulator; obj2 << Simulation Experiment; ``` ### [Goal](#goal) **Syntax:** obj \<< Goal( "Maximize"|"Minimize" ) ### [Link Profilers](#link-profilers) **Syntax:** obj \<< Link Profilers( state=0|1 ) **Description:** Links all the profilers in a single report together, so that a change in a factor in one profiler causes that factor to change to that value in all other profilers. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Prediction Profiler( 1 ); obj << Contour Profiler( 1 ); obj << Link Profilers( 1 ); Wait( 1 ); obj << Term Value( :Silica( 1.78 ), :Sulfur( 2.34 ) ); ``` ### [Load Constraints from Table](#load-constraints-from-table) **Syntax:** obj \<< Load Constraints from Table **Description:** Loads linear constraints from a data table. ``` dtlc = New Table( "Linear Constraints", Add Rows( 2 ), New Column( "SILICA", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 2] ) ), New Column( "SILANE", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [0, 0] ) ), New Column( "SULFUR", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 1] ) ), New Column( "Comparison", Character, "Nominal", Set Values( {">=", "<="} ) ), New Column( "RHS", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [3, 6] ) ) ); dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Load Constraints from Table( dtlc ); obj << Profile at Boundary( "Stop at Boundaries" ); ``` ### [Log Iterations](#log-iterations) **Syntax:** obj \<< Log Iterations( state=0|1 ) **Description:** Creates a new data table that contains iterations of the optimization algorithm. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS ) ); obj << Term Value( :Silica( 1.78 ), :Sulfur( 2.34 ) ); obj << Log Iterations( 1 ); obj << Optimize; ``` ### [Max Cycles](#max-cycles) **Syntax:** obj \<< Max Cycles( number ) **Description:** Specifies the maximum number of cycles within each trip in the optimization algorithm. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Max Cycles( 5 ); obj << Optimize; ``` ### [MaxIter](#maxiter) **Syntax:** obj \<< MaxIter( number ) **Description:** Specifies the maximum number of iterations within each trip in the optimization algorithm. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << MaxIter( 10 ); obj << Optimize; ``` ### [Objective Formula](#objective-formula) **Syntax:** obj \<< Objective Formula **Description:** Specifies the formula to be optimized. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS ) ); obj << Objective Formula( :Pred Formula ABRASION + .5 * :Pred Formula MODULUS ); Wait( 1 ); obj << Optimize; obj << Get Objective Formula; ``` ### [Optimize](#optimize) **Syntax:** obj \<< Optimize **Description:** Optimizes the current settings in the custom profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS ) ); obj << Term Value( :Silica( 1.78 ), :Sulfur( 2.34 ) ); Wait( 1 ); obj << Optimize; ``` ### [Paste Settings Script](#paste-settings-script) **Syntax:** obj \<< Paste Settings Script **Description:** Pastes the profiler settings from the clipboard to a profiler in another report. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Set to Data in Row( 4 ); obj << Copy Settings Script; obj2 = Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj2 << Paste Settings Script; ``` ### [Predict for Another Table](#predict-for-another-table) **Syntax:** obj \<< Predict for Another Table( ) **Description:** Adds prediction columns to a specified data table, using the factors in that table. This option is available only for continuous responses. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); dt2 = dt << Subset( All rows, columns( :SILICA, :SILANE, :SULFUR ), Output Table( "Subset" ) ); obj << Predict For Another Table( dt2 ); ``` ### [Prediction Profiler](#prediction-profiler) **Syntax:** obj \<< Prediction Profiler( state=0|1 ) **Description:** Shows or hides the Prediction Profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Prediction Profiler( 1 ); ``` ### [Remember Settings](#remember-settings) **Syntax:** obj \<< Remember Settings **Description:** Adds an outline node to the report with the values of the factor settings. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Remember Settings; ``` ### [Reset](#reset) **Syntax:** obj \<< Reset **Description:** Resets any changes made to the response variables. On by default. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Term Value( :Silica( 1.78 ), :Sulfur( 2.34 ) ); obj << Reset; ``` ### [Save Constraints to New Table](#save-constraints-to-new-table) **Syntax:** obj \<< Save Constraints to New Table **Description:** Saves existing linear constraints to a new data table. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); dt << New Script( "Constraint", {1 * :SILICA + 1 * :SULFUR >= 3, 2 * :SILICA + 1 * :SULFUR <= 6} ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Save Constraints to New Table; ``` ### [Save Constraints to Table Script](#save-constraints-to-table-script) **Syntax:** obj \<< Save Constraints to Table Script **Description:** Saves existing linear constraints to a table script called Constraint. ``` dtlc = New Table( "Linear Constraints", Add Rows( 2 ), New Column( "SILICA", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 2] ) ), New Column( "SILANE", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [0, 0] ) ), New Column( "SULFUR", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [1, 1] ) ), New Column( "Comparison", Character, "Nominal", Set Values( {">=", "<="} ) ), New Column( "RHS", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [3, 6] ) ) ); dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Load Constraints from Table( dtlc ); obj << Save Constraints to Table Script; ``` ### [Save Expanded Formulas](#save-expanded-formulas) **Syntax:** obj \<< Save Expanded Formulas **Description:** Saves a new formula column to the data table. The new column contains resolved formula references within the formulas used as Y variables to see the underlying variables. This is available only after the Expand Intermediate Formulas option is selected in the launch window or the Expand message is specified in the Profiler script. ``` dt = Open( "$SAMPLE_DATA/Nonlinear Examples/CES Production Function.jmp" ); obj = dt << Profiler( Y( :GP Fit, :NL Fit, :Difference ), Expand, Contour Profiler( 1 ) ); obj << Save Expanded Formulas; ``` ### [Set Script](#set-script) **Syntax:** obj \<< Set Script( Function( {arguments}, \<{locals}>, expr ) ) **Description:** Sets a script that is run each time a factor changes. ``` ProfileCallbackLog = Function( {arg}, Show( arg ) ); dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Set Script( ProfileCallbackLog ); obj << Term Value( :Silica( 1 ) ); ``` ### [Set to Data in Row](#set-to-data-in-row) **Syntax:** obj \<< Set to Data in Row( row number ) **Description:** Assigns the values of a data table row to the X variables in the profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 2 ); obj << Set to Data in Row( 4 ); ``` ### [Show Formulas](#show-formulas) **Syntax:** obj \<< Show Formulas **Description:** Opens a script window that contains JSL for all formulas that are being profiled. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Show Formulas; ``` ### [Simulator](#simulator) **Syntax:** obj \<< Simulator( state=0|1 ) **Description:** Shows or hides the Simulator. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Simulator( 1 ); ``` ### [Surface Profiler](#surface-profiler) **Syntax:** obj \<< Surface Profiler( state=0|1 ) **Description:** Shows or hides the Surface Profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Surface Profiler( 1 ); ``` ### [Term Value](#term-value) **Syntax:** obj \<< Term Value( x1( number ),x2( number ), ... ) **Description:** Sets specific term values for factors on the custom profiler. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); Wait( 1 ); obj << Term Value( :Silica( 1.78 ), :Sulfur( 2.34 ) ); ``` ### [Trips](#trips) **Syntax:** obj \<< Trips( number ) **Description:** Specifies the number of random starts in the optimization algorithm. Each trip restarts the algorithm at a different starting point. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Trips( 10 ); obj << Optimize; ``` ### [Unthreaded](#unthreaded) **Syntax:** obj \<< Unthreaded( state=0|1 ) **Description:** To suppress any multithreading in evaluating the profile traces, the contour grid, and the optimizer trips. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Desirability Functions( 1 ); obj << Unthreaded( 1 ); obj << Maximize Desirability; ``` ## [Shared Item Messages](#shared-item-messages) ### [Action](#action) **Syntax:** obj \<< Action **Description:** All-purpose trapdoor within a platform to insert expressions to evaluate. Temporarily sets the DisplayBox and DataTable contexts to the Platform. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Apply Preset](#apply-preset) **Syntax:** Apply Preset( preset ); Apply Preset( source, label, \ ) **Description:** Apply a previously created preset to the object, updating the options and customizations to match the saved settings. **JMP Version Added:** 18 #### [Anonymous preset](#anonymous-preset) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); dt2 = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj2 = dt2 << Oneway( Y( :LogHist0 ), X( :drug ) ); Wait( 1 ); obj2 << Apply Preset( preset ); ``` #### [Search by name](#search-by-name) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "Compare Distributions" ); ``` #### [Search within folder(s)](#search-within-folders) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ) ); Wait( 1 ); obj << Apply Preset( "Sample Presets", "t-Tests", Folder( "Compare Means" ) ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Adds a control panel for changing the platform's variables ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce this analysis, and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Copy Script; ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Move the data table window for this analysis to the front. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Data Table Window; ``` ### [Get By Levels](#get-by-levels) **Syntax:** obj \<< Get By Levels **Description:** Returns an associative array mapping the by group columns to their values. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv << Get By Levels; ``` ### [Get Container](#get-container) **Syntax:** obj \<< Get Container **Description:** Returns a reference to the container box that holds the content for the object. #### [General](#general) ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); t = obj << Get Container; Show( (t << XPath( "//OutlineBox" )) << Get Title ); ``` #### [Platform with Filter](#platform-with-filter) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ), Local Data Filter( Add Filter( columns( :age, :sex, :height ), Where( :age == {12, 13, 14} ), Where( :sex == "F" ), Where( :height >= 55 ), Display( :age, N Items( 6 ) ) ) ) ); New Window( "platform boxes", H List Box( Outline Box( "Report(platform)", Report( gb ) << Get Picture ), Outline Box( "platform << Get Container", (gb << Get Container) << Get Picture ) ) ); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns a reference to the data table. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); t = obj << Get Datatable; Show( N Rows( t ) ); ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Creates a script (JSL) to produce this analysis and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); t = obj << Get Script; Show( t ); ``` ### [Get Script With Data Table](#get-script-with-data-table) **Syntax:** obj \<< Get Script With Data Table **Description:** Creates a script(JSL) to produce this analysis specifically referencing this data table and returns it as an expression. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); t = obj << Get Script With Data Table; Show( t ); ``` ### [Get Timing](#get-timing) **Syntax:** obj \<< Get Timing **Description:** Times the platform launch. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); t = obj << Get Timing; Show( t ); ``` ### [Get Web Support](#get-web-support) **Syntax:** obj \<< Get Web Support **Description:** Return a number indicating the level of Interactive HTML support for the display object. 1 means some or all elements are supported. 0 means no support. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); s = obj << Get Web Support(); Show( s ); ``` ### [Get Where Expr](#get-where-expr) **Syntax:** obj \<< Get Where Expr **Description:** Returns the Where expression for the data subset, if the platform was launched with By() or Where(). Otherwise, returns Empty() **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); biv = dt << Bivariate( X( :height ), Y( :weight ), By( :sex ) ); biv2 = dt << Bivariate( X( :height ), Y( :weight ), Where( :age < 14 & :height > 60 ) ); Show( biv[1] << Get Where Expr, biv2 << Get Where Expr ); ``` ### [Ignore Platform Preferences](#ignore-platform-preferences) **Syntax:** Ignore Platform Preferences( state=0|1 ) **Description:** Ignores the current settings of the platform's preferences. The message is ignored when sent to the platform after creation. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Bivariate( Ignore Platform Preferences( 1 ), Y( :height ), X( :weight ), Action( Distribution( Y( :height, :weight ), Histograms Only ) ) ); ``` ### [Local Data Filter](#local-data-filter) **Syntax:** obj \<< Local Data Filter **Description:** To filter data to specific groups or ranges, but local to this platform ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); ``` ### [New Preset](#new-preset) **Syntax:** obj = New Preset() **Description:** Create an anonymous preset representing the options and customizations applied to the object. This object can be passed to Apply Preset to copy the settings to another object of the same type. **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :height ), X( :sex ), t Test( 1 ) ); preset = obj << New Preset(); ``` ### [Paste Local Data Filter](#paste-local-data-filter) **Syntax:** obj \<< Paste Local Data Filter **Description:** Apply the local data filter from the clipboard to the current report. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Redo Analysis](#redo-analysis) **Syntax:** obj \<< Redo Analysis **Description:** Rerun this same analysis in a new window. The analysis will be different if the data has changed. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Redo Analysis; ``` ### [Relaunch Analysis](#relaunch-analysis) **Syntax:** obj \<< Relaunch Analysis **Description:** Opens the platform launch window and recalls the settings that were used to create the report. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Relaunch Analysis; ``` ### [Remove Column Switcher](#remove-column-switcher) **Syntax:** obj \<< Remove Column Switcher **Description:** Removes the most recent Column Switcher that has been added to the platform. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Contingency( Y( :size ), X( :marital status ) ); ColumnSwitcherObject = obj << Column Switcher( :marital status, {:sex, :country, :marital status} ); Wait( 2 ); obj << Remove Column Switcher; ``` ### [Remove Local Data Filter](#remove-local-data-filter) **Syntax:** obj \<< Remove Local Data Filter **Description:** If a local data filter has been created, this removes it and restores the platform to use all the data in the data table directly ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); dist = dt << Distribution( Nominal Distribution( Column( :country ) ), Local Data Filter( Add Filter( columns( :sex ), Where( :sex == "Female" ) ), Mode( Show( 1 ), Include( 1 ) ) ) ); Wait( 2 ); dist << remove local data filter; ``` ### [Report](#report) **Syntax:** obj \<< Report; Report( obj ) **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Report View](#report-view) **Syntax:** obj \<< Report View( "Full"|"Summary" ) **Description:** The report view determines the level of detail visible in a platform report. Full shows all of the detail, while Summary shows only select content, dependent on the platform. For customized behavior, display boxes support a \< ) **Description:** Saves a script for all report objects to the current data table. This option is useful when you have multiple reports in the window. The script is named after the first platform unless you specify the script name in quotes. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); dt << New Column( "_bycol", Character, Nominal, Set Values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), By( :_bycol ), Group Options( Return Group( 1 ) ) ); obj[1] << Save Script for All Objects To Data Table( "My Script" ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** Save Script to Data Table( , < \<, < \< ); **Description:** Create a JSL script to produce this analysis, and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); obj << Save Script to Data Table( "My Analysis", < ) **Description:** Loads a DLL pointed to by the specified path. ``` If( Host is( "Windows" ), dll = Load DLL( "C:/Windows/System32/User32.DLL" ); dll << CallDLL( "MessageBeep", "n", 0 ); Wait( 1 ); dll << CallDLL( "MessageBeep", "n", 0 ); dll << UnloadDLL(); ); ``` ## [Item Messages](#item-messages) ### [Call DLL](#call-dll) **Syntax:** obj \<< Call DLL( function name, signature, args ) **Description:** Calls a specified function within the DLL, with a given signature and arguments. ``` If( Host is( "Windows" ), dll = Load DLL( "C:/Windows/System32/User32.DLL" ); dll << CallDLL( "MessageBeep", "n", 0 ); Wait( 1 ); dll << CallDLL( "MessageBeep", "n", 0 ); dll << UnloadDLL(); ); ``` ### [Declare Function](#declare-function) **Syntax:** obj \<< Declare Function( name, Convention( STDCALL| CDECL| Pascal ), Alias( string ), Arg( Int8| UInt8| Int16| UInt16| Int32| UInt32| Int64| UInt64| Float| Double| AnsiString| UnicodeString| Struct| IntPtr| UIntPtr| ObjPtr, string ), Returns( type ); ) **Description:** Declares the return type and parameter types of a function defined in the DLL so that it can be successfully invoked from JSL. ``` If( Host is( "Windows" ), dll = Load DLL( "C:/Windows/System32/User32.DLL" ); dll << DeclareFunction( "MessageBoxW", Convention( STDCALL ), Alias( "MsgBox" ), Arg( IntPtr, "hWnd" ), Arg( UnicodeString, "message" ), Arg( UnicodeString, "caption" ), Arg( UInt32, "uType" ), Returns( Int32 ) ); result = dll << MsgBox( 0, "Here is a message from JMP.", "Call DLL", 321 ); Show( result ); ); ``` ### [Get Declaration JSL](#get-declaration-jsl) **Syntax:** obj \<< Get Declaration JSL **Description:** Retrieves the declaration JSL from the DLL and displays it in the log. This message applies only to DLLs that contain the function, \_JMP_Declarations(). ``` dll = Load DLL( /*DLL with JSL keyword*/ ); //dll << Get Declaration JSL; ``` ### [Show Functions](#show-functions) **Syntax:** obj \<< Show Functions **Description:** Stream the list of declared functions to the log ``` If( Host is( "Windows" ), dll = Load DLL( "C:/Windows/System32/User32.DLL" ); dll << DeclareFunction( "MessageBoxW", Convention( STDCALL ), Alias( "MsgBox" ), Arg( IntPtr, "hWnd" ), Arg( UnicodeString, "message" ), Arg( UnicodeString, "caption" ), Arg( UInt32, "uType" ), Returns( Int32 ) ); dll << Show Functions; ); ``` ### [Unload DLL](#unload-dll) **Syntax:** obj \<< Unload DLL **Description:** Unloads the DLL. ``` If( Host is( "Windows" ), dll = Load DLL( "C:/Windows/System32/User32.DLL" ); dll << CallDLL( "MessageBeep", "n", 0 ); Wait( 1 ); dll << CallDLL( "MessageBeep", "n", 0 ); dll << UnloadDLL(); ); ``` # [DOE](#doe) ## [Associated Constructors](#associated-constructors) ### [DOE](#doe_1) **Syntax:** DOE #### [Augment Design](#augment-design) ``` Open( "$SAMPLE_DATA/Design Experiment/Reactor 8 Runs.jmp" ); Wait( 0 ); DOE( Augment Design, X( :Feed Rate, :Catalyst, :Stir Rate, :Temperature, :Concentration ), Y( :Percent Reacted ), {Augment Method( Augment ), Set Random Seed( 282322901 ), Number of Starts( 800 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ), Add Term( {1, 1}, {4, 1} ), Add Term( {1, 1}, {5, 1} ), Add Term( {2, 1}, {3, 1} ), Add Term( {2, 1}, {4, 1} ), Add Term( {2, 1}, {5, 1} ), Add Term( {3, 1}, {4, 1} ), Add Term( {3, 1}, {5, 1} ), Add Term( {4, 1}, {5, 1} ), Set Sample Size( 16 ), Optimality Criterion( "Make D-Optimal Design" ), Make Design, Save X Matrix( 0 ), Simulate Responses( 0 )} ); ``` #### [Augment Design, Add Center Points to a Design](#augment-design-add-center-points-to-a-design) ``` Open( "$SAMPLE_DATA/Design Experiment/Reactor 8 Runs.jmp" ); Wait( 0 ); DOE( Augment Design, X( :Feed Rate, :Catalyst, :Stir Rate, :Temperature, :Concentration ), Y( :Percent Reacted ), {Group new runs into separate block, Augment Method( Centerpoints, 2 ), Save X Matrix( 0 ), Simulate Responses( 0 )} ); ``` #### [Augment Design, Replicate a Design](#augment-design-replicate-a-design) ``` Open( "$SAMPLE_DATA/Design Experiment/Reactor 8 Runs.jmp" ); Wait( 0 ); DOE( Augment Design, X( :Feed Rate, :Catalyst, :Stir Rate, :Temperature, :Concentration ), Y( :Percent Reacted ), {Group new runs into separate block, Augment Method( Replicate, 2 ), Save X Matrix( 0 ), Simulate Responses( 0 )} ); ``` #### [Choice Design](#choice-design) ``` DOE( Choice Design, {Add Factor( Categorical, {"Medium", "Coarse"}, "Grind", 0 ), Add Factor( Categorical, {"195", "200", "205"}, "Temperature", 0 ), Add Factor( Categorical, {"3", "3.5", "4"}, "Time", 0 ), Add Factor( Categorical, {"1.6", "2", "2.4"}, "Charge", 0 ), Set Random Seed( 12345 ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Set Prior Mean Choice( [0 0 0 0 0 0 0] ), Set Prior Variance Matrix( [1 0 0 0 0 0 0, 0 1 0 0 0 0 0, 0 0 1 0 0 0 0, 0 0 0 1 0 0 0, 0 0 0 0 1 0 0, 0 0 0 0 0 1 0, 0 0 0 0 0 0 1] ), Set Number of Attributes( 4 ), Set Number of Profiles( 2 ), Set Number of Choice Sets( 12 ), Set Number of Surveys( 1 ), Set Expected Number of Respondents( 10 ), Make Design, Choice Design Table Output( Separate )} ); ``` #### [Custom Design, Coffee Strength](#custom-design-coffee-strength) ``` DOE( Custom Design, {Add Response( Match Target, "Strength", 1.2, 1.4, . ), Add Factor( Categorical, {"Coarse", "Medium"}, "Grind", 0 ), Add Factor( Continuous, 195, 205, "Temperature", 0 ), Add Factor( Continuous, 3, 4, "Time", 0 ), Add Factor( Continuous, 1.6, 2.4, "Charge", 0 ), Add Factor( Blocking, 4, "Station " ), Set Random Seed( 569534903 ), Number of Starts( 100 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Alias Term( {1, 1}, {2, 1} ), Add Alias Term( {1, 1}, {3, 1} ), Add Alias Term( {1, 1}, {4, 1} ), Add Alias Term( {2, 1}, {3, 1} ), Add Alias Term( {2, 1}, {4, 1} ), Add Alias Term( {3, 1}, {4, 1} ), Set Sample Size( 12 ), Make Design} ); ``` #### [Custom Design, Design for Fixed Blocks](#custom-design-design-for-fixed-blocks) ``` DOE( Custom Design, {Add Response( Maximize, "Y", ., ., . ), Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Add Factor( Blocking, 3, "X4" ), Set Random Seed( 12345 ), Number of Starts( 5 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ), Add Term( {2, 1}, {3, 1} ), Set Sample Size( 18 ), Make Design} ); ``` #### [Custom Design, Design with Fixed Covariates](#custom-design-design-with-fixed-covariates) ``` Open( "$SAMPLE_DATA/Design Experiment/Thermoplastic.jmp" ); Wait( 0 ); DOE( Custom Design, {Add Response( Minimize, "Shrinkage", ., ., . ), Add Factor( Covariate, Specific Gravity, 0 ), Add Factor( Covariate, Tensile Strength, 0 ), Add Factor( Covariate, Supplier, 0 ), Add Factor( Continuous, -1, 1, "Temperature", 0 ), Add Factor( Continuous, -1, 1, "Speed", 0 ), Add Factor( Continuous, -1, 1, "Time", 0 ), Set Random Seed( 84951 ), Number of Starts( 40 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Term( {6, 1} ), Add Alias Term( {1, 1}, {2, 1} ), Add Alias Term( {1, 1}, {3, 1} ), Add Alias Term( {1, 1}, {4, 1} ), Add Alias Term( {1, 1}, {5, 1} ), Add Alias Term( {1, 1}, {6, 1} ), Add Alias Term( {2, 1}, {3, 1} ), Add Alias Term( {2, 1}, {4, 1} ), Add Alias Term( {2, 1}, {5, 1} ), Add Alias Term( {2, 1}, {6, 1} ), Add Alias Term( {3, 1}, {4, 1} ), Add Alias Term( {3, 1}, {5, 1} ), Add Alias Term( {3, 1}, {6, 1} ), Add Alias Term( {4, 1}, {5, 1} ), Add Alias Term( {4, 1}, {6, 1} ), Add Alias Term( {5, 1}, {6, 1} ), Set Sample Size( 12 ), Make Design} ); ``` #### [Custom Design, Design with Hard-to-Change Covariates](#custom-design-design-with-hard-to-change-covariates) ``` Open( "$SAMPLE_DATA/Design Experiment/Runners Covariates.jmp" ); Wait( 0 ); DOE( Custom Design, {Add Response( Minimize, "Wear", ., ., . ), Add Factor( Covariate, Miles, 1 ), Add Factor( Covariate, Weight, 1 ), Add Factor( Covariate, Strike Point, 1 ), Add Factor( Continuous, 5, 20, "Thickness", 0 ), Add Factor( Continuous, 1, 10, "Gel", 0 ), Add Factor( Categorical, {"L1", "L2", "L3"}, "Outsole", 0 ), Add Factor( Categorical, {"L1", "L2", "L3"}, "Midsole", 0 ), Set Random Seed( 12345 ), Number of Starts( 1 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Term( {6, 1} ), Add Term( {7, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ), Add Term( {1, 1}, {4, 1} ), Add Term( {1, 1}, {5, 1} ), Add Term( {1, 1}, {6, 1} ), Add Term( {1, 1}, {7, 1} ), Add Term( {2, 1}, {3, 1} ), Add Term( {2, 1}, {4, 1} ), Add Term( {2, 1}, {5, 1} ), Add Term( {2, 1}, {6, 1} ), Add Term( {2, 1}, {7, 1} ), Add Term( {3, 1}, {4, 1} ), Add Term( {3, 1}, {5, 1} ), Add Term( {3, 1}, {6, 1} ), Add Term( {3, 1}, {7, 1} ), Add Term( {4, 1}, {5, 1} ), Add Term( {4, 1}, {6, 1} ), Add Term( {4, 1}, {7, 1} ), Add Term( {5, 1}, {6, 1} ), Add Term( {5, 1}, {7, 1} ), Add Term( {6, 1}, {7, 1} ), Set N Whole Plots( 32 ), Set Sample Size( 64 ), Simulate Responses( 0 ), Save X Matrix( 0 ), Make Design} ); ``` #### [Custom Design, Mixture Design with Nonmixture Factors](#custom-design-mixture-design-with-nonmixture-factors) ``` DOE( Custom Design, {Add Response( None, "Damping", ., ., . ), Add Factor( Mixture, 0.2, 0.8, "CuSO4", 0 ), Add Factor( Mixture, 0.2, 0.8, "Na2S2O3", 0 ), Add Factor( Mixture, 0, 0.6, "Glyoxal", 0 ), Add Factor( Categorical, {"L1", "L2", "L3"}, "Wavelength", 0 ), Set Random Seed( 12345 ), Number of Starts( 5 ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ), Add Term( {1, 1}, {4, 1} ), Add Term( {2, 1}, {3, 1} ), Add Term( {2, 1}, {4, 1} ), Add Term( {3, 1}, {4, 1} ), Set Sample Size( 18 ), Make Design} ); ``` #### [Custom Design, Mixture of Mixtures Design](#custom-design-mixture-of-mixtures-design) ``` DOE( Custom Design, {Add Response( Maximize, "Taste", 0, 10, . ), Add Factor( Mixture, 0.1, 0.2, "Cocoa", 0 ), Add Factor( Mixture, 0, 0.15, "Sugar", 0 ), Add Factor( Mixture, 0.2, 0.3, "Flour", 0 ), Add Factor( Mixture, 0.1, 0.2, "Butter", 0 ), Add Factor( Mixture, 0.25, 0.35, "Milk", 0 ), Add Factor( Mixture, 0.05, 0.2, "Eggs", 0 ), Set Random Seed( 12345 ), Number of Starts( 40 ), Add Constraint( [1 1 1 0 0 0 0.45, -1 -1 -1 0 0 0 -0.45] ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Alias Term( {1, 1}, {2, 1} ), Add Alias Term( {1, 1}, {3, 1} ), Add Alias Term( {1, 1}, {4, 1} ), Add Alias Term( {1, 1}, {5, 1} ), Add Alias Term( {1, 1}, {6, 1} ), Add Alias Term( {2, 1}, {3, 1} ), Add Alias Term( {2, 1}, {4, 1} ), Add Alias Term( {2, 1}, {5, 1} ), Add Alias Term( {2, 1}, {6, 1} ), Add Alias Term( {3, 1}, {4, 1} ), Add Alias Term( {3, 1}, {5, 1} ), Add Alias Term( {3, 1}, {6, 1} ), Add Alias Term( {4, 1}, {5, 1} ), Add Alias Term( {4, 1}, {6, 1} ), Add Alias Term( {5, 1}, {6, 1} ), Set Sample Size( 10 ), Make Design} ); ``` #### [Custom Design, Resolution V Screening Experiment that Resolves all Two-Factor Interactions](#custom-design-resolution-v-screening-experiment-that-resolves-all-two-factor-interactions) ``` DOE( Custom Design, {Add Response( Maximize, "Y", ., ., . ), Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Add Factor( Continuous, -1, 1, "X4", 0 ), Add Factor( Continuous, -1, 1, "X5", 0 ), Set Random Seed( 12345 ), Number of Starts( 10 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ), Add Term( {1, 1}, {4, 1} ), Add Term( {1, 1}, {5, 1} ), Add Term( {2, 1}, {3, 1} ), Add Term( {2, 1}, {4, 1} ), Add Term( {2, 1}, {5, 1} ), Add Term( {3, 1}, {4, 1} ), Add Term( {3, 1}, {5, 1} ), Add Term( {4, 1}, {5, 1} ), Set Sample Size( 16 ), Optimality Criterion( "Make D-Optimal Design" ), Make Design} ); ``` #### [Custom Design, Response Surface Design](#custom-design-response-surface-design) ``` DOE( Custom Design, {Add Response( Match Target, "Y", 54, 56, . ), Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Set Random Seed( 929281409 ), Number of Starts( 40 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {1, 2} ), Add Term( {1, 1}, {2, 1} ), Add Term( {2, 2} ), Add Term( {1, 1}, {3, 1} ), Add Term( {2, 1}, {3, 1} ), Add Term( {3, 2} ), Set Sample Size( 16 ), Optimality Criterion( 2 ), Make Design} ); ``` #### [Custom Design, Response Surface Design with Flexible Blocking](#custom-design-response-surface-design-with-flexible-blocking) ``` DOE( Custom Design, {Add Response( Maximize, "Y", ., ., . ), Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Blocking, 4, "X3" ), Set Random Seed( 12345 ), Number of Starts( 5 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {1, 2} ), Add Term( {1, 1}, {2, 1} ), Add Term( {2, 2} ), Set Sample Size( 12 ), Optimality Criterion( 2 ), Make Design} ); ``` #### [Custom Design, Screening Experiment that Estimates Main Effects Only](#custom-design-screening-experiment-that-estimates-main-effects-only) ``` DOE( Custom Design, {Add Response( Maximize, "Y", ., ., . ), Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Add Factor( Continuous, -1, 1, "X4", 0 ), Add Factor( Continuous, -1, 1, "X5", 0 ), Add Factor( Continuous, -1, 1, "X6", 0 ), Set Random Seed( 12345 ), Number of Starts( 1 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Term( {6, 1} ), Add Alias Term( {1, 1}, {2, 1} ), Add Alias Term( {1, 1}, {3, 1} ), Add Alias Term( {1, 1}, {4, 1} ), Add Alias Term( {1, 1}, {5, 1} ), Add Alias Term( {1, 1}, {6, 1} ), Add Alias Term( {2, 1}, {3, 1} ), Add Alias Term( {2, 1}, {4, 1} ), Add Alias Term( {2, 1}, {5, 1} ), Add Alias Term( {2, 1}, {6, 1} ), Add Alias Term( {3, 1}, {4, 1} ), Add Alias Term( {3, 1}, {5, 1} ), Add Alias Term( {3, 1}, {6, 1} ), Add Alias Term( {4, 1}, {5, 1} ), Add Alias Term( {4, 1}, {6, 1} ), Add Alias Term( {5, 1}, {6, 1} ), Set Sample Size( 12 ), Make Design} ); ``` #### [Custom Design, Split-Plot Experiment](#custom-design-split-plot-experiment) ``` DOE( Custom Design, {Add Response( Maximize, "thickness", 10, ., . ), Add Factor( Continuous, -1, 1, "extrusion rate", 1 ), Add Factor( Continuous, -1, 1, "temperature", 1 ), Add Factor( Mixture, 0, 1, "m1", 0 ), Add Factor( Mixture, 0, 1, "m2", 0 ), Add Factor( Mixture, 0, 1, "m3", 0 ), Set Random Seed( 12345 ), Number of Starts( 5 ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ), Add Term( {1, 1}, {4, 1} ), Add Term( {1, 1}, {5, 1} ), Add Term( {2, 1}, {3, 1} ), Add Term( {2, 1}, {4, 1} ), Add Term( {2, 1}, {5, 1} ), Add Term( {3, 1}, {4, 1} ), Add Term( {3, 1}, {5, 1} ), Add Term( {4, 1}, {5, 1} ), Set N Whole Plots( 7 ), Set Sample Size( 28 ), Optimality Criterion( "Make D-Optimal Design" ), Make Design} ); ``` #### [Custom Design, Supersaturated Screening Design](#custom-design-supersaturated-screening-design) ``` DOE( Custom Design, {Add Response( Maximize, "Y", ., ., . ), Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Add Factor( Continuous, -1, 1, "X4", 0 ), Add Factor( Continuous, -1, 1, "X5", 0 ), Add Factor( Continuous, -1, 1, "X6", 0 ), Add Factor( Continuous, -1, 1, "X7", 0 ), Add Factor( Continuous, -1, 1, "X8", 0 ), Add Factor( Continuous, -1, 1, "X9", 0 ), Add Factor( Continuous, -1, 1, "X10", 0 ), Add Factor( Continuous, -1, 1, "X11", 0 ), Add Factor( Continuous, -1, 1, "X12", 0 ), Set Random Seed( 12345 ), Number of Starts( 5 ), Add Term( {1, 0} ), Add Potential Term( {1, 1} ), Add Potential Term( {2, 1} ), Add Potential Term( {3, 1} ), Add Potential Term( {4, 1} ), Add Potential Term( {5, 1} ), Add Potential Term( {6, 1} ), Add Potential Term( {7, 1} ), Add Potential Term( {8, 1} ), Add Potential Term( {9, 1} ), Add Potential Term( {10, 1} ), Add Potential Term( {11, 1} ), Add Potential Term( {12, 1} ), Set Sample Size( 8 ), Simulate Responses( 1 ), Save X Matrix( 0 ), Set Run Order( Randomize ), Make Design} ); ``` #### [Custom Design, Two-Way Split-Plot Experiment](#custom-design-two-way-split-plot-experiment) ``` DOE( Custom Design, {Add Response( Minimize, "OCV", ., ., . ), Add Factor( Continuous, -1, 1, "A1", 2 ), Add Factor( Continuous, -1, 1, "A2", 2 ), Add Factor( Continuous, -1, 1, "A3", 2 ), Add Factor( Continuous, -1, 1, "A4", 2 ), Add Factor( Continuous, -1, 1, "C1", 1 ), Add Factor( Continuous, -1, 1, "C2", 1 ), Set Random Seed( 1866762673 ), Number of Starts( 21 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Term( {6, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ), Add Term( {1, 1}, {4, 1} ), Add Term( {1, 1}, {5, 1} ), Add Term( {1, 1}, {6, 1} ), Add Term( {2, 1}, {3, 1} ), Add Term( {2, 1}, {4, 1} ), Add Term( {2, 1}, {5, 1} ), Add Term( {2, 1}, {6, 1} ), Add Term( {3, 1}, {4, 1} ), Add Term( {3, 1}, {5, 1} ), Add Term( {3, 1}, {6, 1} ), Add Term( {4, 1}, {5, 1} ), Add Term( {4, 1}, {6, 1} ), Add Term( {5, 1}, {6, 1} ), Make Strip Plot Design, Set N Whole Plots( 16 ), Set N Subplots( 6 ), Set Sample Size( 48 ), Optimality Criterion( "Make D-Optimal Design" ), Make Design} ); ``` #### [Custom Design, Wine Tasting](#custom-design-wine-tasting) ``` DOE( Custom Design, {Add Response( Maximize, "Rating", 0, 20, . ), Add Factor( Blocking, 8, "Rater" ), Add Factor( Categorical, {"Bernard", "Dijon"}, "Variety", 0 ), Add Factor( Categorical, {"1", "2", "3", "4"}, "Field", 0 ), Add Factor( Categorical, {"No", "Yes"}, "De-Stem", 0 ), Add Factor( Categorical, {"Cultured", "Wild"}, "Yeast", 0 ), Add Factor( Categorical, {"High", "Low"}, "Temperature", 0 ), Add Factor( Categorical, {"Hard", "Soft"}, "Press", 0 ), Add Factor( Categorical, {"New", "2 Years"}, "Barrel Age", 0 ), Add Factor( Categorical, {"Air", "Kiln"}, "Barrel Seasoning", 0 ), Add Factor( Categorical, {"No", "Yes"}, "Filtering", 0 ), Set Random Seed( 1234 ), Number of Starts( 2 ), Add Term( {1, 0} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Term( {6, 1} ), Add Term( {7, 1} ), Add Term( {8, 1} ), Add Term( {9, 1} ), Add Term( {10, 1} ), Add Term( {1, 1} ), Add Alias Term( {2, 1}, {3, 1} ), Add Alias Term( {2, 1}, {4, 1} ), Add Alias Term( {2, 1}, {5, 1} ), Add Alias Term( {2, 1}, {6, 1} ), Add Alias Term( {2, 1}, {7, 1} ), Add Alias Term( {2, 1}, {8, 1} ), Add Alias Term( {2, 1}, {9, 1} ), Add Alias Term( {2, 1}, {10, 1} ), Add Alias Term( {3, 1}, {4, 1} ), Add Alias Term( {3, 1}, {5, 1} ), Add Alias Term( {3, 1}, {6, 1} ), Add Alias Term( {3, 1}, {7, 1} ), Add Alias Term( {3, 1}, {8, 1} ), Add Alias Term( {3, 1}, {9, 1} ), Add Alias Term( {3, 1}, {10, 1} ), Add Alias Term( {4, 1}, {5, 1} ), Add Alias Term( {4, 1}, {6, 1} ), Add Alias Term( {4, 1}, {7, 1} ), Add Alias Term( {4, 1}, {8, 1} ), Add Alias Term( {4, 1}, {9, 1} ), Add Alias Term( {4, 1}, {10, 1} ), Add Alias Term( {5, 1}, {6, 1} ), Add Alias Term( {5, 1}, {7, 1} ), Add Alias Term( {5, 1}, {8, 1} ), Add Alias Term( {5, 1}, {9, 1} ), Add Alias Term( {5, 1}, {10, 1} ), Add Alias Term( {6, 1}, {7, 1} ), Add Alias Term( {6, 1}, {8, 1} ), Add Alias Term( {6, 1}, {9, 1} ), Add Alias Term( {6, 1}, {10, 1} ), Add Alias Term( {7, 1}, {8, 1} ), Add Alias Term( {7, 1}, {9, 1} ), Add Alias Term( {7, 1}, {10, 1} ), Add Alias Term( {8, 1}, {9, 1} ), Add Alias Term( {8, 1}, {10, 1} ), Add Alias Term( {9, 1}, {10, 1} ), Set Sample Size( 40 ), Simulate Responses( 0 ), Save X Matrix( 0 ), Make Design} ); ``` #### [Definitive Screening Design](#definitive-screening-design) ``` DOE( Definitive Screening Design, {Add Response( Maximize, "Yield", ., ., . ), Add Factor( Continuous, 0, 10, "Methanol", 0 ), Add Factor( Continuous, 0, 10, "Ethanol", 0 ), Add Factor( Continuous, 0, 10, "Propanol", 0 ), Add Factor( Continuous, 0, 10, "Butanol", 0 ), Add Factor( Continuous, 6, 9, "pH", 0 ), Add Factor( Continuous, 1, 2, "Time", 0 ), Show Blocking Options( 0, 0 ), Number of Extra Runs( 4 ), Set Random Seed( 880596769 ), Make Design, Simulate Responses( 0 ), Save X Matrix( 0 )} ); ``` #### [Definitive Screening Design with Blocks](#definitive-screening-design-with-blocks) ``` DOE( Definitive Screening Design, {Add Response( Maximize, "Yield", ., ., . ), Add Factor( Blocking, 0, "Lot" ), Add Factor( Continuous, 0, 10, "Methanol", 0 ), Add Factor( Continuous, 0, 10, "Ethanol", 0 ), Add Factor( Continuous, 0, 10, "Propanol", 0 ), Add Factor( Continuous, 0, 10, "Butanol", 0 ), Add Factor( Continuous, 6, 9, "pH", 0 ), Add Factor( Continuous, 1, 2, "Time", 0 ), Show Blocking Options( 1, 2 ), Number of Extra Runs( 0 ), Set Random Seed( 1146016221 ), Make Design, Simulate Responses( 0 ), Save X Matrix( 0 )} ); ``` #### [Full Factorial Design](#full-factorial-design) ``` DOE( Full Factorial Design, {Add Response( Maximize, "Percent Reacted", 90, 100, 1 ), Add Factor( Continuous, {10, 15}, "Feed Rate", 0 ), Add Factor( Continuous, {1, 2}, "Catalyst", 0 ), Add Factor( Continuous, {100, 120}, "Stir Rate", 0 ), Add Factor( Continuous, {140, 180}, "Temperature", 0 ), Add Factor( Continuous, {3, 6}, "Concentration", 0 ), Set Random Seed( 12345 ), Make Design} ); ``` #### [Group Orthogonal Supersaturated Design](#group-orthogonal-supersaturated-design) ``` DOE( Group Orthogonal Supersaturated Design, {GOSSDStructure( 12, 16, 4, 4 ), ChangeFactorSettings( 1, Continuous, -1, 1, "Fake 1" ), ChangeFactorSettings( 2, Continuous, -1, 1, "Fake 2" ), ChangeFactorSettings( 3, Continuous, -1, 1, "Fake 3" ), ChangeFactorSettings( 4, Continuous, -1, 1, "X4" ), ChangeFactorSettings( 5, Continuous, -1, 1, "X5" ), ChangeFactorSettings( 6, Continuous, -1, 1, "X6" ), ChangeFactorSettings( 7, Continuous, -1, 1, "X7" ), ChangeFactorSettings( 8, Continuous, -1, 1, "X8" ), ChangeFactorSettings( 9, Continuous, -1, 1, "X9" ), ChangeFactorSettings( 10, Continuous, -1, 1, "X10" ), ChangeFactorSettings( 11, Continuous, -1, 1, "X11" ), ChangeFactorSettings( 12, Continuous, -1, 1, "X12" ), ChangeFactorSettings( 13, Continuous, -1, 1, "X13" ), ChangeFactorSettings( 14, Continuous, -1, 1, "X14" ), ChangeFactorSettings( 15, Continuous, -1, 1, "X15" ), Make Design, Simulate Responses( 0 )} ); ``` #### [MaxDiff Design](#maxdiff-design) ``` Open( "$SAMPLE_DATA/Design Experiment/Candy Profiles.jmp" ); DOE( MaxDiff Design, X( :Candy ), {Set Number of Profiles( 4 ), Set Number of Choice Sets( 7 ), Make Design, Simulate Responses( 0 )} ); ``` #### [Mixture Design, Extreme Vertices Design](#mixture-design-extreme-vertices-design) ``` DOE( Mixture Design, {Add Response( Maximize, "Y", ., ., . ), Change Factor Settings( 1, 0.05, 0.25, "X1" ), Change Factor Settings( 2, 0.1, 0.3, "X2" ), Change Factor Settings( 3, 0.1, 0.3, "X3" ), Add Factor( Mixture, 0.1, 0.4, "X4", 0 ), Add Factor( Mixture, 0.05, 0.25, "X5", 0 ), Set Random Seed( 1409 ), Mixture Design Type( Extreme Vertices, 4 ), Find Subset( 10 ), Simulate Responses( 0 )} ); ``` #### [Mixture Design, Optimal Mixture Design](#mixture-design-optimal-mixture-design) ``` DOE( Custom Design, {Add Response( Maximize, "Y", ., ., . ), Add Factor( Mixture, 0, 1, "X1", 0 ), Add Factor( Mixture, 0, 1, "X2", 0 ), Add Factor( Mixture, 0, 1, "X3", 0 ), Set Random Seed( 1409 ), Number of Starts( 2 ), Add Constraint( [1 1 0 0.8] ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ), Add Term( {2, 1}, {3, 1} ), Center Points( 2 ), Set Sample Size( 12 ), Simulate Responses( 0 ), Save X Matrix( 0 ), Optimality Criterion( "Make D-Optimal Design" ), Make Design} ); ``` #### [MSA Design](#msa-design) ``` DOE( MSA Design, {Add Response( None, "Y", ., ., . ), Add Factor( Categorical, {"1", "2", "3", "4", "5"}, "Part", MSA( 2, 1 ) ), Add Factor( Categorical, {"1", "2", "3"}, "Operator", MSA( 1, 1 ) ), Add Factor( Categorical, {"Lab A", "Lab B", "Lab C"}, "Lab", MSA( 3, 1 ) ), Set Random Seed( 123 ), Replicates( 5, 0 ), Nesting Structure( {"Lab", {"Operator" || "Part"}} ), Make Design, Simulate Responses( 0 )} ); ``` #### [Response Surface Design, Box-Behnken Design](#response-surface-design-box-behnken-design) ``` DOE( Response Surface Design, {Add Response( Match Target, "Stretch", 350, 550, 1 ), Change Factor Settings( 1, 0.7, 1.7, "Silica" ), Change Factor Settings( 2, 1.8, 2.8, "Sulfur" ), Add Factor( Continuous, 40, 60, "Silane", 0 ), Set Random Seed( 12345 ), Make Design( 1 ), Center Points( 3 ), Simulate Responses( 0 ), Save X Matrix( 0 )} ); ``` #### [Screening Design, Fractional Factorial Design](#screening-design-fractional-factorial-design) ``` DOE( Screening Design, {Add Response( Match Target, "Depth", 0.12, 0.22, . ), Add Factor( Continuous, 3, 5, "Speed", 0 ), Add Factor( Continuous, 150, 165, "Current", 0 ), Add Factor( Continuous, 20, 30, "Wall Size", 0 ), Add Factor( Categorical, {"John", "Mary"}, "Operator", 0 ), Add Factor( Categorical, {"Conductance", "Keyhole"}, "Mode", 0 ), Add Factor( Categorical, {"Double", "Single"}, "Geometry", 0 ), Add Factor( Categorical, {"Aluminum", "Magnesium"}, "Material", 0 ), Set Random Seed( 12345 ), Make Design( 1 ), Simulate Responses( 0 ), Save X Matrix( 0 )} ); ``` #### [Screening Design, Main Effects Screening Design](#screening-design-main-effects-screening-design) ``` DOE( Screening Design, {Add Response( Match Target, "Depth", 0.12, 0.22, . ), Add Factor( Continuous, 3, 5, "Speed", 0 ), Add Factor( Continuous, 150, 165, "Current", 0 ), Add Factor( Continuous, 20, 30, "Wall Size", 0 ), Add Factor( Categorical, {"John", "Mary"}, "Operator", 0 ), Add Factor( Categorical, {"Conductance", "Keyhole"}, "Mode", 0 ), Add Factor( Categorical, {"Double", "Single"}, "Geometry", 0 ), Add Factor( Categorical, {"Aluminum", "Magnesium"}, "Material", 0 ), Set Random Seed( 12345 ), Screening Type( 1 ), Number of Starts( 1 ), Number of Column Starts( 50 ), Set Sample Size( 12 ), Make Design, Simulate Responses( 0 ), Save X Matrix( 0 )} ); ``` #### [Screening Design, Mixed-Level Screening Design](#screening-design-mixed-level-screening-design) ``` DOE( Screening Design, {Add Response( Maximize, "Y", ., ., . ), Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Add Factor( Continuous, -1, 1, "X4", 0 ), Add Factor( Continuous, -1, 1, "X5", 0 ), Add Factor( Categorical, {"L1", "L2"}, "X6", 0 ), Add Factor( Categorical, {"L1", "L2"}, "X7", 0 ), Add Factor( Categorical, {"L1", "L2"}, "X8", 0 ), Set Random Seed( 12345 ), Screening Type( 2, 2, 16 ), Make Design, Simulate Responses( 0 ), Save X Matrix( 0 )} ); ``` #### [Space Filling Design, Constrained Fast Flexible Filling](#space-filling-design-constrained-fast-flexible-filling) ``` DOE( Space Filling Design, {Add Response( Maximize, "Y", ., ., . ), Add Factor( Continuous, 0, 1, "X1", 0 ), Add Factor( Continuous, 0, 1, "X2", 0 ), Set Random Seed( 765 ), Add Constraint( [1 1 0.8] ), FFF Optimality Criterion( MaxPro ), Space Filling Design Type( Fast Flexible Filling, 200 ), Simulate Responses( 0 )} ); ``` #### [Space Filling Design, Sphere Packing](#space-filling-design-sphere-packing) ``` DOE( Space Filling Design, {Add Response( Maximize, "Y", ., ., . ), Add Factor( Continuous, 0, 1, "X1", 0 ), Add Factor( Continuous, 0, 1, "X2", 0 ), Set Random Seed( 765 ), Space Filling Design Type( Sphere Packing, 8 ), Simulate Responses( 0 )} ); ``` ## [Columns](#columns) ### [Factor](#factor) **Syntax:** obj \<< Factor( column(s) ) ``` DOE( Custom Design, {Add Response( Match Target, "Strength", 1.2, 1.4, . ), Add Factor( Categorical, {"Coarse", "Medium"}, "Grind", 0 ), Add Factor( Continuous, 195, 205, "Temperature", 0 ), Add Factor( Continuous, 3, 4, "Time", 0 ), Add Factor( Continuous, 1.6, 2.4, "Charge", 0 ), Add Factor( Blocking, 4, "Station " ), Set Random Seed( 569534903 ), Number of Starts( 100 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Alias Term( {1, 1}, {2, 1} ), Add Alias Term( {1, 1}, {3, 1} ), Add Alias Term( {1, 1}, {4, 1} ), Add Alias Term( {2, 1}, {3, 1} ), Add Alias Term( {2, 1}, {4, 1} ), Add Alias Term( {3, 1}, {4, 1} ), Set Sample Size( 12 ), Make Design} ); ``` ### [Response](#response) **Syntax:** obj \<< Response( column(s) ) ``` DOE( Custom Design, {Add Response( Match Target, "Strength", 1.2, 1.4, . ), Add Factor( Categorical, {"Coarse", "Medium"}, "Grind", 0 ), Add Factor( Continuous, 195, 205, "Temperature", 0 ), Add Factor( Continuous, 3, 4, "Time", 0 ), Add Factor( Continuous, 1.6, 2.4, "Charge", 0 ), Add Factor( Blocking, 4, "Station " ), Set Random Seed( 569534903 ), Number of Starts( 100 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Alias Term( {1, 1}, {2, 1} ), Add Alias Term( {1, 1}, {3, 1} ), Add Alias Term( {1, 1}, {4, 1} ), Add Alias Term( {2, 1}, {3, 1} ), Add Alias Term( {2, 1}, {4, 1} ), Add Alias Term( {3, 1}, {4, 1} ), Set Sample Size( 12 ), Make Design} ); ``` ### [X](#x) **Syntax:** obj \<< X( column(s) ) ``` DOE( Custom Design, {Add Response( Match Target, "Strength", 1.2, 1.4, . ), Add Factor( Categorical, {"Coarse", "Medium"}, "Grind", 0 ), Add Factor( Continuous, 195, 205, "Temperature", 0 ), Add Factor( Continuous, 3, 4, "Time", 0 ), Add Factor( Continuous, 1.6, 2.4, "Charge", 0 ), Add Factor( Blocking, 4, "Station " ), Set Random Seed( 569534903 ), Number of Starts( 100 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Alias Term( {1, 1}, {2, 1} ), Add Alias Term( {1, 1}, {3, 1} ), Add Alias Term( {1, 1}, {4, 1} ), Add Alias Term( {2, 1}, {3, 1} ), Add Alias Term( {2, 1}, {4, 1} ), Add Alias Term( {3, 1}, {4, 1} ), Set Sample Size( 12 ), Make Design} ); ``` ### [Y](#y) **Syntax:** obj \<< Y( column(s) ) ``` DOE( Custom Design, {Add Response( Match Target, "Strength", 1.2, 1.4, . ), Add Factor( Categorical, {"Coarse", "Medium"}, "Grind", 0 ), Add Factor( Continuous, 195, 205, "Temperature", 0 ), Add Factor( Continuous, 3, 4, "Time", 0 ), Add Factor( Continuous, 1.6, 2.4, "Charge", 0 ), Add Factor( Blocking, 4, "Station " ), Set Random Seed( 569534903 ), Number of Starts( 100 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {4, 1} ), Add Term( {5, 1} ), Add Alias Term( {1, 1}, {2, 1} ), Add Alias Term( {1, 1}, {3, 1} ), Add Alias Term( {1, 1}, {4, 1} ), Add Alias Term( {2, 1}, {3, 1} ), Add Alias Term( {2, 1}, {4, 1} ), Add Alias Term( {3, 1}, {4, 1} ), Set Sample Size( 12 ), Make Design} ); ``` ## [Item Messages](#item-messages) ### [A-Optimality Parameter Weights](#a-optimality-parameter-weights) **Syntax:** obj \<< A-Optimality Parameter Weights **Description:** Sets the weights to be used for creating an A-optimal design. **JMP Version Added:** 14 ``` DOE( Custom Design, {Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ), Add Term( {2, 1}, {3, 1} ), Set Sample Size( 14 ), Optimality Criterion( "Make A-Optimal Design"n ), "A-Optimality Parameter Weights"n( [1 1 1 1 0.1 0.1 0.1] )} ); ``` ### [ALT Factor Settings](#alt-factor-settings) **Syntax:** obj \<< ALT Factor Settings **Description:** For the given factor number in an accelerated life test plan, allows specification of factor name, number of levels, factor transformation, usage conditions and test conditions. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [ALT Plan Setup](#alt-plan-setup) **Syntax:** obj \<< ALT Plan Setup( 1|2|3 ) **Description:** Specifies the initial choice of model for an accelerated life test plan. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [Add Alias Term](#add-alias-term) **Syntax:** obj \<< Add Alias Term **Description:** Adds an alias term to the list of alias terms. Specify the factor number and power for each effect in a list. Create interactions by separating effects with commas. ``` d = DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ) ); d << Add Alias Term( {1, 1}, {2, 1} ); d << Add Alias Term( {1, 2} ); ``` ### [Add Constraint](#add-constraint) **Syntax:** obj \<< Add Constraint **Description:** Adds linear constraints through a matrix. Each row represents a constraint. The last column is for values on the right side of the inequality constraints. In JSL, the inequality constraints must be less than or equal to the values on the right. ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Add Constraint( [1 1 0 1, 1 0 1 1] ), Add Term( {1, 0} ) ); ``` ### [Add Factor](#add-factor) **Syntax:** obj \<< Add Factor( Continuous|Discrete Numeric|Blocking|Constant|Categorical|Mixture ) **Description:** Adds a factor of the specified type and optional arguments. If nothing is specified, this command adds a continuous factor. ``` d = DOE( Custom Design ); d << Add Factor( Continuous, -1, 1, "X1", 0 ); d << Add Factor( Discrete Numeric, {1, 2, 3}, "X2", 0 ); d << Add Factor( Categorical, {"L1", "L2"}, "X3", 0 ); d << Add Factor( Blocking, 8, "X4" ); d << Add Factor( Constant, 3, "X5" ); ``` ### [Add Functional Response](#add-functional-response) **Syntax:** obj \<< Add Functional Response **Description:** Adds a functional response with the specified name, number of measurements per run, and values. **JMP Version Added:** 15 ``` DOE( Custom Design, Add Response( Maximize, "Y", ., ., . ), Add Functional Response( "Y", 5, {1, 2, 3, 4, 5} ), Set Random Seed( 46055034 ), Simulate Responses( 0 ), Save X Matrix( 0 ) ); ``` ### [Add Potential Term](#add-potential-term) **Syntax:** obj \<< Add Potential Term **Description:** Adds an If Possible term to the list of model terms. Specify the factor number and power for each effect in a list. Create interactions by separating effects with commas. ``` d = DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ) ); d << Add Potential Term( {1, 1}, {2, 1} ); d << Add Potential Term( {1, 2} ); ``` ### [Add Response](#add-response) **Syntax:** obj \<< Add Response( goal, name, lower limit, upper limit, importance, lower detection limit, upper detection limit ) **Description:** Adds a response with the specified goal, name, lower limit, upper limit, and importance. **Example 1** ``` DOE( Custom Design, Add Response( Match Target, "Y", 10, 30, 1 ) ); ``` **Example 2** ``` DOE( Custom Design, Add Response( Match Target, "Y", ., ., 1, 10, 30 ) ); ``` ### [Add Term](#add-term) **Syntax:** obj \<< Add Term **Description:** Adds a "Necessary" term to list of the model terms. Effects are specified by {factor number, power}. Interactions can be created by separating effects by commas. ``` d = DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ) ); d << Add Term( {1, 1}, {2, 1} ); d << Add Term( {1, 2} ); ``` ### [Additional Designs](#additional-designs) **Syntax:** obj \<< Additional Designs **Description:** Specify up to nine additional designs to be compared to the reference design. **JMP Version Added:** 14 ``` DOE( Custom Design, Add Factor, Add Factor, Add Factor, Set Sample Size( 12 ), Make Design, Make Table ); DOE( Custom Design, Add Factor, Add Factor, Add Factor, Make Design, Make Table ); DOE( Custom Design, Add Factor, Add Factor, Add Factor, Set Sample Size( 4 ), Make Design, Make Table ); DOE( Compare Designs, Reference Design( "Custom Design", X( :X1, :X2, :X3 ) ), Additional Designs( "Custom Design 2", X( :X1, :X2, :X3 ), "Custom Design 3", X( :X1, :X2, :X3 ) ) ); ``` ### [Allow covariate rows to be repeated](#allow-covariate-rows-to-be-repeated) **Syntax:** obj \<< Allow covariate rows to be repeated( state=0|1 ) **Description:** Specifies if covariate rows are allowed to be repeated in the design. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); DOE( Custom Design, Add Response( Maximize, "Y", ., ., . ), Add Factor( Covariate, :sex, 0 ), Add Factor( Covariate, :height, 0 ), Add Factor( Covariate, :weight, 0 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Enforce Use of Selected Covariate Rows( 1 ), Allow covariate rows to be repeated( 1 ), Select Covariate Rows( [1 2 3 4] ), Set Sample Size( 24 ) ); ``` ### [Augment Method](#augment-method) **Syntax:** obj \<< Augment Method( Replicate|Centerpoints|Fold Over|Add Axial|Augment ) **Description:** Specifies the type of augment method and its parameters. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Augment Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Augment Method( Augment ); d << Set Sample Size( 24 ); d << Make Design; ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Design Experiment/2x3x4 Factorial.jmp" ); d = DOE( Augment Design, X( :X1, :X2, :X3 ), Y( :Y ) ); d << Augment Method( Replicate, 2 ); ``` **Example 3** ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Augment Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Augment Method( Centerpoints, 3 ); ``` **Example 4** ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Augment Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Augment Method( Fold Over, [1 2] ); ``` **Example 5** ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Augment Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Augment Method( Add Axial, 1, 2 ); ``` ### [Blocks](#blocks) **Syntax:** obj \<< Blocks **Description:** Specifies the block size for a balanced incomplete block design (BIBD). **JMP Version Added:** 14 ``` d = DOE( Balanced Incomplete Block Design, Treatments( 3, {"L1", "L2", "L3"} ) ); d << Blocks( 2 ); d << Make Design; ``` ### [Center Points](#center-points) **Syntax:** obj \<< Center Points **Description:** Specifies the number of center points. **Example 1** ``` d = DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ) ); d << Make Model( Linear ); d << Center Points( 2 ); ``` **Example 2** ``` DOE( Definitive Screening Design, Add Factor, Add Factor, Add Factor, Add Factor, Add Factor, Add Factor, Show Blocking Options( 1, 2 ), Number of Extra Runs( 4 ), Center Points( 1 ) ); ``` ### [Change Anticipated Coefficients](#change-anticipated-coefficients) **Syntax:** obj \<< Change Anticipated Coefficients **Description:** Change the Anticipated Coefficients in Power Analysis. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Evaluate Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Change Anticipated Coefficients( [1 2 3 4 2 2 2 3 3 3] ); ``` ### [Change Factor Settings](#change-factor-settings) **Syntax:** obj \<< Change Factor Settings **Description:** Specifies the minimum, maximum, and name of the continuous or mixture factor that you included in the first argument. Most useful for platforms that initially have predefined factors. **Example 1** ``` d = DOE( Response Surface Design ); d << Change Factor Settings( 1, 2, 3, "A" ); d << Change Factor Settings( 2, 0, 4 ); ``` **Example 2** ``` d = DOE( Mixture Design ); d << Change Factor Settings( 1, 0.1, 0.4, "A" ); d << Change Factor Settings( 3, 0, 0.8, "C" ); ``` ### [Check Inscribe](#check-inscribe) **Syntax:** obj \<< Check Inscribe **Description:** Rescales the design so that axial points are at the low and high ends of the range. ``` d = DOE( Response Surface Design, Make Design( 2 ) ); d << Set Axial Choice( 2 ); d << Check Inscribe; ``` ### [Choice Design Table Output](#choice-design-table-output) **Syntax:** obj \<< Choice Design Table Output( "Separate"|"Combined" ) **Description:** Specifies how to create a data table for a choice design. ``` DOE( Choice Design, {Add Factor( Categorical, {"L1", "L2"}, "X1", 0 ), Add Factor( Categorical, {"L1", "L2"}, "X2", 0 ), Add Term( {1, 1} ), Add Term( {2, 1} ), Set Prior Mean Choice( [0 0] ), Set Prior Variance Matrix( [1 0, 0 1] ), Set Number of Attributes( 2 ), Set Number of Profiles( 2 ), Set Number of Choice Sets( 8 ), Set Number of Surveys( 1 ), Set Expected Number of Respondents( 1 ), Make Design, Choice Design Table Output( Combined )} ); ``` ### [D Efficiency Weight](#d-efficiency-weight) **Syntax:** obj \<< D Efficiency Weight **Description:** Use this option to control the relative importance of D-efficiency and reduction of aliasing. Supply a number between zero and one. ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), D Efficiency Weight( 0.5 ), Make Design ); ``` ### [Design Search Time](#design-search-time) **Syntax:** obj \<< Design Search Time( number ) **Description:** Specifies the number of seconds to search for a design. ``` DOE( Custom Design, {Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Set Sample Size( 7 ), Design Search Time( 8 ), Make Design} ); ``` ### [Disallowed Combinations](#disallowed-combinations) **Syntax:** obj \<< Disallowed Combinations **Description:** Enables you to supply a script that returns true for any factor combinations that should be excluded from your design. ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Categorical, {"L1", "L2"}, "X2", 0 ), Number of Starts( 100 ), Disallowed Combinations( X1 > 0.5 & X2 == 2 ), Make Design ); ``` ### [Discrete Numeric Powers Set to Necessary](#discrete-numeric-powers-set-to-necessary) **Syntax:** obj \<< Discrete Numeric Powers Set to Necessary( state=0|1 ) **Description:** Specifies if powers in discrete numeric factors should be necessary model terms. ``` DOE( Custom Design, Add Factor( Discrete Numeric, {1, 2, 3}, "X1", 0 ), Add Factor( Discrete Numeric, {1, 2, 3}, "X2", 0 ), Discrete Numeric Powers Set to Necessary( 1 ), Make Model( Linear ) ); ``` ### [Distribution Choice](#distribution-choice) **Syntax:** obj \<< Distribution Choice **Description:** Specifies the distribution for an accelerated life test plan. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [Enforce Use of Selected Covariate Rows](#enforce-use-of-selected-covariate-rows) **Syntax:** obj \<< Enforce Use of Selected Covariate Rows( state=0|1 ) **Description:** Specifies if all selected covariate rows should be included in the design. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); DOE( Custom Design, Add Response( Maximize, "Y", ., ., . ), Add Factor( Covariate, :sex, 0 ), Add Factor( Covariate, :height, 0 ), Add Factor( Covariate, :weight, 0 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Enforce Use of Selected Covariate Rows( 1 ), Allow covariate rows to be repeated( 1 ), Select Covariate Rows( [1 2 3 4] ), Set Sample Size( 24 ) ); ``` ### [FFF Optimality Criterion](#fff-optimality-criterion) **Syntax:** obj \<< FFF Optimality Criterion( "MaxPro"|"Centroid" ) **Description:** Specifies the criterion used in the design. Recommended is the default value. **Example 1** ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Optimality Criterion( "Make I-optimal Design" ), Make Design ); ``` **Example 2** ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Optimality Criterion( 2 ), Make Design ); ``` ### [Find Subset](#find-subset) **Syntax:** obj \<< Find Subset **Description:** Finds the D-optimal subset of an Extreme Vertices design. ``` d = DOE( Mixture Design, Add Factor( Mixture, 0.1, 1, "X4", 0 ) ); d << Mixture Design Type( Extreme Vertices, 3 ); d << Find Subset( 10 ); ``` ### [GOSSDDetails](#gossddetails) **Syntax:** obj \<< GOSSDDetails **Description:** Returns the current factor settings as a list. **JMP Version Added:** 15 ``` d = DOE( Group Orthogonal Supersaturated Design ); Show( d << GOSSDDetails ); ``` ### [GOSSDStructure](#gossdstructure) **Syntax:** obj \<< GOSSDStructure **Description:** Specifies the structure of a GOSSD **JMP Version Added:** 15 ``` d = DOE( Group Orthogonal Supersaturated Design ); d << GOSSDStructure( 6, 8 ); ``` ### [Get Alias Matrix](#get-alias-matrix) **Syntax:** obj \<< Get Alias Matrix **Description:** Returns the alias matrix from design evaluation. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Evaluate Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Get Alias Matrix; ``` ### [Get Design Diagnostics](#get-design-diagnostics) **Syntax:** obj \<< Get Design Diagnostics **Description:** Return D-Efficiency, G-Efficiency, A-Efficiency and Average Variance of Prediction. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Evaluate Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Get Design Diagnostics; ``` ### [Get Effect Power](#get-effect-power) **Syntax:** obj \<< Get Effect Power **Description:** Return vector of powers for effect estimates. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/2x3x4 Factorial.jmp" ); d = DOE( Evaluate Design, X( :X1, :X2, :X3 ), Y( :Y ) ); d << Get Effect Power; ``` ### [Get Estimation Efficiencies](#get-estimation-efficiencies) **Syntax:** obj \<< Get Estimation Efficiencies **Description:** Returns a vector for the increased width of each parameter estimate compared to an ideal design. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Evaluate Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Get Estimation Efficiencies; ``` ### [Get MaxPro Values](#get-maxpro-values) **Syntax:** obj \<< Get MaxPro Values **Description:** Returns the MaxPro values for a fast-flexible design, including any subdesigns based on levels of a categorical factor. **JMP Version Added:** 14 ``` d = DOE( Space Filling Design, {Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Categorical, {"L1", "L2", "L3", "L4"}, "X3", 0 ), FFF Optimality Criterion( MaxPro ), MaxPro Categorical Weight( 4 ), Space Filling Design Type( Fast Flexible Filling, 100 )} ); d << Get MaxPro Values; ``` ### [Get Number of Random Starts](#get-number-of-random-starts) **Syntax:** obj \<< Get Number of Random Starts **Description:** Returns the number of random starts used in design generation. **JMP Version Added:** 15 ### [Get Power](#get-power) **Syntax:** obj \<< Get Power **Description:** Return vector of powers for parameter estimates. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Evaluate Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Get Power; ``` ### [Get Prediction Variances](#get-prediction-variances) **Syntax:** obj \<< Get Prediction Variances **Description:** Returns the vector of prediction variances from the Fraction of Design Space Plot. **JMP Version Added:** 14 ``` d = DOE( Custom Design, {Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Set Sample Size( 7 ), Design Search Time( 8 ), Set Number of FDS points( 20000 ), Make Design} ); d << Get Prediction Variances; ``` ### [Get X Matrix](#get-x-matrix) **Syntax:** obj \<< Get X Matrix **Description:** Returns the design matrix (also called the X matrix). ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Evaluate Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Get X Matrix; ``` ### [Group New Runs Into Separate Block](#group-new-runs-into-separate-block) **Syntax:** obj \<< Group New Runs Into Separate Block **Description:** Adds a blocking factor, which groups new runs into separate blocks when augmenting a design. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Augment Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Group New Runs Into Separate Block; ``` ### [Load Constraints](#load-constraints) **Syntax:** obj \<< Load Constraints **Description:** Load a previously saved factor constraints table for use in this experiment. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Diamond Constraints.jmp" ); d = DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Term( {1, 0} ), Load Constraints ); ``` ### [Load Design](#load-design) **Syntax:** obj \<< Load Design **Description:** Load Design ``` d = DOE( Custom Design ); d << Load Design(); ``` ### [Load Factors](#load-factors) **Syntax:** obj \<< Load Factors **Description:** Load a previously saved factors table for use in this experiment. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Factors.jmp" ); DOE( Custom Design, Load Factors ); ``` ### [Load Responses](#load-responses) **Syntax:** obj \<< Load Responses **Description:** Loads a previously saved data table of responses. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Response.jmp" ); DOE( Custom Design, Load Responses ); ``` ### [Local Design](#local-design) **Syntax:** obj \<< Local Design( state=0|1 ) **Description:** Specifies if local design for the prior mean should be created. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( 2, {5, 200, 200} ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Local Design( 0 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Inspection Times( [200 400 600 800 1000] ), Set Number of Units( 150 ), Set Candidate Runs( [90 0 150, 100 0 150, 110 0 150] )} ); ``` ### [Make Design](#make-design) **Syntax:** obj \<< Make Design **Description:** Creates the design that you specified in the script. ``` d = DOE( Custom Design, Add factor, Add factor, Add factor ); d << Make Model( RSM ); d << Make Design; ``` ### [Make Model](#make-model) **Syntax:** obj \<< Make Model( Linear|Interactions|RSM ) **Description:** Adds terms to the list of model terms for the specified model. **Example 1** ``` d = DOE( Custom Design, Add Factor, Add Factor, Add Factor ); d << Make Model( RSM ); ``` **Example 2** ``` d = DOE( Custom Design, Add Factor, Add Factor, Add Factor ); d << Make Model( Interactions ); ``` ### [Make Strip Plot Design](#make-strip-plot-design) **Syntax:** obj \<< Make Strip Plot Design **Description:** Specifies a strip plot design when hard-to-change factors vary independently from very hard-to-change factors. ``` d = DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 2 ), Add Factor( Continuous, -1, 1, "X2", 1 ), Add Factor( Continuous, -1, 1, "X3", 0 ) ); d << Set N Whole Plots( 4 ); d << Make Strip Plot Design; ``` ### [Make Table](#make-table) **Syntax:** obj \<< Make Table **Description:** Creates a data table from the current design. ``` d = DOE( Custom Design, Add factor, Add factor, Add factor ); d << Make Design; d << Make Table; ``` ### [Make Test Plan](#make-test-plan) **Syntax:** obj \<< Make Test Plan **Description:** Creates the test plan for an accelerated life test plan. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Monitoring at Intervals", {5, 200, 200} ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Inspection Times( [200 400 600 800 1000] ), Set Number of Units( 150 ), Set Candidate Runs( [90 0 150, 100 0 150, 110 0 150] ), Make Design, Make Test Plan} ); ``` ### [MaxPro Categorical Weight](#maxpro-categorical-weight) **Syntax:** obj \<< MaxPro Categorical Weight **Description:** Specifies MaxPro weight. Values larger than 1 increase the separation of points that have the same categorical level. **JMP Version Added:** 14 ``` DOE( Space Filling Design, {Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Categorical, {"L1", "L2", "L3", "L4"}, "X3", 0 ), FFF Optimality Criterion( MaxPro ), MaxPro Categorical Weight( 4 ), Space Filling Design Type( Fast Flexible Filling, 100 )} ); ``` ### [Mixture Design Type](#mixture-design-type) **Syntax:** obj \<< Mixture Design Type( Simplex Centroid|Simplex Lattice|ABCD|Extreme Vertices|Space Filling ) **Description:** Specifies the type of mixture design. The default parameters are used unless you specify the parameter as the second argument. **Example 1** ``` d = doe( Mixture Design ); d << Mixture Design Type( Simplex Centroid, 2 ); ``` **Example 2** ``` d = doe( Mixture Design ); d << Mixture Design Type( Simplex Lattice, 4 ); ``` **Example 3** ``` d = doe( Mixture Design ); d << Mixture Design Type( ABCD ); ``` **Example 4** ``` d = doe( Mixture Design ); d << Change Factor Settings( 1, .05, .25 ); d << Mixture Design Type( Extreme Vertices, 3 ); ``` **Example 5** ``` d = doe( Mixture Design ); d << Mixture Design Type( Space Filling, 25 ); ``` ### [Mixture Sum](#mixture-sum) **Syntax:** obj \<< Mixture Sum **Description:** Use this option when you want to express the sum of all the ingredients to be other than 1. The mixture total is the sum of all the ingredient amounts. ``` DOE( Custom Design, Mixture Sum( 50 ), Add Factor( Mixture, 10, 25, "X1", 0 ), Add Factor( Mixture, 0, 15, "X2", 0 ), Add Factor( Mixture, 25, 40, "X3", 0 ), Make Design ); ``` ### [Nesting Structure](#nesting-structure) **Syntax:** obj \<< Nesting Structure **Description:** Specifies the nesting structure of the design. Use a bracketed list to indicate nesting (first element is nesting factor, second element is bracketed list of nested factors or structures). Use horizontal concatenation ('||') to indicate crossed factors or structures. ``` DOE( MSA Design, Add Factor( Categorical, {"L1", "L2"}, "X1", MSA( 4, 1, 1 ) ), Add Factor( Categorical, {"L1", "L2"}, "X2", MSA( 4, 1, 1 ) ), Add Factor( Categorical, {"L1", "L2"}, "X3", MSA( 4, 1, 1 ) ), Nesting Structure( {"X1", {"X2"}} || "X3" ) ); ``` ### [Number of Column Starts](#number-of-column-starts) **Syntax:** obj \<< Number of Column Starts **Description:** Specifies the number of times that random columns are optimized for each factor of a main effects screening design. ``` DOE( Screening Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Screening Type( 1 ), Number of Column Starts( 100 ), Set Sample Size( 12 ), Make Design ); ``` ### [Number of Extra Runs](#number-of-extra-runs) **Syntax:** obj \<< Number of Extra Runs **Description:** Specifies the number of extra runs to include in a definitive screening design. ``` DOE( Definitive Screening Design, Add Factor, Add Factor, Add Factor, Add Factor, Add Factor, Add Factor, Show Blocking Options( 1, 2 ), Number of Extra Runs( 4 ) ); ``` ### [Number of Starts](#number-of-starts) **Syntax:** obj \<< Number of Starts **Description:** Specifies the number of times the design is regenerated to optimize the overall design. ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Number of Starts( 1000 ), Make Design ); ``` ### [Optimality Criterion](#optimality-criterion) **Syntax:** obj \<< Optimality Criterion( "Recommended"|"Make D-Optimal Design"|"Make I-Optimal Design"|"Make A-Optimal Design"|"Make Alias Optimal Design" ) **Description:** Specifies the criterion used in the design. Recommended is the default value. **Example 1** ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Optimality Criterion( "Make I-optimal Design" ), Make Design ); ``` **Example 2** ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Optimality Criterion( 2 ), Make Design ); ``` ### [Order Column](#order-column) **Syntax:** obj \<< Order Column **Description:** Requests an order column when the data table is created. **JMP Version Added:** 14 ``` d = DOE( Balanced Incomplete Block Design ); d << Treatments( 3, {"L1", "L2", "L3"} ); d << Make Design; d << OrderColumn( 1 ); ``` ### [Prior Parameter Variance](#prior-parameter-variance) **Syntax:** obj \<< Prior Parameter Variance **Description:** Use this option to control the weight used for If Possible terms in a model. Higher values mean more prior information and smaller variance. The variances are the reciprocals of the entered values. ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Potential Term( {1, 1} ), Add Potential Term( {2, 1} ), Add Potential Term( {1, 1}, {2, 1} ), Prior Parameter Variance( [0, 1, 2, 6] ), Make Design ); ``` ### [Prior Specification Choice](#prior-specification-choice) **Syntax:** obj \<< Prior Specification Choice **Description:** Sets the option for specifying prior parameters, where 1 indicates Specify Intercept and 2 indicates Specify Quantile. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Prior Specification Choice( 1 ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [Reference Design](#reference-design) **Syntax:** obj \<< Reference Design **Description:** Specify the reference design for design comparison. **JMP Version Added:** 14 ``` DOE( Custom Design, Add Factor, Add Factor, Add Factor, Set Sample Size( 12 ), Make Design, Make Table ); DOE( Custom Design, Add Factor, Add Factor, Add Factor, Make Design, Make Table ); DOE( Custom Design, Add Factor, Add Factor, Add Factor, Set Sample Size( 4 ), Make Design, Make Table ); DOE( Compare Designs, Reference Design( "Custom Design", X( :X1, :X2, :X3 ) ), Additional Designs( "Custom Design 2", X( :X1, :X2, :X3 ), "Custom Design 3", X( :X1, :X2, :X3 ) ) ); ``` ### [Remove Alias Term](#remove-alias-term) **Syntax:** obj \<< Remove Alias Term **Description:** Removes a term from the list of alias terms. Specify the factor number and power for each effect in a list. Create interactions by separating effects with commas. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Evaluate Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Remove Alias Term( {1, 1}, {3, 1} ); ``` ### [Remove All Alias Terms](#remove-all-alias-terms) **Syntax:** obj \<< Remove All Alias Terms **Description:** Removes all Alias Terms from the list of alias terms ``` d = DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ) ); d << Make Model( Linear ); d << Remove All Alias Terms; ``` ### [Remove Term](#remove-term) **Syntax:** obj \<< Remove Term **Description:** Removes a term from the list of model terms. Specify the factor number and power for each effect in a list. Create interactions by separating effects with commas. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Evaluate Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Remove Term( {1, 1}, {3, 1} ); d << Remove Term( {3, 2} ); ``` ### [Replicates](#replicates) **Syntax:** obj \<< Replicates **Description:** Specifies the number of replicate runs. For MSA Designs, a second argument specifies the replicate structure: 0=Completely Randomized, 1=Batch Repeat, 2=Fast Repeat. **Example 1** ``` d = DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ) ); d << Make Model( Linear ); d << Replicates( 2 ); ``` **Example 2** ``` d = DOE( MSA Design, {Add Response( None, "Y", ., ., . ), Add Factor( Categorical, {"L1", "L2"}, "X1", MSA( 4, 1 ) ), Add Factor( Categorical, {"L1", "L2"}, "X2", MSA( 4, 1 ) ), Add Factor( Categorical, {"L1", "L2"}, "X3", MSA( 4, 1 ) ), Set Random Seed( 3983347 ), Replicates( 2, 0 ), Simulate Responses( 0 )} ); ``` ### [Report](#report) **Syntax:** obj \<< Report **Description:** Returns a reference to the report object. ``` d = DOE( Custom Design ); r = d << report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Save Constraints](#save-constraints) **Syntax:** obj \<< Save Constraints **Description:** Save the factor constraints of the current experiment to a JMP table for use in another experiment ``` DOE( Custom Design, Add Response( Maximize, "Y", ., ., . ), Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Add Constraint( [1 1 0 1, 1 0 1 1] ), Add Term( {1, 0} ), Save Constraints ); ``` ### [Save Factors](#save-factors) **Syntax:** obj \<< Save Factors **Description:** Save the factors you just created to a JMP table so you can use these factors for another experiment. ``` DOE( Custom Design, Add Response( Match Target, "Stretch", 350, 550, 1 ), Add Factor( Continuous, 0.7, 1.7, "Silica", 0 ), Add Factor( Continuous, 1.8, 2.8, "Sulfur", 0 ), Add Factor( Continuous, 40, 60, "Silane", 0 ), Save Factors ); ``` ### [Save Responses](#save-responses) **Syntax:** obj \<< Save Responses **Description:** Saves the responses that you created as a JMP data table. You can load these responses in other experiments. ``` DOE( Custom Design, Add Response( Match Target, "Stretch", 350, 550, 1 ), Add Factor( Continuous, 0.7, 1.7, "Silica", 0 ), Add Factor( Continuous, 1.8, 2.8, "Sulfur", 0 ), Add Factor( Continuous, 40, 60, "Silane", 0 ), Save Responses ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** obj \<< Save Script to Data Table **Description:** Create a Script that will reproduce this design. ### [Save Script to Script Window](#save-script-to-script-window) **Syntax:** obj \<< Save Script to Script Window **Description:** Create a Script that will reproduce this design. ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Make Design, Save Script to Script Window ); ``` ### [Save X Matrix](#save-x-matrix) **Syntax:** obj \<< Save X Matrix( state=0|1 ) **Description:** Saves the design matrix (also called the X matrix) as a table property in the JMP data table that contains the design. ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Save X Matrix, Make Design, Make Table ); ``` ### [Screening Type](#screening-type) **Syntax:** obj \<< Screening Type **Description:** Specifies a main effects screening design, which is orthogonal or near orthogonal. ``` d = DOE( Screening Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ) ); d << Screening Type( 1 ); d << Set Sample Size( 12 ); d << Make Design; ``` ### [Select Covariate Rows](#select-covariate-rows) **Syntax:** obj \<< Select Covariate Rows **Description:** Specifies the rows from the covariate table to be selected in DOE. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); DOE( Custom Design, Add Response( Maximize, "Y", ., ., . ), Add Factor( Covariate, :sex, 0 ), Add Factor( Covariate, :height, 0 ), Add Factor( Covariate, :weight, 0 ), Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ), Enforce Use of Selected Covariate Rows( 1 ), Allow covariate rows to be repeated( 1 ), Select Covariate Rows( [1 2 3 4] ), Set Sample Size( 24 ) ); ``` ### [Set ALT Probability of Interest](#set-alt-probability-of-interest) **Syntax:** obj \<< Set ALT Probability of Interest **Description:** Sets the probability of interest for an accelerated life test plan. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [Set ALT Time Range](#set-alt-time-range) **Syntax:** obj \<< Set ALT Time Range **Description:** Sets the time range of interest for an accelerated life test plan. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Failure Probability Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [Set Average Cluster Size](#set-average-cluster-size) **Syntax:** obj \<< Set Average Cluster Size **Description:** Controls number of random points for clustering a Fast Flexible Filling Design. ``` DOE( Space Filling Design, Change Factor Settings( 1, -1, 1, "X1" ), Change Factor Settings( 2, -1, 1, "X2" ), Set Average Cluster Size( 100 ), Space Filling Design Type( Fast Flexible Filling, 50 ) ); ``` ### [Set Axial Choice](#set-axial-choice) **Syntax:** obj \<< Set Axial Choice( 1|2|3|4 ) **Description:** Specifies the axial value settings. Use 1 for Rotatable, 2 for Orthogonal, 3 for On Face, and 4 User Specified. ``` d = DOE( Response Surface Design, Make Design( 2 ) ); d << Set Axial Choice( 2 ); ``` ### [Set Axial Value](#set-axial-value) **Syntax:** obj \<< Set Axial Value **Description:** Specifies the User Specified axial value. ``` d = DOE( Response Surface Design, Make Design( 2 ) ); d << Set Axial Value( 2 ); ``` ### [Set Candidate Runs](#set-candidate-runs) **Syntax:** obj \<< Set Candidate Runs **Description:** Sets the candidate runs for an accelerated life test plan. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Monitoring at Intervals", {5, 200, 200} ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Inspection Times( [200 400 600 800 1000] ), Set Number of Units( 150 ), Set Candidate Runs( [90 0 150, 100 0 150, 110 0 150] )} ); ``` ### [Set Delta For Power](#set-delta-for-power) **Syntax:** obj \<< Set Delta For Power **Description:** Specifies the values of the anticipated coefficients in Power Analysis. Anticipated coefficients will be one half of the specified value. ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Set Delta For Power( 3 ), Make Design ); ``` ### [Set Expected Number of Respondents](#set-expected-number-of-respondents) **Syntax:** obj \<< Set Expected Number of Respondents **Description:** Sets the expected number of respondents per survey. ``` DOE( Choice Design, {Add Factor( Categorical, {"L1", "L2"}, "X1", 0 ), Add Factor( Categorical, {"L1", "L2"}, "X2", 0 ), Set Random Seed( 1245253625 ), Add Term( {1, 1} ), Add Term( {2, 1} ), Set Prior Mean Choice( [0 0] ), Set Prior Variance Matrix( [1 0, 0 1] ), Set Number of Attributes( 2 ), Set Number of Profiles( 2 ), Set Number of Choice Sets( 8 ), Set Number of Surveys( 1 ), Set Expected Number of Respondents( 1 )} ); ``` ### [Set Generators](#set-generators) **Syntax:** obj \<< Set Generators **Description:** Specifies the generators to be used in a screening design. ``` DOE( Screening Design, {Add Factor, Add Factor, Add Factor, Make Design( 1 ), Set Generators( [1, 1, 0] )} ); ``` ### [Set Inspection Times](#set-inspection-times) **Syntax:** obj \<< Set Inspection Times **Description:** Sets the inspection times for an accelerated life test plan. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Monitoring at Intervals", {5, 200, 200} ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Inspection Times( [200 400 600 800 1000] ), Set Number of Units( 150 ), Set Candidate Runs( [90 0 150, 100 0 150, 110 0 150] )} ); ``` ### [Set Length of Test](#set-length-of-test) **Syntax:** obj \<< Set Length of Test **Description:** Sets the length of test for an accelerated life test plan. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [Set Level Values](#set-level-values) **Syntax:** obj \<< Set Level Values **Description:** Sets the level values for the accelerating factor(s) in an accelerated life test plan. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Monitoring at Intervals", {5, 200, 200} ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Inspection Times( [200 400 600 800 1000] ), Set Number of Units( 150 ), Set Candidate Runs( [90 0 150, 100 0 150, 110 0 150] )} ); ``` ### [Set Monitoring Choice](#set-monitoring-choice) **Syntax:** obj \<< Set Monitoring Choice **Description:** Specifies the type of monitoring for an accelerated life test plan. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [Set N Subplots](#set-n-subplots) **Syntax:** obj \<< Set N Subplots **Description:** Specifies the number of subplots when there are both hard-to-change and very hard-to-change factors. ``` d = DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 2 ), Add Factor( Continuous, -1, 1, "X2", 1 ), Add Factor( Continuous, -1, 1, "X3", 0 ) ); d << Set N Whole Plots( 4 ); d << Set N Subplots( 8 ); ``` ### [Set N Whole Plots](#set-n-whole-plots) **Syntax:** obj \<< Set N Whole Plots **Description:** Specifies the number of whole plots when there are hard-to-change or very hard-to-change factors. ``` d = DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 1 ), Add Factor( Continuous, -1, 1, "X2", 0 ) ); d << Set N Whole Plots( 6 ); ``` ### [Set Number of Attributes](#set-number-of-attributes) **Syntax:** obj \<< Set Number of Attributes **Description:** Sets the number of attributes that can change within a choice set. ``` DOE( Choice Design, {Add Factor( Categorical, {"L1", "L2"}, "X1", 0 ), Add Factor( Categorical, {"L1", "L2"}, "X2", 0 ), Set Random Seed( 1245253625 ), Add Term( {1, 1} ), Add Term( {2, 1} ), Set Prior Mean Choice( [0 0] ), Set Prior Variance Matrix( [1 0, 0 1] ), Set Number of Attributes( 2 ), Set Number of Profiles( 2 ), Set Number of Choice Sets( 8 ), Set Number of Surveys( 1 ), Set Expected Number of Respondents( 1 )} ); ``` ### [Set Number of Choice Sets](#set-number-of-choice-sets) **Syntax:** obj \<< Set Number of Choice Sets **Description:** Sets the number of choice sets per survey. ``` DOE( Choice Design, {Add Factor( Categorical, {"L1", "L2"}, "X1", 0 ), Add Factor( Categorical, {"L1", "L2"}, "X2", 0 ), Set Random Seed( 1245253625 ), Add Term( {1, 1} ), Add Term( {2, 1} ), Set Prior Mean Choice( [0 0] ), Set Prior Variance Matrix( [1 0, 0 1] ), Set Number of Attributes( 2 ), Set Number of Profiles( 2 ), Set Number of Choice Sets( 8 ), Set Number of Surveys( 1 ), Set Expected Number of Respondents( 1 )} ); ``` ### [Set Number of FDS points](#set-number-of-fds-points) **Syntax:** obj \<< Set Number of FDS points **Description:** Sets the number of points used to generate the Fraction of Design Space Plot. **JMP Version Added:** 14 ``` DOE( Custom Design, {Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Set Sample Size( 7 ), Design Search Time( 8 ), Set Number of FDS points( 20000 ), Make Design} ); ``` ### [Set Number of Profiles](#set-number-of-profiles) **Syntax:** obj \<< Set Number of Profiles **Description:** Sets the number of profiles per choice set. ``` DOE( Choice Design, {Add Factor( Categorical, {"L1", "L2"}, "X1", 0 ), Add Factor( Categorical, {"L1", "L2"}, "X2", 0 ), Set Random Seed( 1245253625 ), Add Term( {1, 1} ), Add Term( {2, 1} ), Set Prior Mean Choice( [0 0] ), Set Prior Variance Matrix( [1 0, 0 1] ), Set Number of Attributes( 2 ), Set Number of Profiles( 2 ), Set Number of Choice Sets( 8 ), Set Number of Surveys( 1 ), Set Expected Number of Respondents( 1 )} ); ``` ### [Set Number of Surveys](#set-number-of-surveys) **Syntax:** obj \<< Set Number of Surveys **Description:** Sets the number of surveys for a choice design. ``` DOE( Choice Design, {Add Factor( Categorical, {"L1", "L2"}, "X1", 0 ), Add Factor( Categorical, {"L1", "L2"}, "X2", 0 ), Set Random Seed( 1245253625 ), Add Term( {1, 1} ), Add Term( {2, 1} ), Set Prior Mean Choice( [0 0] ), Set Prior Variance Matrix( [1 0, 0 1] ), Set Number of Attributes( 2 ), Set Number of Profiles( 2 ), Set Number of Choice Sets( 8 ), Set Number of Surveys( 1 ), Set Expected Number of Respondents( 1 )} ); ``` ### [Set Number of Units](#set-number-of-units) **Syntax:** obj \<< Set Number of Units **Description:** Sets the number of units under test for an accelerated life test plan. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [Set Prior Correlation ALT](#set-prior-correlation-alt) **Syntax:** obj \<< Set Prior Correlation ALT **Description:** Sets the prior correlations for an accelerated life test plan. **JMP Version Added:** 16 ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [Set Prior Mean ALT](#set-prior-mean-alt) **Syntax:** obj \<< Set Prior Mean ALT **Description:** Sets the prior mean for an accelerated life test plan. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [Set Prior Mean Choice](#set-prior-mean-choice) **Syntax:** obj \<< Set Prior Mean Choice **Description:** Sets the Prior Mean for a choice design. ``` DOE( Choice Design, {Add Factor( Categorical, {"L1", "L2"}, "X1", 0 ), Add Factor( Categorical, {"L1", "L2"}, "X2", 0 ), Set Random Seed( 1245253625 ), Add Term( {1, 1} ), Add Term( {2, 1} ), Set Prior Mean Choice( [0 0] ), Set Prior Variance Matrix( [1 0, 0 1] ), Set Number of Attributes( 2 ), Set Number of Profiles( 2 ), Set Number of Choice Sets( 8 ), Set Number of Surveys( 1 ), Set Expected Number of Respondents( 1 )} ); ``` ### [Set Prior Quantile ALT](#set-prior-quantile-alt) **Syntax:** obj \<< Set Prior Quantile ALT **Description:** Sets the information for specifying the prior intercept based on a quantile. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Prior Specification Choice( 2 ), Set Prior Quantile ALT( {[1.5 2], 0.065, 2642, 45} ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [Set Prior Std Error ALT](#set-prior-std-error-alt) **Syntax:** obj \<< Set Prior Std Error ALT **Description:** Sets the prior standard error for an accelerated life test plan. **JMP Version Added:** 16 ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [Set Prior Variance ALT](#set-prior-variance-alt) **Syntax:** obj \<< Set Prior Variance ALT **Description:** Sets the prior variance for an accelerated life test plan. ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( "Continuous Monitoring" ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Variance ALT( [0.1 0 0, 0 0.1 0, 0 0 0.1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Number of Units( 150 )} ); ``` ### [Set Prior Variance Matrix](#set-prior-variance-matrix) **Syntax:** obj \<< Set Prior Variance Matrix **Description:** Sets the Prior Variance Matrix for a choice design. ``` DOE( Choice Design, {Add Factor( Categorical, {"L1", "L2"}, "X1", 0 ), Add Factor( Categorical, {"L1", "L2"}, "X2", 0 ), Set Random Seed( 1245253625 ), Add Term( {1, 1} ), Add Term( {2, 1} ), Set Prior Mean Choice( [0 0] ), Set Prior Variance Matrix( [1 0, 0 1] ), Set Number of Attributes( 2 ), Set Number of Profiles( 2 ), Set Number of Choice Sets( 8 ), Set Number of Surveys( 1 ), Set Expected Number of Respondents( 1 )} ); ``` ### [Set RMSE](#set-rmse) **Syntax:** obj \<< Set RMSE **Description:** Specifies the anticipated root mean square error (RMSE) in Power Analysis. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Evaluate Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Set RMSE( 1.5 ); ``` ### [Set Random Seed](#set-random-seed) **Syntax:** obj \<< Set Random Seed **Description:** Useful for teaching. Setting the random seed to a specific value assures that all class members get the same design. ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Set Random Seed( 34067086 ), Make Design ); ``` ### [Set Run Order](#set-run-order) **Syntax:** obj \<< Set Run Order **Description:** Specifies how the run order should be set when making a data table from a design. ``` d = DOE( Custom Design, Add factor, Add factor, Add factor ); d << Make Design; d << Set Run Order( Sort Left to Right ); d << Make Table; ``` ### [Set Runs Per Random Block](#set-runs-per-random-block) **Syntax:** obj \<< Set Runs Per Random Block **Description:** Specifies the size of random blocks in the design. ``` d = DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Make Model( Linear ) ); d << Set Runs Per Random Block( 4 ); ``` ### [Set Sample Size](#set-sample-size) **Syntax:** obj \<< Set Sample Size **Description:** Specifies the sample size before the design is created. If the specified number is less than the minimum value shown in the designer, the sample size is set to the minimum value. ``` d = DOE( Custom Design, Add factor, Add factor, Add factor ); d << Make Model( Linear ); d << Set Sample Size( 12 ); ``` ### [Set Significance Level](#set-significance-level) **Syntax:** obj \<< Set Significance Level **Description:** Change the significance level in Power Analysis. ``` dt = Open( "$SAMPLE_DATA/Design Experiment/Bounce Data.jmp" ); d = DOE( Evaluate Design, X( :Silica, :Sulfur, :Silane ), Y( :Stretch ) ); d << Set Significance Level( 0.10 ); ``` ### [Set Strength](#set-strength) **Syntax:** obj \<< Set Strength **Description:** Sets the strength for Covering Arrays ``` d = DOE( Covering Array, Add factor( Categorical ), Add factor( Categorical ), Add factor( Categorical ) ); d << Set Strength( 3 ); d << Make Table; ``` ### [Show Blocking Options](#show-blocking-options) **Syntax:** obj \<< Show Blocking Options **Description:** Specifies the blocking choice and number of blocks for a definitive screening design. Specifying a value of 0 indicates no blocks. **Example 1** ``` DOE( Definitive Screening Design, Add Factor, Add Factor, Add Factor, Add Factor, Add Factor, Add Factor, Show Blocking Options( 0, 0 ), Number of Extra Runs( 4 ) ); ``` **Example 2** ``` DOE( Definitive Screening Design, Add Factor, Add Factor, Add Factor, Add Factor, Add Factor, Add Factor, Show Blocking Options( 1, 2 ), Number of Extra Runs( 4 ) ); ``` ### [Simulate Responses](#simulate-responses) **Syntax:** obj \<< Simulate Responses( state=0|1 ) **Description:** Add data for the responses to the JMP design table. For use in teaching DOE. ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Make Design, Simulate Responses, Make Table ); ``` ### [Solve for Power](#solve-for-power) **Syntax:** obj \<< Solve for Power **Description:** Sets the anticipated coefficients in Power Analysis so that the power is near the specified value. **JMP Version Added:** 16 ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Make Design, Solve for Power( 0.8 ) ); ``` ### [Space Filling Design Type](#space-filling-design-type) **Syntax:** obj \<< Space Filling Design Type( Sphere Packing|Latin Hypercube|Uniform|Minimum Potential|Maximum Entropy|IMSE Optimal|Fast Flexible Filling ) **Description:** Specifies the type of space filling design and the number of runs. **Example 1** ``` d = DOE( Space Filling Design ); d << Space Filling Design Type( Sphere Packing, 30 ); ``` **Example 2** ``` d = DOE( Space Filling Design ); d << Space Filling Design Type( Latin Hypercube, 100 ); ``` **Example 3** ``` d = DOE( Space Filling Design ); d << Space Filling Design Type( Uniform, 20 ); ``` **Example 4** ``` d = DOE( Space Filling Design ); d << Space Filling Design Type( Fast Flexible Filling, 100 ); ``` **Example 5** ``` d = DOE( Space Filling Design, Space Filling Design Type( IMSE Optimal, 20 ) ); d << Theta( [2, 3] ); d << Make Design; ``` ### [Sphere Radius](#sphere-radius) **Syntax:** obj \<< Sphere Radius **Description:** Specifies a spherical design region and enables you to set the radius of the region. ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Sphere Radius( 1 ), Make Design ); ``` ### [Split Plot Variance Ratio](#split-plot-variance-ratio) **Syntax:** obj \<< Split Plot Variance Ratio( Whole Plot Ratio | [Whole Plot Ratio, Subplot Ratio] ) **Description:** For hard-to-change factors, specify the ratio of the whole-plot error variance to the run-to-run error. For hard-to-change and very hard-to-change factors, specify the ratio of the whole plot and subplot error to the run-to-run error. **Example 1** ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 1 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Set N Whole Plots( 4 ), Split Plot Variance Ratio( 2 ), Make Design ); ``` **Example 2** ``` d = DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 2 ), Add Factor( Continuous, -1, 1, "X2", 1 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Set N Whole Plots( 4 ) ); d << Split Plot Variance Ratio( [3, 2] ); d << Make Design; ``` ### [Suppress Cotter Designs](#suppress-cotter-designs) **Syntax:** obj \<< Suppress Cotter Designs( state=0|1 ) **Description:** Shows or hides Cotter designs in the list of screening designs. This option is selected by default, which means that Cotters designs are initially not in the screening design list. On by default. ``` DOE( Screening Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Factor( Continuous, -1, 1, "X3", 0 ), Suppress Cotter Designs, Make Design( 5 ) ); ``` ### [Table of Correlations](#table-of-correlations) **Syntax:** obj \<< Table of Correlations **Description:** Create a data table with the Table of Correlations from Design Diagnostics. **JMP Version Added:** 15 ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Make Design, Table of Correlations ); ``` ### [Theta](#theta) **Syntax:** obj \<< Theta **Description:** Specifies the Covariance Parameter Vector for Space Filling designs. ``` d = DOE( Space Filling Design, Space Filling Design Type( IMSE Optimal, 20 ) ); d << Theta( [2, 3] ); ``` ### [Treatments](#treatments) **Syntax:** obj \<< Treatments **Description:** Specifies the number of treatments for a balanced incomplete block design (BIBD). **JMP Version Added:** 14 ``` d = DOE( Balanced Incomplete Block Design ); d << Treatments( 3, {"L1", "L2", "L3"} ); d << Make Design; ``` ### [Use Bayesian information](#use-bayesian-information) **Syntax:** obj \<< Use Bayesian information( state=0|1 ) **Description:** Uses prior information in the Bayesian setting for the design diagnostics. **JMP Version Added:** 15 ``` DOE( Custom Design, Add Factor( Continuous, -1, 1, "X1", 0 ), Add Factor( Continuous, -1, 1, "X2", 0 ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Potential Term( {1, 1}, {2, 1} ), Number of Starts( 10 ), Make Design, Use Bayesian Information( 1 ) ); ``` ### [Use Blue to Red color theme for color map](#use-blue-to-red-color-theme-for-color-map) **Syntax:** obj \<< Use Blue to Red color theme for color map( state=0|1 ) **Description:** Uses blue to red color theme for color map on correlations. **JMP Version Added:** 15 ### [Use Prior Uncertainty](#use-prior-uncertainty) **Syntax:** obj \<< Use Prior Uncertainty( state=0|1 ) **Description:** Specifies if the prior uncertainty should be used to construct the optimal design. **JMP Version Added:** 16 ``` DOE( Accelerated Life Test Plan, {ALT Plan Setup( 1 ), Set Monitoring Choice( 2, {5, 200, 200} ), ALT Optimality Criterion( "Make Quantile Estimate Optimal" ), ALT Factor Settings( 1, {"X1", 3, 1, 20, 30, 90, 110} ), Set Level Values( 1, [90 100 110] ), Distribution Choice( LogNormal ), Set Prior Mean ALT( [-40 1.5 2] ), Set Prior Std Error ALT( [10, 0.2, 0.5] ), Set Prior Correlation ALT( [1 -0.99 0, -0.99 1 0, 0 0 1] ), Use Prior Uncertainty( 1 ), Set ALT Time Range( 10000, 20000 ), Set ALT Probability of Interest( 0.1 ), Set Length of Test( 1000 ), Set Inspection Times( [200 400 600 800 1000] ), Set Number of Units( 150 ), Set Candidate Runs( [90 0 150, 100 0 150, 110 0 150] )} ); ``` ### [Utility Neutral Design](#utility-neutral-design) **Syntax:** obj \<< Utility Neutral Design( state=0|1 ) **Description:** Specifies if Utility Neutral Choice Design should be created. ``` DOE( Choice Design, {Add Factor( Categorical, {"L1", "L2"}, "X1", 0 ), Add Factor( Categorical, {"L1", "L2"}, "X2", 0 ), Set Random Seed( 1245253625 ), Add Term( {1, 1} ), Add Term( {2, 1} ), Set Prior Mean Choice( [0 0] ), Set Prior Variance Matrix( [1 0, 0 1] ), Set Number of Attributes( 2 ), Set Number of Profiles( 2 ), Set Number of Choice Sets( 8 ), Set Number of Surveys( 1 ), Set Expected Number of Respondents( 1 ), Utility Neutral Design( 1 )} ); ``` # [Data Connector Metadata](#data-connector-metadata) ## [Item Messages](#item-messages) ### [Get Description](#get-description) **Syntax:** metadata \<< Get Description() **Description:** Gets the data connector description **JMP Version Added:** 18 ``` description = metadata << Get Description(); ``` ### [Get Driver](#get-driver) **Syntax:** metadata \<< Get Driver() **Description:** Gets data connector driver, if there is one. **JMP Version Added:** 18 ``` type = metadata << Get Driver(); ``` ### [Get Name](#get-name) **Syntax:** metadata \<< Get Name() **Description:** Gets the data connector name **JMP Version Added:** 18 ``` name = metadata << Get Name(); ``` ### [Get Path](#get-path) **Syntax:** metadaata \<< Get Path() **Description:** Gets data connector path **JMP Version Added:** 18 ``` path = metadata << Get Path(); ``` ### [Get Type](#get-type) **Syntax:** metadata \<< Get Type() **Description:** Gets the data connector type **JMP Version Added:** 18 ``` type = metadata << Get Type(); ``` ### [Set Description](#set-description) **Syntax:** metadata \<< Set Description(description) **Description:** Sets the data connector description **JMP Version Added:** 18 ``` metadata << Set Description( "My frequently used SQL Server connection." ); ``` ### [Set Name](#set-name) **Syntax:** metadata \<< Set Name( name ) **Description:** Sets the data connector name **JMP Version Added:** 18 ``` metadata << Set Name( "A new Name" ); ``` # [Data Connector Registry](#data-connector-registry) ## [Item Messages](#item-messages) ### [Get](#get) **Syntax:** Data Connector Registry() \<< Get ( name ) **Description:** Retrieves a data connector from the registry **JMP Version Added:** 18 ``` dc = Data Connector Registry() << Get( "com.jmp.sql_server" ); ``` ### [Get Available](#get-available) **Syntax:** Data Connector Registry() \<< Get Available() **Description:** Retrieves a list of available data connectors in the registry **JMP Version Added:** 18 ``` list = Data Connector Registry() << Get Available(); ``` ### [Get Metadata](#get-metadata) **Syntax:** Data Connector Registry() \<< Get Metadata ( name ) **Description:** Gets data connector metadata from the registry **JMP Version Added:** 18 ``` metadata = Data Connector Registry() << Get Metadata( "com.jmp.sql_server" ); ``` ### [Register](#register) **Syntax:** Data Connector Registry() \<< Register( Path(path), \, \ ) **Description:** Adds a data connector to the registry **JMP Version Added:** 18 ``` Data Connector Registry() << Register( Path( "$DOCUMENTS/my connector.jmpdc" ), Name( "My Data Connector" ) ); ``` ### [Unregister](#unregister) **Syntax:** Data Connector Registry() \<< Unregister ( name ) **Description:** Removes a data connector from the registry **JMP Version Added:** 18 ``` dc = Data Connector Registry() << Unregister( "My Data Connector" ); ``` # [Data Connector](#data-connector) ## [Item Messages](#item-messages) ### [Dump](#dump) **Syntax:** res = obj \<< Dump() **Description:** Get the contents of this data connector as a specification string that specifies the type and any non-default values. ``` New Data Connector( Type( "ODBC" ), Block Fetch( "ON" ), // Default value; won't be included Supports Schemas( "ON" ), // Non-default value; will be included ) << Dump(); ``` ### [Get](#get) **Syntax:** res = obj \<< Get( OPTION ) **Description:** Get the value of an option. ``` dc = New Data Connector( Type( "ODBC" ) ); // Get dc's value for the Supports Schemas option, namely the default value dc << Get( Supports Schemas ); ``` ### [Open](#open) **Syntax:** res = obj \<< Open() **Description:** Open a new data table as specified by this data connector. ``` New Data Connector( ID( "com.example.odbc_example" ), // Some ODBC-type base configuration Table( "my_table" ) // The table to open ) << Open(); ``` ### [Open Backing Data](#open-backing-data) **Syntax:** obj \<< Open Backing Data( < Schema( "schema" ) >, Table( "table" ), < Args( ... ) > ) **Description:** Connect and open the file or other data that backs the named table. ``` New Data Connector( // Available with https://marketplace.jmp.com/appdetails/Python+Data+Connector+Demo ID( "jmp_py_data_connector_demo.folder" ), Folder( Get Path Variable( "SAMPLE_IMPORT_DATA" ) ), Limit To Extension( ".xlsx" ) ) << Open Backing Data( Table( "Bigclass" ), Args( Worksheets( "Bigclass" ), Use for all sheets( 1 ), Concatenate Worksheets( 0 ), Create Concatenation Column( 0 ), Worksheet Settings( 1, Has Column Headers( 1 ), Number of Rows in Headers( 1 ), Headers Start on Row( 1 ), Data Starts on Row( 2 ), Data Starts on Column( 1 ), Data Ends on Row( 0 ), Data Ends on Column( 0 ), Replicated Spanned Rows( 1 ), Replicated Spanned Headers( 0 ), Suppress Hidden Rows( 1 ), Suppress Hidden Columns( 1 ), Suppress Empty Columns( 0 ), Treat as Hierarchy( 0 ), Multiple Series Stack( 0 ), Import Cell Colors( 0 ), Limit Column Detect( 0 ), Column Separator String( "-" ) ) ) ); ``` ### [Save](#save) **Syntax:** obj \<< Save( file path ) **Description:** Save the contents of this data connector to a file. The file contents are the same as the result of \<< Dump(). ``` New Data Connector( Type( "ODBC" ), Block Fetch( "ON" ), // Default value; won't be included Supports Schemas( "ON" ), // Non-default value; will be included ) << Save( "$DOCUMENTS/data connector save example.jmpdc" ); ``` ### [Set](#set) **Syntax:** obj \<< Set( < Option1( value1 ) >, ..., < OptionN( valueN ) > ) **Description:** Set the value of any number of options. ``` dc = New Data Connector( Type( "ODBC" ) ); Show( dc << Get( Block Fetch ), dc << Get( Supports Schemas ) ); dc << Set( Block Fetch( "ON" ), Supports Schemas( "ON" ) ); Show( dc << Get( Block Fetch ), dc << Get( Supports Schemas ) ); ``` ### [Type](#type) **Syntax:** res = obj \<< Type() **Description:** Get the type of the data connector. ``` New Data Connector( Type( "ODBC" ) ) << Type(); ``` # [Data Filter](#data-filter) ## [Associated Constructors](#associated-constructors) ### [Data Filter](#data-filter_1) **Syntax:** Data Filter( , , , , \, \ ) **Description:** Creates or shows a Data Filter, where you interactively select complex subsets of data. The Mode option determines which row states are affected by selection in the filter. The Add Filter command will add a filter group with the given Columns and Where clauses. When multiple filter groups are present, the combined behavior is determined by the Group By AND option. If the Local keyword is given, the filter can be embedded in a report to filter one or more platforms without affecting other reports. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); ``` ## [Columns](#columns) ### [Add Filter Columns](#add-filter-columns) **Syntax:** obj \<< Add Filter Columns( Add Filter Columns( column ) ) **Description:** Add one or more filter columns. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Add Filter Columns( :State ); ``` ### [Filter Column](#filter-column) **Syntax:** obj \<< Filter Column( column(s) ) **Description:** Add a filter column. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); obj << Filter Column( :State ); ``` ### [Filter Columns](#filter-columns) **Syntax:** obj \<< Filter Columns( column(s) ) **Description:** Add one or more filter columns. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Filter Columns( :State, :OZONE ); ``` ### [Filter Group](#filter-group) **Syntax:** obj \<< Filter Group( column(s) ) ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); ``` ## [Item Messages](#item-messages) ### [Add Favorites](#add-favorites) **Syntax:** obj \<< Add Favorites( name or string ) **Description:** Associate the current filter selection with the given name and save into the favorites list **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); df = dt << Data Filter( Add Filter( columns( :age, :sex, :height, :weight ), Where( :sex == "F" ), Where( :height >= 55 & :height <= 65 ) ), Mode( Select ) ); Wait( 1 ); fav1 = df << add favorites( "FemaleAverageHt" ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); df = dt << Data Filter( Add Filter( columns( :age, :sex, :height, :weight ), Where( :sex == "F" ) ), Mode( Select ) ); Wait( 1 ); fav1 = df << add favorites(); Show( fav1 ); ``` ### [Add Filter](#add-filter) **Syntax:** obj \<< Add Filter( columns( column, ... ), \ ) **Description:** Add one or more filter columns in a new OR group. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter(); obj << Add Filter( columns( :POP ) ); obj << Add Filter( columns( :Region, :State, :City ), Where( :Region == "S" ), Where( :State == {"SC", "NC"} ) ); ``` ### [Animation](#animation) **Syntax:** obj \<< Animation( \, \, \ ) **Description:** Cycles through the sorted values of specified column selecting and deselecting rows. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Columns( :Region ); obj << Animation( Animate Column( :Region ), Bounce ); //Now press the play button. ``` ### [Apply Favorites](#apply-favorites) **Syntax:** obj \<< Apply Favorites( name or string ) **Description:** Apply the filter selection as saved in the named favorites to the data filter. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); df = dt << Data Filter( Add Filter( columns( :age, :sex, :height, :weight ), Where( :sex == "F" ), Where( :height >= 55 & :height <= 65 ) ), Mode( Select ) ); a = "FemaleAverageHt"; b = "Female"; df << add favorites( a ); df << Match( Where( :sex == "F" ) ); df << add favorites( b ); Wait( 1 ); df << apply favorites( "FemaleAverageHt" ); ``` ### [Auto clear](#auto-clear) **Syntax:** obj \<< Auto clear( state=0|1 ) **Description:** Clears all currently selected rows prior to setting a new selection when filtering. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Data Filter; obj << Auto Clear( 1 ); obj << Add Filter( columns( :age, :sex ), Where( :age == {13, 14} ) ); Wait( 1 ); obj << (filter column( :sex ) << Where( :sex == "M" )); ``` ### [Clear](#clear) **Syntax:** obj \<< Clear **Description:** Clears the currently selected rows. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter; obj << Add Filter( Columns( :Region ), Where( :Region == "N" ) ); Wait( 1 ); obj << Clear; ``` ### [Clear Selection](#clear-selection) **Syntax:** obj \<< Clear Selection **Description:** Clear the selection for this column filter. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add( Filter Columns( :Region ), Where( :Region = {"N", "S"} ) ) ); Wait( 1 ); obj << (Filter Column( :Region ) << Clear Selection); ``` ### [Close](#close) **Syntax:** obj \<< Close **Description:** Closes the data filter. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); obj << Close; ``` ### [Conditional](#conditional) **Syntax:** obj \<< Conditional( state=0|1 ) **Description:** The option flags whether the categorical columns filters are conditionally ordered. Selecting a category will limit the categories of the next column filter only to those that are in the selected category. ``` dt = Open( "$SAMPLE_DATA/SATByYear.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :State ) ) ); obj << (Filter Column( :Region ) << Where( :Region == {"South"} )); Wait( 1 ); obj << conditional( 1 ); ``` ### [Copy Local Data Filter](#copy-local-data-filter) **Syntax:** obj \<< Copy Local Data Filter **Description:** Copy the script for the local data filter to the clipboard. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "MW" ) ) ); filter << Copy Local Data Filter; dist2 = Distribution( Continuous Distribution( Column( :Lead ) ) ); Wait( 1 ); dist2 << Paste Local Data Filter; ``` ### [Copy Script](#copy-script) **Syntax:** obj \<< Copy Script **Description:** Create a JSL script to produce the filter window and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Copy Script; ``` ### [Count Excluded Rows](#count-excluded-rows) **Syntax:** obj \<< Count Excluded Rows( state=0|1 ) **Description:** If the option is cleared, the column values and counts in the data filter will not include rows with excluded row states in the data table. **JMP Version Added:** 14 **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Data Filter( Mode( Select( 0 ), Show( 1 ), Include( 1 ) ), Add Filter( columns( :sex ), Where( :sex == "F" ) ) ); Distribution( Automatic Recalc( 1 ), Continuous Distribution( Column( :weight ) ), Local Data Filter( Count Excluded Rows( 0 ), Add Filter( columns( :age ), Where( :age == 12 ) ) ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Data Filter( Mode( Select( 0 ), Show( 1 ), Include( 1 ) ), Add Filter( columns( :sex ), Where( :sex == "F" ) ) ); New Window( "Hierarchical Data Filter", V List Box( Data Filter Context Box( H List Box( Filter Ref Sub 1 = dt << Data Filter( Local, Add Filter( columns( :age ), Where( :age == 12 ) ) ), Platform( Current Data Table(), Distribution( Column( :weight ) ) ) ) ), Data Filter Context Box( H List Box( Filter Ref Sub 2 = dt << Data Filter( Local, Count Excluded Rows( 0 ), Add Filter( columns( :age ), Where( :age == 12 ) ) ), Platform( Current Data Table(), Distribution( Column( :weight ) ) ) ) ) ) ); ``` ### [Data Table Window](#data-table-window) **Syntax:** obj \<< Data Table Window **Description:** Show the data table used for this filter dialog. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Data Table Window; ``` ### [Delete](#delete) **Syntax:** obj \<< Delete( {column(s)} ) **Description:** Deletes the specified columns with existing filters in the data filter. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Columns( :Region, :SO2, :CO, :State ); Wait( 1 ); obj << Delete( {:State} ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Columns( :Region, :SO2, :CO, :State ); Wait( 1 ); obj << (Filter Column( :State ) << delete); ``` ### [Delete All](#delete-all) **Syntax:** obj \<< Delete All **Description:** Deletes all existing filters in the data filter. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Columns( :Region, :SO2, :CO, :State ); Wait( 2 ); obj << Delete All; ``` ### [Display](#display) **Syntax:** obj \<< Display( column, \, ) **Description:** Changes the way the column levels are displayed in the filter. Categorical columns support a display type option of "Blocks Display", "List Display", "Single Category Display", "Check Box Display", or "Radio Box Display". Option NItems(n) will set the number of visible items in a scrollable view. Continuous columns support options of NBins(n) and Height(h). ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); obj << Display( :Region, N Items( 4 ) ); ``` ### [Extend Where](#extend-where) **Syntax:** obj \<< Extend Where **Description:** Extend the selection based on the given criterion for this column filter. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add( Filter Columns( :Region ), Where( :Region = {"N", "S"} ) ) ); Wait( 1 ); obj << (Filter Column( :Region ) << Extend Where( :Region = "W" )); ``` ### [Get Data Table](#get-data-table) **Syntax:** obj \<< Get Data Table **Description:** Returns the data table associated with the filter. **JMP Version Added:** 17 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionfilter = obj << Get Data Table(); ``` ### [Get Filter Column](#get-filter-column) **Syntax:** obj \<< Get Filter Column( column, ) **Description:** Returns the filter column object for the named column. If the same column is used multiple times, the index argument will return the specified occurrence **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionfilter = obj << Get Filter Column( :Region ); regionfilter << Invert Selection; ``` ### [Get Filtered Rows](#get-filtered-rows) **Syntax:** obj \<< Get Filtered Rows **Description:** Returns a matrix of row numbers that satisfy the current filter conditions. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Get Filtered Rows; ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script **Description:** Get the data filter script as text. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); txt = obj << Get Script; Show( txt ); ``` ### [Get where clause](#get-where-clause) **Syntax:** obj \<< Get where clause **Description:** Get the descriptive text for the filter selection. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add( Filter Columns( :Region, :Lead ) ) ); Wait( 1 ); obj << (Filter Column( :Lead ) << Where( :Lead >= .4 & :Lead <= 1.4 )); txt = obj << get where clause; ``` ### [Grouped by AND](#grouped-by-and) **Syntax:** obj \<< Grouped by AND( state=0|1 ) **Description:** Groups of filter items are joined by AND ### [Inverse](#inverse) **Syntax:** obj \<< Inverse( state=0|1 ) **Description:** Inverts the current selection state of the rows in the data table. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); obj << Inverse( 1 ); ``` ### [Invert Selection](#invert-selection) **Syntax:** obj \<< Invert Selection **Description:** Invert the selection for this column filter. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add( Filter Columns( :Region ), Where( :Region = {"N", "S"} ) ) ); Wait( 1 ); obj << (Filter Column( :Region ) << invert selection); ``` ### [Make Filter Change Handler](#make-filter-change-handler) **Syntax:** rs = df \<< Make Filter Change Handler(function(a) ); **Description:** Creates a data filter handler to handle notification that the filter has changed. The number of rows filtered is returned in the argument to the function. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dist = Distribution( Automatic Recalc( 1 ), Continuous Distribution( Column( :POP ) ) ); filter = dist << Local Data Filter( Add Filter( columns( :Region ) ) ); f = Function( {a}, Print( a ) ); rs = filter << Make Filter Change Handler( f ); ``` ### [Match](#match) **Syntax:** obj \<< Match( Filter Columns(:a, :b, :c, ...), where( conditions ) ) **Description:** Sets the filter conditions for each group. ``` dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" ); obj = dt << Data Filter( Add Filter( columns( :BP 8W, :BP 6M ) ), Add Filter( columns( :BP 12M ) ) ); Wait( 1 ); obj << Match( Filter Columns( :BP 8W, :BP 6M ), Where( :BP 8W > 174.8 & :BP 8W < 184.2 ) ); obj << Match( Filter Columns( :BP 12M ), Where( :BP 12M > 181.9 & :BP 12M < 192.1 ) ); ``` ### [Mode](#mode) **Syntax:** obj \<< Mode( Select|Show|Include (state = 0|1) ) **Description:** Sets the action or mode used when selecting rows through the data filter. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter; obj << Mode( Include( 1 ), Select( 0 ), Show( 0 ) ); obj << Add Filter( Columns( :Region ), Where( :Region == "N" ) ); ``` ### [On Clear](#on-clear) **Syntax:** obj \<< On Clear **Description:** Set a script or function to be executed after the filter is cleared. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Data Filter; df = obj << Add Filter( columns( :age, :sex ), Where( :age == {13, 14} ) ); obj << OnClear( Function( {}, df << Mode( Include( 0 ), Select( 1 ), Show( 0 ) ) ) ); Wait( 1 ); df << Mode( Include( 1 ), Select( 0 ), Show( 0 ) ); ``` ### [Remove Favorites](#remove-favorites) **Syntax:** obj \<< Remove Favorites( name or string ) **Description:** Remove the named favorites from the favorites list **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); df = dt << Data Filter( Add Filter( columns( :age, :sex, :height, :weight ), Where( :sex == "F" ), Where( :height >= 55 & :height <= 65 ) ), Mode( Select ) ); df << add favorites( "FemaleAverageHt" ); df << Match( Where( :sex == "F" ) ); df << add favorites( "Female" ); Wait( 1 ); df << remove favorites( "FemaleAverageHt" ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); df = dt << Data Filter( Add Filter( columns( :age, :sex, :height, :weight ), Where( :sex == "F" ), Where( :height >= 55 & :height <= 65 ) ), Mode( Select ) ); df << add favorites( "FemaleAverageHt" ); df << Match( Where( :sex == "F" ) ); df << add favorites( "Female" ); Wait( 1 ); df << remove favorites(); ``` ### [Report](#report) **Syntax:** obj \<< Report **Description:** Returns a reference to the report object. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Add Filter( columns( :POP ) ); obj << Add Filter( columns( :Region, :State, :City ), Where( :Region == "S" ), Where( :State == {"SC", "NC"} ) ); r = obj << Report; t = r[Outline Box( 1 )] << Get Title; Show( t ); ``` ### [Save Script to Data Table](#save-script-to-data-table) **Syntax:** obj \<< Save Script to Data Table **Description:** Create a JSL script to produce the filter window and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Save Script to Data Table; ``` ### [Save Script to Journal](#save-script-to-journal) **Syntax:** obj \<< Save Script to Journal **Description:** Create a JSL script to produce the filter window and add a Button to the journal containing this script. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Save Script to Journal; ``` ### [Save Script to Script Window](#save-script-to-script-window) **Syntax:** obj \<< Save Script to Script Window **Description:** Create a JSL script to produce the filter window and append it to the current Script text window. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Save Script to Script Window; ``` ### [Save Where Clause to Clipboard](#save-where-clause-to-clipboard) **Syntax:** obj \<< Save Where Clause to Clipboard **Description:** Create the WHERE clause from the filter criteria and put it on the clipboard. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter; obj << Add Filter( Columns( :Lead ), Where( :Lead >= .4 & :Lead <= 2.0 ) ); obj << Save Where Clause To Clipboard; ``` ### [Save Where Clause to Data Table](#save-where-clause-to-data-table) **Syntax:** obj \<< Save Where Clause to Data Table **Description:** Create a WHERE clause from the filter criteria and save it as a table property in the data table. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter; obj << Add Filter( Columns( :Lead ), Where( :Lead >= .4 & :Lead <= 2.0 ) ); obj << Save Where Clause To Data Table; ``` ### [Save Where Clause to Formula Column](#save-where-clause-to-formula-column) **Syntax:** obj \<< Save Where Clause to Formula Column **Description:** Create an indicator column that has a formula equivalent to the filter criteria. Rows satisfying the filer criteria will have a value of 1, and all other rows will have a value of 0. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter; obj << Add Filter( Columns( :Lead ), Where( :Lead >= .4 & :Lead <= 2.0 ) ); obj << Save Where Clause To Formula Column; ``` ### [Save Where Clause to Journal](#save-where-clause-to-journal) **Syntax:** obj \<< Save Where Clause to Journal **Description:** Create the WHERE clause from the filter criteria and append it to the journal. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter; obj << Add Filter( Columns( :Lead ), Where( :Lead >= .4 & :Lead <= 2.0 ) ); obj << Save Where Clause To Journal; ``` ### [Save Where Clause to Row State Column](#save-where-clause-to-row-state-column) **Syntax:** obj \<< Save Where Clause to Row State Column **Description:** Create a row state column that has a formula equivalent to the filter criteria. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter; obj << Add Filter( Columns( :Lead ), Where( :Lead >= .4 & :Lead <= 2.0 ) ); obj << Save Where Clause To Row State Column; ``` ### [Save Where Clause to Script Window](#save-where-clause-to-script-window) **Syntax:** obj \<< Save Where Clause to Script Window **Description:** Create a WHERE clause from the filter criteria and append it to the current Script text window. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter; obj << Add Filter( Columns( :Lead ), Where( :Lead >= .4 & :Lead <= 2.0 ) ); obj << Save Where Clause To Script Window; ``` ### [Save and restore current row states](#save-and-restore-current-row-states) **Syntax:** obj \<< Save and restore current row states( state=0|1 ) **Description:** Save the current row states for the data table, then restores those states upon closing the data filter. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Save and Restore Current Row States( 1 ), Add Filter( Columns( :Region ), Where( :Region == "N" ) ) ); Wait( 1 ); obj << Close; ``` ### [Select Missing](#select-missing) **Syntax:** obj \<< Select Missing( state=0|1 ) **Description:** Add the missing rows to the selection for this continuous column filter. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add( Filter Columns( :CO ), Where( :CO >= 9 & :CO < 15 ) ) ); Wait( 1 ); obj << (Filter Column( :CO ) << Select Missing); ``` ### [Set Include](#set-include) **Syntax:** obj \<< Set Include( state=0|1 ) **Description:** Check the uncheck the include mode. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Data Filter( Add Filter( columns( :age, :sex ) ) ); obj << set Include( 1 ); Wait( 1 ); obj << set Include( 0 ); ``` ### [Set Select](#set-select) **Syntax:** obj \<< Set Select( state=0|1 ) **Description:** Check or uncheck the select mode. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Data Filter( Add Filter( columns( :age, :sex ) ) ); obj << set select( 1 ); Wait( 1 ); obj << set select( 0 ); ``` ### [Set Show](#set-show) **Syntax:** obj \<< Set Show( state=0|1 ) **Description:** Check the uncheck the show mode. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Data Filter( Add Filter( columns( :age, :sex ) ) ); obj << set Show( 1 ); Wait( 1 ); obj << set Show( 0 ); ``` ### [Show Controls](#show-controls) **Syntax:** obj \<< Show Controls( state=0|1 ) **Description:** Show or hide the controls for modifying the data filter options. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); obj << Show Controls( 0 ); ``` ### [Show Counts](#show-counts) **Syntax:** obj \<< Show Counts( state=0|1 ) **JMP Version Added:** 16 ### [Show Histograms and Bars](#show-histograms-and-bars) **Syntax:** obj \<< Show Histograms and Bars( state=0|1 ) **Description:** Show Histograms and Bars for filter columns where available **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ) ); Wait( 1 ); obj << Show Histograms and Bars( 0 ); ``` ### [Show Modes](#show-modes) **Syntax:** obj \<< Show Modes( state=0|1 ) **Description:** Show or hide the controls for changing the mode of the data filter, which controls the select/show/include behavior of the data filter. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); obj << Show Modes( 0 ); ``` ### [Show Subset](#show-subset) **Syntax:** obj \<< Show Subset **Description:** Show the filtered data in a separate data table window. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter; obj << Add Filter( Columns( :Region ), Where( :Region == "N" ) ); obj << Show Subset; ``` ### [Stretch Width](#stretch-width) **Syntax:** obj \<< Stretch Width( "Manual" | "Window" ) **Description:** Sets the horizontal stretching behavior of the filter. By default, the filter width can be changed manually. If set to "Window", the width gets larger or smaller with the window size. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); New Window( "Shared Local Filter", Data Filter Context Box( H Splitter Box( Size( 1200, 500 ), V Scroll Box( dt << Data Filter( Local, Stretch Width( "Window" ), Add Filter( columns( :sex ), Where( :sex == "F" ) ) ), <= .4 & :Lead <= 1.4 )); ``` ### [columns](#columns_1) **Syntax:** obj \<< columns( columns ) **Description:** Add filter columns. It is alternative command to add filter columns. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); obj << Columns( :Region, :SO2, :CO, :State ); ``` ## [Categorical Filter](#categorical-filter) ### [Item Messages](#item-messages_1) #### [Blocks Display](#blocks-display) **Syntax:** obj \<< Blocks Display( state=0|1 ) **Description:** Show each level as a selectable block. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "List Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Blocks Display; ``` #### [Check Box Display](#check-box-display) **Syntax:** obj \<< Check Box Display( state=0|1 ) **Description:** Show each level with a check box, along with frequency count and bars. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "List Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Check Box Display; ``` #### [Clear Find](#clear-find) **Syntax:** obj \<< Clear Find **JMP Version Added:** 15 #### [Clear Selection](#clear-selection_1) **Syntax:** obj \<< Clear Selection **Description:** Clears any selection in effect for the given column. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Clear Selection; ``` #### [Continuous](#continuous) **Syntax:** obj \<< Continuous( state=0|1 ) **JMP Version Added:** 16 #### [Delete](#delete_1) **Syntax:** obj \<< Delete **Description:** Removes the variable from the Data Filter control panel. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Delete; ``` #### [Extend Where](#extend-where_1) **Syntax:** obj \<< Extend Where **Description:** Select rows using an expression, adding to the current selection. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Extend Where( :Region == {"MW"} ); ``` #### [Find](#find) **Syntax:** obj \<< Find(Set Text("string"), ) **Description:** Provides a text box where you can enter a search string for the selected column. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Find( Set Text( "w" ) ); ``` #### [Get Selected Items](#get-selected-items) **Syntax:** obj \<< Get Selected Items **JMP Version Added:** 15 #### [Get Visible Items](#get-visible-items) **Syntax:** obj \<< Get Visible Items **JMP Version Added:** 19 #### [Invert Selection](#invert-selection_1) **Syntax:** obj \<< Invert Selection **Description:** Deselects any selected values, and selects all values not previously selected, for the given column. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Invert Selection; ``` #### [List Display](#list-display) **Syntax:** obj \<< List Display( state=0|1 ) **Description:** Show each level in a list, along with frequency count and bars. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "Check Box Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << List Display; ``` #### [Multiple Response](#multiple-response) **Syntax:** obj \<< Multiple Response( state=0|1 ) **JMP Version Added:** 16 #### [Nominal/Ordinal](#nominalordinal) **Syntax:** obj \<< Nominal/Ordinal( state=0|1 ) **JMP Version Added:** 16 #### [Order By Count](#order-by-count) **Syntax:** obj \<< Order By Count( state=0|1 ) **Description:** Orders the values in decreasing sort order by count. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Order by Count; ``` #### [Radio Box Display](#radio-box-display) **Syntax:** obj \<< Radio Box Display( state=0|1 ) **Description:** Show each level with a radio box, along with frequency count and bars. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "List Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Radio Box Display; ``` #### [Select Filter Item](#select-filter-item) **Syntax:** obj \<< Select Filter Item **Description:** Select the given filter item. The selected filter is used as the current animation object. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); popobj = obj << Get Filter Column( :POP ); popobj << Select Filter Item; ``` #### [Single Category Display](#single-category-display) **Syntax:** obj \<< Single Category Display( state=0|1 ) **Description:** Show each level and frequency count in a combo box menu. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "List Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Single Category Display; ``` #### [Unstructured Text](#unstructured-text_1) **Syntax:** obj \<< Unstructured Text( state=0|1 ) **JMP Version Added:** 16 #### [Where](#where_1) **Syntax:** obj \<< Where **Description:** Select rows using an expression. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Where( :Region == {"MW"} ); ``` ## [Continuous Filter](#continuous-filter) ### [Item Messages](#item-messages_2) #### [Clear Selection](#clear-selection_2) **Syntax:** obj \<< Clear Selection **Description:** Clears any selection in effect for the given column. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Clear Selection; ``` #### [Continuous](#continuous_1) **Syntax:** obj \<< Continuous( state=0|1 ) **JMP Version Added:** 16 #### [Delete](#delete_2) **Syntax:** obj \<< Delete **Description:** Removes the variable from the Data Filter control panel. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Delete; ``` #### [Extend Where](#extend-where_2) **Syntax:** obj \<< Extend Where **Description:** Select rows using an expression, adding to the current selection. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Extend Where( :Region == {"MW"} ); ``` #### [Invert Selection](#invert-selection_2) **Syntax:** obj \<< Invert Selection **Description:** Deselects any selected values, and selects all values not previously selected, for the given column. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Invert Selection; ``` #### [Multiple Response](#multiple-response_1) **Syntax:** obj \<< Multiple Response( state=0|1 ) **JMP Version Added:** 16 #### [Nominal/Ordinal](#nominalordinal_1) **Syntax:** obj \<< Nominal/Ordinal( state=0|1 ) **JMP Version Added:** 16 #### [Reset Zoom](#reset-zoom) **Syntax:** obj \<< Reset Zoom **Description:** Reset the min and max of the filter display to the default values. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Time Series/Air.jmp" ); gb = dt << Graph Builder( Size( 522, 492 ), Show Control Panel( 0 ), Variables( X( :month ), Y( :Ozone Concentration ), Group X( :Summer Months Intervention ) ), Elements( Points( X, Y, Legend( 10 ) ), Smoother( X, Y, Legend( 11 ) ) ), ); ldf = gb << Local Data Filter( Add Filter( columns( :date ), Where( :date >= 16Oct1965 & :date <= 31Aug1968 ) ) ); fc = ldf << Get Filter Column( :date ); fc << Zoom to Selection; Wait( 1 ); fc << Reset Zoom; ``` #### [Select Filter Item](#select-filter-item_1) **Syntax:** obj \<< Select Filter Item **Description:** Select the given filter item. The selected filter is used as the current animation object. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); popobj = obj << Get Filter Column( :POP ); popobj << Select Filter Item; ``` #### [Select Missing](#select-missing_1) **Syntax:** obj \<< Select Missing **Description:** Selects rows that contain missing values. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Location( {2098, 120} ), Mode( Select( 0 ), Include( 1 ) ), Add Filter( columns( :OZONE ), Where( :OZONE >= 0.1 & :OZONE <= 0.2 ) ) ); Wait( 1 ); ozoneobj = obj << Get Filter Column( :OZONE ); ozoneobj << Select Missing; ``` #### [Unstructured Text](#unstructured-text_2) **Syntax:** obj \<< Unstructured Text( state=0|1 ) **JMP Version Added:** 16 #### [Where](#where_2) **Syntax:** obj \<< Where **Description:** Select rows using an expression. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Where( :Region == {"MW"} ); ``` #### [Zoom to Selection](#zoom-to-selection) **Syntax:** obj \<< Zoom to Selection **Description:** Set the min and max of the filter display based on the current selected interval. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Time Series/Air.jmp" ); gb = dt << Graph Builder( Size( 522, 492 ), Show Control Panel( 0 ), Variables( X( :month ), Y( :Ozone Concentration ), Group X( :Summer Months Intervention ) ), Elements( Points( X, Y, Legend( 10 ) ), Smoother( X, Y, Legend( 11 ) ) ), ); ldf = gb << Local Data Filter( Add Filter( columns( :date ), Where( :date >= 16Oct1965 & :date <= 31Aug1968 ) ) ); fc = ldf << Get Filter Column( :date ); Wait( 1 ); fc << Zoom to Selection; ``` ## [Multiple Response Filter](#multiple-response-filter) ### [Item Messages](#item-messages_3) #### [Blocks Display](#blocks-display_1) **Syntax:** obj \<< Blocks Display( state=0|1 ) **Description:** Show each level as a selectable block. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "List Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Blocks Display; ``` #### [Check Box Display](#check-box-display_1) **Syntax:** obj \<< Check Box Display( state=0|1 ) **Description:** Show each level with a check box, along with frequency count and bars. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "List Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Check Box Display; ``` #### [Clear Find](#clear-find_1) **Syntax:** obj \<< Clear Find **JMP Version Added:** 15 #### [Clear Selection](#clear-selection_3) **Syntax:** obj \<< Clear Selection **Description:** Clears any selection in effect for the given column. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Clear Selection; ``` #### [Continuous](#continuous_2) **Syntax:** obj \<< Continuous( state=0|1 ) **JMP Version Added:** 16 #### [Delete](#delete_3) **Syntax:** obj \<< Delete **Description:** Removes the variable from the Data Filter control panel. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Delete; ``` #### [Extend Where](#extend-where_3) **Syntax:** obj \<< Extend Where **Description:** Select rows using an expression, adding to the current selection. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Extend Where( :Region == {"MW"} ); ``` #### [Find](#find_1) **Syntax:** obj \<< Find(Set Text("string"), ) **Description:** Provides a text box where you can enter a search string for the selected column. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Find( Set Text( "w" ) ); ``` #### [Get Selected Items](#get-selected-items_1) **Syntax:** obj \<< Get Selected Items **JMP Version Added:** 15 #### [Get Visible Items](#get-visible-items_1) **Syntax:** obj \<< Get Visible Items **JMP Version Added:** 19 #### [Invert Selection](#invert-selection_3) **Syntax:** obj \<< Invert Selection **Description:** Deselects any selected values, and selects all values not previously selected, for the given column. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Invert Selection; ``` #### [List Display](#list-display_1) **Syntax:** obj \<< List Display( state=0|1 ) **Description:** Show each level in a list, along with frequency count and bars. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "Check Box Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << List Display; ``` #### [Match All](#match-all) **Syntax:** obj \<< Match All **Description:** Selects rows with values that match all of the checked values. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match All; ``` #### [Match Any](#match-any) **Syntax:** obj \<< Match Any **Description:** Selects rows with values that match any of the checked values. By default, this option is selected. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match Any; ``` #### [Match At Least](#match-at-least) **Syntax:** dfitem \<< Match At Least(n); **Description:** Select rows with values that match at least n of the checked values. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match At Least( 1 ); ``` #### [Match At Most](#match-at-most) **Syntax:** dfitem \<< Match At Most(n); **Description:** Select rows with values that match at most n of the checked values. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match At Most( 1 ); ``` #### [Match Between](#match-between) **Syntax:** dfitem \<< Match Between(n, m); **Description:** Select rows with values that match between n and m of the checked values. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match Between( 1, 2 ); ``` #### [Match Exactly](#match-exactly) **Syntax:** obj \<< Match Exactly **Description:** Selects rows with values that match exactly the checked values. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match Exactly; ``` #### [Match None](#match-none) **Syntax:** obj \<< Match None **Description:** Selects rows with values that match none of the checked values. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match None; ``` #### [Match Only](#match-only) **Syntax:** obj \<< Match Only **Description:** Select rows with values that match only the checked value. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match Only; ``` #### [Multiple Response](#multiple-response_2) **Syntax:** obj \<< Multiple Response( state=0|1 ) **JMP Version Added:** 16 #### [Nominal/Ordinal](#nominalordinal_2) **Syntax:** obj \<< Nominal/Ordinal( state=0|1 ) **JMP Version Added:** 16 #### [Order By Count](#order-by-count_1) **Syntax:** obj \<< Order By Count( state=0|1 ) **Description:** Orders the values in decreasing sort order by count. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Order by Count; ``` #### [Radio Box Display](#radio-box-display_1) **Syntax:** obj \<< Radio Box Display( state=0|1 ) **Description:** Show each level with a radio box, along with frequency count and bars. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "List Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Radio Box Display; ``` #### [Select Filter Item](#select-filter-item_2) **Syntax:** obj \<< Select Filter Item **Description:** Select the given filter item. The selected filter is used as the current animation object. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); popobj = obj << Get Filter Column( :POP ); popobj << Select Filter Item; ``` #### [Single Category Display](#single-category-display_1) **Syntax:** obj \<< Single Category Display( state=0|1 ) **Description:** Show each level and frequency count in a combo box menu. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "List Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Single Category Display; ``` #### [Unstructured Text](#unstructured-text_3) **Syntax:** obj \<< Unstructured Text( state=0|1 ) **JMP Version Added:** 16 #### [Where](#where_3) **Syntax:** obj \<< Where **Description:** Select rows using an expression. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Where( :Region == {"MW"} ); ``` ## [Unstructured Text Filter](#unstructured-text-filter) ### [Item Messages](#item-messages_4) #### [Add Missing](#add-missing) **Syntax:** obj \<< Add Missing **Description:** Add a missing value as a selectable option for unstructured text. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = Graph Builder( Show Control Panel( 0 ), Variables( X( :sibling ages ) ), Elements( Bar( X, Legend( 3 ) ) ) ); df = obj << Local Data Filter( Add Filter( columns( :reported illnesses ), Unstructured Text( Column( :reported illnesses ), Add Filter Text( "head" ) ), Match Any( Where( Contains( :reported illnesses, "head" ) ) ), ) ); Wait( 1 ); illness_obj = df << Get Filter Column( :reported illnesses ); illness_obj << Add Missing; ``` #### [Blocks Display](#blocks-display_2) **Syntax:** obj \<< Blocks Display( state=0|1 ) **Description:** Show each level as a selectable block. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "List Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Blocks Display; ``` #### [Check Box Display](#check-box-display_2) **Syntax:** obj \<< Check Box Display( state=0|1 ) **Description:** Show each level with a check box, along with frequency count and bars. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "List Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Check Box Display; ``` #### [Clear Filter Texts List](#clear-filter-texts-list) **Syntax:** obj \<< Clear Filter Texts List **Description:** Clear the list of filters for an unstructured text filter item. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = Graph Builder( Show Control Panel( 0 ), Variables( X( :sibling ages ) ), Elements( Bar( X, Legend( 3 ) ) ) ); df = obj << Local Data Filter( Add Filter( columns( :reported illnesses ), Unstructured Text( Column( :reported illnesses ), Add Filter Text( "head" ) ), Match Any( Where( Contains( :reported illnesses, "head" ) ) ), ) ); Wait( 1 ); illness_obj = df << Get Filter Column( :reported illnesses ); illness_obj << Clear Filter Texts List; ``` #### [Clear Selection](#clear-selection_4) **Syntax:** obj \<< Clear Selection **Description:** Clears any selection in effect for the given column. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Clear Selection; ``` #### [Continuous](#continuous_3) **Syntax:** obj \<< Continuous( state=0|1 ) **JMP Version Added:** 16 #### [Delete](#delete_4) **Syntax:** obj \<< Delete **Description:** Removes the variable from the Data Filter control panel. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Delete; ``` #### [Extend Where](#extend-where_4) **Syntax:** obj \<< Extend Where **Description:** Select rows using an expression, adding to the current selection. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Extend Where( :Region == {"MW"} ); ``` #### [Get Selected Items](#get-selected-items_2) **Syntax:** obj \<< Get Selected Items **JMP Version Added:** 15 #### [Get Visible Items](#get-visible-items_2) **Syntax:** obj \<< Get Visible Items **JMP Version Added:** 19 #### [Invert Selection](#invert-selection_4) **Syntax:** obj \<< Invert Selection **Description:** Deselects any selected values, and selects all values not previously selected, for the given column. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Invert Selection; ``` #### [List Display](#list-display_2) **Syntax:** obj \<< List Display( state=0|1 ) **Description:** Show each level in a list, along with frequency count and bars. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "Check Box Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << List Display; ``` #### [Match All](#match-all_1) **Syntax:** obj \<< Match All **Description:** Selects rows with values that match all of the checked values. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match All; ``` #### [Match Any](#match-any_1) **Syntax:** obj \<< Match Any **Description:** Selects rows with values that match any of the checked values. By default, this option is selected. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match Any; ``` #### [Match At Least](#match-at-least_1) **Syntax:** dfitem \<< Match At Least(n); **Description:** Select rows with values that match at least n of the checked values. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match At Least( 1 ); ``` #### [Match At Most](#match-at-most_1) **Syntax:** dfitem \<< Match At Most(n); **Description:** Select rows with values that match at most n of the checked values. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match At Most( 1 ); ``` #### [Match Between](#match-between_1) **Syntax:** dfitem \<< Match Between(n, m); **Description:** Select rows with values that match between n and m of the checked values. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match Between( 1, 2 ); ``` #### [Match Exactly](#match-exactly_1) **Syntax:** obj \<< Match Exactly **Description:** Selects rows with values that match exactly the checked values. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match Exactly; ``` #### [Match None](#match-none_1) **Syntax:** obj \<< Match None **Description:** Selects rows with values that match none of the checked values. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match None; ``` #### [Match Only](#match-only_1) **Syntax:** obj \<< Match Only **Description:** Select rows with values that match only the checked value. ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Sports ), Match Any( Where( :sports == {"Basketball", "Tennis"} ) ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); sportsobj = obj << Get Filter Column( :Sports ); sportsobj << Match Only; ``` #### [Multiple Response](#multiple-response_3) **Syntax:** obj \<< Multiple Response( state=0|1 ) **JMP Version Added:** 16 #### [Nominal/Ordinal](#nominalordinal_3) **Syntax:** obj \<< Nominal/Ordinal( state=0|1 ) **JMP Version Added:** 16 #### [Order By Count](#order-by-count_2) **Syntax:** obj \<< Order By Count( state=0|1 ) **Description:** Orders the values in decreasing sort order by count. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Order by Count; ``` #### [Radio Box Display](#radio-box-display_2) **Syntax:** obj \<< Radio Box Display( state=0|1 ) **Description:** Show each level with a radio box, along with frequency count and bars. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "List Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Radio Box Display; ``` #### [Select Filter Item](#select-filter-item_3) **Syntax:** obj \<< Select Filter Item **Description:** Select the given filter item. The selected filter is used as the current animation object. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); popobj = obj << Get Filter Column( :POP ); popobj << Select Filter Item; ``` #### [Show Filter Text Edit Box](#show-filter-text-edit-box) **Syntax:** obj \<< Show Filter Text Edit Box( state=0|1 ) **Description:** Show or hide the text edit box for defining text filter conditions. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" ); obj = Graph Builder( Show Control Panel( 0 ), Variables( X( :sibling ages ) ), Elements( Bar( X, Legend( 3 ) ) ) ); df = obj << Local Data Filter( Add Filter( columns( :reported illnesses ), Unstructured Text( Column( :reported illnesses ), Add Filter Text( "head" ) ), Match Any( Where( Contains( :reported illnesses, "head" ) ) ), ) ); Wait( 1 ); illness_obj = df << Get Filter Column( :reported illnesses ); illness_obj << Show Filter Text Edit Box( 0 ); ``` #### [Single Category Display](#single-category-display_2) **Syntax:** obj \<< Single Category Display( state=0|1 ) **Description:** Show each level and frequency count in a combo box menu. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Display( :Region, "List Display" ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Single Category Display; ``` #### [Unstructured Text](#unstructured-text_4) **Syntax:** obj \<< Unstructured Text( state=0|1 ) **JMP Version Added:** 16 #### [Where](#where_4) **Syntax:** obj \<< Where **Description:** Select rows using an expression. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Data Filter( Add Filter( columns( :Region, :POP ), Where( :Region == {"C", "N"} ) ), Mode( Select( 0 ), Show( 0 ), Include( 1 ) ) ); Wait( 1 ); regionobj = obj << Get Filter Column( :Region ); regionobj << Where( :Region == {"MW"} ); ``` # [Data Table](#data-table) ## [Associated Constructors](#associated-constructors) ### [Association Analysis](#association-analysis) **Syntax:** Association Analysis( Item( columns ), ID( columns ) ) **Description:** Identifies connections among groups of items in an independent event or transaction. Association analysis is frequently used to analyze transactional data (also called market baskets) to identify items that often appear together in transactions. ``` dt = Open( "$SAMPLE_DATA/Grocery Purchases.jmp" ); obj = dt << Association Analysis( Item( :Product ), ID( :Customer ID ) ); ``` ### [Attribute Chart](#attribute-chart) **Syntax:** Attribute Chart( Y( columns ), X( columns ) ) **Description:** Analyzes categorical measurements to show you measures of agreement across responses, such as raters. ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); obj = dt << Attribute Chart( Y( :A, :B, :C ), X( :Part ), Standard( :Standard ) ); ``` ### [Bayesian Optimization](#bayesian-optimization) **Syntax:** Bayesian Optimization( Y( columns ), X( columns ) ) **Description:** Recommends factor settings to optimize responses by augmenting the data table. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Bayesian Optimization( Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ), X( :SILICA, :SILANE, :SULFUR ) ); ``` ### [Bivariate](#bivariate) **Syntax:** Bivariate( Y( columns ), X( columns ) ) **Description:** Models a continuous response with respect to another continuous variable. Analysis methods include fitting lines, polynomials, splines, and bivariate densities. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Bivariate( Y( :Weight ), X( :Height ) ); ``` ### [Boosted Tree](#boosted-tree) **Syntax:** Boosted Tree (Y( column ), X( columns )) **Description:** Constructs a predictive model by building a large, additive decision tree that is a sequence of smaller decision trees. Each of the trees is fit on the residuals of the previous tree. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Boosted Tree( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Go ); ``` ### [Bootstrap Forest](#bootstrap-forest) **Syntax:** Bootstrap Forest (Y( column ), X( columns )) **Description:** Constructs a predictive model by averaging predicted values from many decision trees. Each decision tree is fit to a random bootstrap sample of the training data. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Bootstrap Forest( Y( :Y ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Validation( :Validation ), Minimum Splits Per Tree( 5 ), Portion Bootstrap( 1 ), Number Terms( 3 ), Number Trees( 25 ), Go ); ``` ### [Bubble Plot](#bubble-plot) **Syntax:** Bubble Plot( X( column ), Y( column ), \, \, \, \, \, \, \ ) **Description:** Creates a chart that plots the cumulative sums of deviations of subgroup means from a target. This chart is also called a tabular CUSUM chart. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Oil1 Cusum.jmp" ); obj = dt << CUSUM Control Chart( Y( :weight ), H( 2 ), Lower Side( 1 ), Target( 8.1 ), K( 0.025 ), Sigma( 0.05 ), Head Start( 0.05 ) ); ``` ### [Categorical](#categorical) **Syntax:** Categorical( Responses | Aligned Responses | Repeated Measures | Rater Agreement | Multiple Response | Multiple Response by ID | Multiple Delimited | Indicator Group | Response Frequencies( column ), X( column(s) ) ) **Description:** Summarizes and analyzes categorical response data. Data can be simple responses, multiple responses, repeated measures, rater agreement, aligned responses, or free text. Includes the ability to generate custom cross tabulations of responses. #### [Aligned Responses](#aligned-responses) ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); Categorical( Structured( Empty(), Empty(), Aligned Responses( :I am working on my career, :I want to see the world, :My home needs some major improvements, :I have vast interests outside of work, :I want to get my debt under control, :I come from a large family ) ) ); ``` #### [Multiple Response (Structured)](#multiple-response-structured) ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); Categorical( Structured( :Gender, :Brush Delimited + :Floss Delimited ) ); ``` #### [Multiple Response with Nested Groups](#multiple-response-with-nested-groups) ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure3MultipleField.jmp" ); Categorical( X( :clean, :date ), Multiple Response( :Failure1, :Failure2, :Failure3 ) ); ``` #### [Nested within Individual Factors](#nested-within-individual-factors) ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); Categorical( Structured( :Single Status * :Gender + :School Age Children * :Gender, :I am working on my career + :I want to see the world ) ); ``` #### [One Response by Two Nested Factors](#one-response-by-two-nested-factors) ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Categorical( X( :sex, :marital status ), Responses( :country ) ); ``` #### [Rater Agreement](#rater-agreement) ``` dt = Open( "$SAMPLE_DATA/Attribute Gauge.jmp" ); Categorical( Rater Agreement( :A, :B, :C ) ); ``` #### [Repeated Measures](#repeated-measures) ``` dt = Open( "$SAMPLE_DATA/Presidential Elections.jmp" ); Categorical( Repeated Measures( :"1980 Winner"n, :"1984 Winner"n, :"1988 Winner"n, :"1992 Winner"n, :"1996 Winner"n, :"2000 Winner"n, :"2004 Winner"n, :"2008 Winner"n, :"2012 Winner"n ) ); ``` #### [Three Responses by Two Individual Factors (Structured)](#three-responses-by-two-individual-factors-structured) ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); Categorical( Structured( :I am working on my career + :I want to see the world, :Gender + :Single Status + :Age Group ) ); ``` ### [Cell Plot](#cell-plot) **Syntax:** Cell Plot( Y( column(s) ), \ ) **Description:** Produces a rectangular grid of cells drawn with one-to-one correspondence to data table values. The cells in the grid are colored by the values in the cells. ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); obj = dt << Cell Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); ``` ### [Choice](#choice) **Syntax:** Choice( Profile DataTable( data table ), Profile ID( column ), Profile Effects( column(s) ), \, \, \, \, \, \, \, \, \ ) **Description:** Models data from a choice experiment that studies customer preferences. Estimates the probability that a specific configuration is preferred using a form of conditional logistic regression. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Pizza Profiles.jmp" ); dt2 = Open( "$SAMPLE_DATA/Pizza Responses.jmp" ); obj = dt << Choice( Response Data Table( Data Table( "Pizza Responses" ) ), Profile DataTable( Data Table( "Pizza Profiles" ) ), Response Profile ID Chosen( :Choice ), Response Subject ID( :Subject ), Response Profile ID Choices( :Choice1, :Choice2 ), Profile ID( :ID ), Profile Effects( :Crust, :Cheese, :Topping ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Pizza Combined.jmp" ); obj = Choice( One Table( 1 ), Profile DataTable( dt ), Profile ID( :Indicator ), Profile Effects( :Crust, :Cheese, :Topping ), Profile Grouping( :Subject, :Trial ) ); ``` ### [Close](#close) **Syntax:** Close( \, \ ) **Description:** Closes the data table referenced by the first argument, which defaults to the current data table. The second argument is used to save the data table. Use an appropriate file extension in the path to save the data table as a non-JMP format. Specifying NoSave bypasses the prompt to save or disregard changes. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); Wait( 2 ); Close( dt ); ``` ### [Cluster Variables](#cluster-variables) **Syntax:** Cluster Variables( Y( columns ) ) **Description:** Clusters variables (columns) into groups that can be represented by a single component or variable. Cluster variables can be used as a dimension reduction technique. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); obj = dt << Cluster Variables( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); ``` ### [Contingency](#contingency) **Syntax:** Contingency( Y( columns ), X( columns ) ) **Description:** Models a categorical response across a set of categorical groups. Analysis methods include chi-square tests and mosaic plots. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Contingency( Y( :Age ), X( :sex ) ); ``` ### [Contour Plot](#contour-plot) **Syntax:** Contour Plot( X( column, column ), Y( column ) ) **Description:** Produces a graph of three variables in a two-dimensional view, where the third variable is represented by contour curves of equal value. ``` dt = Open( "$SAMPLE_DATA/Little Pond.jmp" ); obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) ); ``` ### [Contour Profiler](#contour-profiler) **Syntax:** Contour Profiler( Y( column1, column2, ... ) ) **Description:** Produces an interactive contour plot that enables you to explore how one or more predicted responses change across pairs of factors. The values of factors not used in the plot can be varied to further explore the impact of the factor settings on the predicted responses. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Contour Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); ``` ### [Control Chart Builder](#control-chart-builder) **Syntax:** Control Chart Builder( Class( "Shewhart Variables"|"Shewhart Attribute"|"Short Run"|"Rare Event" ), Variables( variables ), \ ), Limits( Sigma( "sigma" ), )> ) ) ) **Description:** Enables you to interactively create control charts, which are used to determine whether a process is stable and predictable. The Control Chart Builder platform can be used to create the following types of control charts: IMR, XBar, Short Run, Run, P, NP, C, U, Laney P', Laney U', Levey-Jennings, IMR on Means, Three Way, and Rare Event charts. #### [C Chart](#c-chart) ``` // Create a C chart by adding a Y variable, changing the Class to Shewhart Attribute, changing the Statistic to Count, and changing the Sigma to Poisson. dt = Open( "$SAMPLE_DATA/Quality Control/Orange Juice.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Sample ), Y( :Status ), Phase( :Phase ) ), Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Poisson" ) ) ), Show Control Panel( 0 ) ); ``` #### [IMR Chart](#imr-chart) ``` // Create an IMR chart by adding a continuous Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Show Control Panel( 0 ) ); ``` #### [IMR on Group Standard Deviation Chart (Set Subgroup Size)](#imr-on-group-standard-deviation-chart-set-subgroup-size) ``` // Create an IMR on Group Standard Deviation chart by adding a Y variable and defining a subgroup size, and changing the Statistic on the location chart to Standard Deviation, on the dispersion chart to Moving Range on Std Dev and the Sigma on both charts to Moving Range. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Chart( Position( 1 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Std Dev" ) ), Limits( Sigma( "Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [IMR on Group Standard Deviation Chart (Subgroup Variable)](#imr-on-group-standard-deviation-chart-subgroup-variable) ``` // Create an IMR on Group Standard Deviation chart by adding a Y variable and a subgroup variable, and changing the Statistic on the location chart to Standard Deviation, on the dispersion chart to Moving Range on Std Dev and the Sigma on both charts to Moving Range. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Std Dev" ) ), Limits( Sigma( "Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [IMR on Means Chart (Set Subgroup Size)](#imr-on-means-chart-set-subgroup-size) ``` // Create an IMR on Means chart by adding a Y variable and defining a subgroup size, and changing the Statistic on the dispersion chart to Moving Range on Means and the Sigma on both charts to Moving Range. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Chart( Position( 1 ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [IMR on Means Chart (Subgroup Variable)](#imr-on-means-chart-subgroup-variable) ``` // Create an IMR on Means chart by adding a Y variable and a subgroup variable, and changing the Statistic on the dispersion chart to Moving Range on Means and the Sigma on both charts to Moving Range. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [Levey-Jennings Chart](#levey-jennings-chart) ``` // Create a Levey-Jennings chart by adding a Y variable, removing the dispersion chart, and changing the Sigma to Levey Jennings. Make sure that the Statistic is set to Individual. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Show Two Shewhart Charts( 0 ), Variables( Y( :Weight ) ), Chart( Points( Statistic( "Individual" ) ), Limits( Sigma( "Levey Jennings" ) ) ), Show Control Panel( 0 ) ); ``` #### [Median Moving Range Chart](#median-moving-range-chart) ``` // Create a Median Moving Range chart by adding a Y variable and changing the Sigma to Median Moving Range on both the location and dispersion charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Chart( Position( 1 ), Limits( Sigma( "Median Moving Range" ) ) ), Chart( Position( 2 ), Limits( Sigma( "Median Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [Median Moving Range on Group Means Chart (Set Subgroup Size)](#median-moving-range-on-group-means-chart-set-subgroup-size) ``` // Create a Median Moving Range on Group Means chart by adding a Y variable and defining a subgroup size, changing the Statistic on the dispersion chart to Moving Range on Means, and changing the Sigma to Median Moving Range on both the location and dispersion charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Chart( Position( 1 ), Limits( Sigma( "Median Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Median Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [Median Moving Range on Group Means Chart (Subgroup Variable)](#median-moving-range-on-group-means-chart-subgroup-variable) ``` // Create a Median Moving Range on Group Means chart by adding a Y variable and a subgroup variable, changing the Statistic on the dispersion chart to Moving Range on Means, and changing the Sigma to Median Moving Range on both the location and dispersion charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Limits( Sigma( "Median Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Median Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [Median Moving Range on Group Standard Deviations Chart (Set Subgroup Size)](#median-moving-range-on-group-standard-deviations-chart-set-subgroup-size) ``` // Create a Median Moving Range on Group Standard Deviations chart by adding a Y variable and defining a subgroup size, changing the Statistic on the location chart to Standard deviation, on the dispersion chart to Moving Range on Std Dev, and changing the Sigma to Median Moving Range on both the location and dispersion charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Chart( Position( 1 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Median Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Std Dev" ) ), Limits( Sigma( "Median Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [Median Moving Range on Group Standard Deviations Chart (Subgroup Variable)](#median-moving-range-on-group-standard-deviations-chart-subgroup-variable) ``` // Create a Median Moving Range on Group Standard Deviations chart by adding a Y variable and a subgroup variable, changing the Statistic on the location chart to Standard deviation, on the dispersion chart to Moving Range on Std Dev, and changing the Sigma to Median Moving Range on both the location and dispersion charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Median Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Std Dev" ) ), Limits( Sigma( "Median Moving Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [NP Chart](#np-chart) ``` // Create an NP chart by adding a Y variable, changing the Class to Shewhart Attribute, changing the Statistic to Count, and changing the Sigma to Binomial (P, NP). dt = Open( "$SAMPLE_DATA/Quality Control/Orange Juice.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Sample ), Y( :Status ), Phase( :Phase ) ), Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Binomial" ) ) ), Show Control Panel( 0 ) ); ``` #### [P Chart](#p-chart) ``` // Create a P chart by adding a Y variable, changing the Class to Shewhart Attribute, changing the Statistic to Proportion, and changing the Sigma to Binomial (P, NP). dt = Open( "$SAMPLE_DATA/Quality Control/Orange Juice.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Sample ), Y( :Status ), Phase( :Phase ) ), Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Binomial" ) ) ), Show Control Panel( 0 ) ); ``` #### [P' Chart](#p-chart_1) ``` // Create a P' chart by adding a Y variable, changing the Class to Shewhart Attribute, changing the Statistic to Proportion, and changing the Sigma to Laney P'. dt = Open( "$SAMPLE_DATA/Quality Control/Washers.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Lot ), Y( :"# defective"n ), n Trials( :Lot Size ) ), Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Laney P Prime" ) ) ), Show Control Panel( 0 ) ); ``` #### [Rare Event G Chart](#rare-event-g-chart) ``` // Create a G chart by changing the class to Rare Event and adding a nonnegative discrete Y variable. Make sure that the Sigma is set to Negative Binomial. dt = Open( "$SAMPLE_DATA/Quality Control/Fan Burnout.jmp" ); obj = dt << Control Chart Builder( Class( "Rare Event" ), Variables( Subgroup( :Burnout ), Y( :Hours between Burnouts ) ), Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Negative Binomial" ) ) ), Show Control Panel( 0 ) ); ``` #### [Rare Event T Chart](#rare-event-t-chart) ``` // Create a T chart by changing the class to Rare Event, changing the Sigma to Weibull, and adding a nonnegative discrete Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Fan Burnout.jmp" ); obj = dt << Control Chart Builder( Class( "Rare Event" ), Variables( Subgroup( :Burnout ), Y( :Hours between Burnouts ) ), Chart( Points( Statistic( "Count" ) ), Limits( Sigma( "Weibull" ) ) ), Show Control Panel( 0 ) ); ``` #### [Run Chart](#run-chart) ``` // Create a Run chart by adding a Y variable, turning off the limits, and removing the dispersion chart. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Show Two Shewhart Charts( 0 ), Show Limit Summaries( 0 ), Variables( Y( :Weight ) ), Chart( Limits( Show Lower Limit( 0 ), Show Upper Limit( 0 ) ) ), Show Control Panel( 0 ) ); ``` #### [Short Run Difference Chart](#short-run-difference-chart) ``` // Create a Short Run Difference chart by changing the class to Short Run and adding a Product or Part variable. Make sure that the Statistic values for the location chart and dispersion chart are set to Centered and Moving Range Centered, respectively. Centered Short Run control charts are sometimes referred to as Deviation from Nominal (DNOM) charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Class( "Short Run" ), Variables( Y( :Weight ), Part( :Product ) ), Show Control Panel( 0 ) ); ``` #### [Short Run Difference Chart for XBar](#short-run-difference-chart-for-xbar) ``` // Create a Short Run Difference chart for summarized data by changing the class to Short Run and adding a Product or Part variable, Short Run Standardized charts are sometimes referred to as Z-MR charts. Centered Short Run control charts are sometimes referred to as Deviation from Nominal (DNOM) charts. dt = Open( "$SAMPLE_DATA/Quality Control/Fancy Chocolate Factory.jmp" ); obj = dt << Control Chart Builder( Show Product Separators( 0 ), Class( "Short Run" ), Variables( Subgroup( :Box ), Y( :"%Cocoa"n ), Part( :Product ) ), Show Control Panel( 0 ) ); ``` #### [Short Run Standardized Chart](#short-run-standardized-chart) ``` // Create a Short Run Standardized chart by changing the class to Short Run and adding a Subgroup and a Product or Part variable, changing the Statistic for the location chart type to Standardized, and changing the Statistic for the dispersion chart to Moving Range Standardized. Short Run Standardized charts are sometimes referred to as Z-MR charts. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Class( "Short Run" ), Variables( Y( :Weight ), Part( :Product ) ), Chart( Position( 1 ), Points( Statistic( "Standardized" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range Standardized" ) ) ), Show Control Panel( 0 ) ); ``` #### [Short Run Standardized Chart for XBar](#short-run-standardized-chart-for-xbar) ``` // Create a Short Run Standardized chart for summarized data by changing the class to Short Run and adding a Subgroup and a Product or Part variable, Short Run Standardized charts are sometimes referred to as Z-MR charts. Centered Short Run control charts are sometimes referred to as Deviation from Nominal (DNOM) charts. dt = Open( "$SAMPLE_DATA/Quality Control/Fancy Chocolate Factory.jmp" ); obj = dt << Control Chart Builder( Show Product Separators( 0 ), Class( "Short Run" ), Variables( Subgroup( :Box ), Y( :"%Cocoa"n ), Part( :Product ) ), Chart( Position( 1 ), Points( Statistic( "Standardized" ) ) ), Chart( Position( 2 ), Points( Statistic( "Range Standardized" ) ) ), Show Control Panel( 0 ) ); ``` #### [Three Way Chart (Set Subgroup Size)](#three-way-chart-set-subgroup-size) ``` // Create a Three Way chart by adding a dispersion chart after adding a Y variable and setting a subgroup size. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Chart( Position( 1 ), Points( Statistic( "Average" ) ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 3 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Standard Deviation" ) ) ), Show Control Panel( 0 ) ); ``` #### [Three Way Chart (Subgroup Variable)](#three-way-chart-subgroup-variable) ``` // Create a Three Way chart by adding a dispersion chart after adding a Y variable and adding a subgroup variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Points( Statistic( "Average" ) ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 2 ), Points( Statistic( "Moving Range on Means" ) ), Limits( Sigma( "Moving Range" ) ) ), Chart( Position( 3 ), Points( Statistic( "Range" ) ), Limits( Sigma( "Range" ) ) ), Show Control Panel( 0 ) ); ``` #### [U Chart](#u-chart) ``` // Create a U chart by adding a Y variable, changing the Class to Shewhart Attribute, changing the Statistic to Proportion, and changing the Sigma to Poisson. dt = Open( "$SAMPLE_DATA/Quality Control/Orange Juice.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Sample ), Y( :Status ), Phase( :Phase ) ), Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Poisson" ) ) ), Show Control Panel( 0 ) ); ``` #### [U' Chart](#u-chart_1) ``` // Create a U' chart by adding a Y variable, changing the Class to Shewhart Attribute, changing the Statistic to Proportion, and changing the Sigma to Laney U'. dt = Open( "$SAMPLE_DATA/Quality Control/Washers.jmp" ); obj = dt << Control Chart Builder( Class( "Shewhart Attribute" ), Variables( Subgroup( :Lot ), Y( :"# defective"n ), n Trials( :Lot Size ) ), Chart( Points( Statistic( "Proportion" ) ), Limits( Sigma( "Laney U Prime" ) ) ), Show Control Panel( 0 ) ); ``` #### [XBar/R Chart](#xbarr-chart) ``` // Create an XBar/R chart by adding a subgroup or setting a subgroup size after adding a Y variable. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Show Control Panel( 0 ) ); ``` #### [XBar/S Chart (Set Subgroup Size)](#xbars-chart-set-subgroup-size) ``` // Create an XBar/S chart by adding a Y variable and defining a subgroup size, changing the Statistic for the dispersion chart to Standard Deviation, and changing the Sigma for the location chart to Standard Deviation. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Y( :Weight ) ), Set Subgroup Size( 4 ), Chart( Position( 1 ), Limits( Sigma( "Standard Deviation" ) ) ), Chart( Position( 2 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Standard Deviation" ) ) ), Show Control Panel( 0 ) ); ``` #### [XBar/S Chart (Subgroup Variable)](#xbars-chart-subgroup-variable) ``` // Create an XBar/S chart by adding a Y variable and a subgroup variable, changing the Statistic for the dispersion chart to Standard Deviation, and changing the Sigma for the location chart to Standard Deviation. dt = Open( "$SAMPLE_DATA/Quality Control/Coating.jmp" ); obj = dt << Control Chart Builder( Variables( Subgroup( :Sample ), Y( :Weight ) ), Chart( Position( 1 ), Limits( Sigma( "Standard Deviation" ) ) ), Chart( Position( 2 ), Points( Statistic( "Standard Deviation" ) ), Limits( Sigma( "Standard Deviation" ) ) ), Show Control Panel( 0 ) ); ``` ### [Cumulative Damage](#cumulative-damage) **Syntax:** Cumulative Damage **Description:** Analyzes varying-stress and step-stress models. ``` Open( "$SAMPLE_DATA/Reliability/CD Step Stress.jmp" ); Open( "$SAMPLE_DATA/Reliability/CD Step Stress Pattern.jmp" ); obj = Cumulative Damage( Model Type( "Step Stress" ), Time to Event Data Table( Data Table( "CD Step Stress" ), Time to Event( :Time ), Censor( :Censor ), Pattern ID( :Pattern ID ), Censor Code( 1 ) ), Step Stress Pattern Data Table( Data Table( "CD Step Stress Pattern" ), Stress Duration( :Duration ), Stress( :Stress ), Pattern ID( :Pattern ID ) ), Relationship( "Inverse Power" ), Distribution( "Lognormal" ), Pattern Continuation( "Terminate" ) ); ``` ### [Custom Profiler](#custom-profiler) **Syntax:** Custom Profiler( Y( column1, column2, ... ) ) **Description:** Provides an interface that enables you to optimize responses without a graphical output. This profiler is useful for larger problems. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Custom Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); ``` ### [Degradation](#degradation) **Syntax:** Degradation( Y( column ), Time( column ), Application( "Repeated Measures Degradation"|"Destructive Degradation"|"Stability Test" ), \, \, \, \, \, \, \, \ ) **Description:** Models degradation over time using linear and nonlinear curves. Analysis options include stability analysis and generation of pseudo-failure data. ``` dt = Open( "$SAMPLE_DATA/Reliability/GaAs Laser.jmp" ); obj = dt << Degradation( Y( :Current ), Time( :Hours ), Label( :Unit ), Application( "Repeated Measures Degradation" ), Upper Spec Limit( 10 ), Model Report( Simple Linear Path( X Scale( Linear ), Y Scale( Linear ), Intercept( Common ), Slope( Different ) ) ) ); ``` ### [Destructive Degradation](#destructive-degradation) **Syntax:** Destructive Degradation( Y( column ), Time( column ), \, \, \ ) **Description:** Models destructive degradation data over time. ``` dt = Open( "$SAMPLE_DATA/Reliability/Adhesive Bond.jmp" ); obj = dt << Destructive Degradation( Y( :Strength ), Time( :Weeks ), X( :Degrees ), Censor( :Censor ), Censor Code( "Right" ), Model( "Log10", "Sqrt", "Normal", "Individual Path with Intercept" ), Control( "Log10", "Sqrt", "Normal", "Individual Path with Intercept" ) ); ``` ### [Diagram](#diagram) **Syntax:** Diagram( Y( column ), X( column ) ) **Description:** Creates a cause and effect diagram. Also called Ishikawa or fishbone diagrams. These are hierarchical diagrams that enable you to explore root causes. ``` dt = Open( "$SAMPLE_DATA/Ishikawa.jmp" ); obj = dt << Diagram( Y( :Child ), X( :Parent ) ); ``` ### [Discriminant](#discriminant) **Syntax:** Discriminant( Y( columns ), X( columns ) ) **Description:** Estimates the distance from each observation to each group's multivariate mean (centroid) using Mahalanobis distance. The observations are then classified into the group that they are closest to. ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << Discriminant( X( :Species ), Y( :Sepal length, :Sepal width, :Petal length, :Petal width ) ); ``` ### [Distance Matrix](#distance-matrix) **Syntax:** Distance Matrix( Y( columns ) ) **Description:** Computes distances between rows using a variety of methods. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << Distance Matrix( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ) ); ``` ### [Distribution](#distribution) **Syntax:** Distribution( Column() ) **Description:** Shows the distribution and univariate summary statistics for each variable. Results and options depend on the modeling type of each variable. Some options include histograms, box plots, quantile plots, fitting distributions, and capability analysis. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Distribution( Column( :Age, :Weight ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); colref = Column( "age" ); // Correct way to use the colref Distribution( Column( colref ) ); // This will not work Distribution( colref ); ``` ### [EMP Measurement Systems Analysis](#emp-measurement-systems-analysis) **Syntax:** EMP Measurement Systems Analysis( Y( column ), X( columns ), Part(column), Model(Main|Crossed|Crossed with Two Factor Interactions|Nested|Crossed then Nested|Nested then Crossed), Dispersion Chart Type(Range|Standard Deviation) ) **Description:** Launches the EMP (Evaluating the Measurement Process) method for Measurement Systems Analysis. The average and dispersion (range or standard deviation) charts are displayed by default. #### [Crossed Effects Model, Range Chart](#crossed-effects-model-range-chart) ``` dt = Open( "$SAMPLE_DATA/Variability Data/Gasket.jmp" ); obj = dt << EMP Measurement Systems Analysis( Y( :Y ), X( :Operator ), Part( :Part ), Model( "Crossed" ), Dispersion Chart Type( "Range" ), Variance Components( 1 ) ); ``` #### [Crossed Effects Model, Std Dev Chart](#crossed-effects-model-std-dev-chart) ``` dt = Open( "$SAMPLE_DATA/Variability Data/Gasket.jmp" ); obj = dt << EMP Measurement Systems Analysis( Y( :Y ), X( :Operator ), Part( :Part ), Model( "Crossed" ), Dispersion Chart Type( "Standard Deviation" ), Variance Components( 1 ) ); ``` #### [Crossed then Nested Effects Model, Range Chart](#crossed-then-nested-effects-model-range-chart) ``` dt = New Table( "3 Factors Crossed then Nested", Add Rows( 81 ), New Column( "Operator", Character( 7 ), "Nominal", Set Values( {"Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane"} ), Set Display Width( 0 ) ), New Column( "Instrument", Character( 1 ), "Nominal", Set Values( {"A", "A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "C", "C", "C", "C", "C", "C", "C", "C", "C", "A", "A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "C", "C", "C", "C", "C", "C", "C", "C", "C", "A", "A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "C", "C", "C", "C", "C", "C", "C", "C", "C"} ), Set Display Width( 0 ) ), New Column( "Part", Numeric, "Nominal", Format( "Best", 8 ), Set Values( [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25, 25, 25, 26, 26, 26, 27, 27, 27] ), Set Display Width( 0 ) ), New Column( "Y", Numeric, "Continuous", Format( "Best", 8 ), Set Values( [0.5, 0.6, 0.2, 0.8, 0.6, 0.6, 1.6, 1.1, 1, 0.4, 0.2, 0.1, 0.1, 0.5, 0, 0.3, 0.6, 0.8, 0.1, 0.1, 0.2, 0.4, 0.9, 1.8, 0.1, 0.3, 0.4, 0.1, 0.3, 0.1, 0.9, 0.4, 0, 0.6, 0.7, 0.7, 0.3, 0.1, 0.2, 0.3, 0.6, 0.2, 0.2, 0.4, 0.4, 0.8, 0.3, 0.3, 2.6, 0.4, 1.6, 0.5, 0.3, 2.9, 0, 0, 0.5, 0.1, 0, 0.3, 0.5, 0, 0, 0.4, 0, 0.4, 0.3, 0.2, 0, 0, 0.5, 0.1, 0.1, 0.2, 0.3, 1.1, 0.2, 0.1, 0.6, 0.3, 0.6] ), Set Display Width( 68 ) ) ); obj = dt << EMP Measurement Systems Analysis( Y( :Y ), X( :Operator, :Instrument ), Part( :Part ), Model( "Crossed then Nested (3 Factors Only)"n ), Dispersion Chart Type( Range ), Variance Components( 1 ) ); ``` #### [Crossed then Nested Effects Model, Std Dev Chart](#crossed-then-nested-effects-model-std-dev-chart) ``` dt = New Table( "3 Factors Crossed then Nested", Add Rows( 81 ), New Column( "Operator", Character( 7 ), "Nominal", Set Values( {"Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane"} ), Set Display Width( 0 ) ), New Column( "Instrument", Character( 1 ), "Nominal", Set Values( {"A", "A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "C", "C", "C", "C", "C", "C", "C", "C", "C", "A", "A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "C", "C", "C", "C", "C", "C", "C", "C", "C", "A", "A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "C", "C", "C", "C", "C", "C", "C", "C", "C"} ), Set Display Width( 0 ) ), New Column( "Part", Numeric, "Nominal", Format( "Best", 8 ), Set Values( [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25, 25, 25, 26, 26, 26, 27, 27, 27] ), Set Display Width( 0 ) ), New Column( "Y", Numeric, "Continuous", Format( "Best", 8 ), Set Values( [0.5, 0.6, 0.2, 0.8, 0.6, 0.6, 1.6, 1.1, 1, 0.4, 0.2, 0.1, 0.1, 0.5, 0, 0.3, 0.6, 0.8, 0.1, 0.1, 0.2, 0.4, 0.9, 1.8, 0.1, 0.3, 0.4, 0.1, 0.3, 0.1, 0.9, 0.4, 0, 0.6, 0.7, 0.7, 0.3, 0.1, 0.2, 0.3, 0.6, 0.2, 0.2, 0.4, 0.4, 0.8, 0.3, 0.3, 2.6, 0.4, 1.6, 0.5, 0.3, 2.9, 0, 0, 0.5, 0.1, 0, 0.3, 0.5, 0, 0, 0.4, 0, 0.4, 0.3, 0.2, 0, 0, 0.5, 0.1, 0.1, 0.2, 0.3, 1.1, 0.2, 0.1, 0.6, 0.3, 0.6] ), Set Display Width( 68 ) ) ); obj = dt << EMP Measurement Systems Analysis( Y( :Y ), X( :Operator, :Instrument ), Part( :Part ), Model( "Crossed then Nested (3 Factors Only)"n ), Dispersion Chart Type( "Standard Deviation" ), Variance Components( 1 ) ); ``` #### [Crossed with Two Factor Interaction Effects Model, Range Chart](#crossed-with-two-factor-interaction-effects-model-range-chart) ``` dt = Open( "$SAMPLE_DATA/Variability Data/3 Factors Crossed.jmp" ); obj = dt << EMP Measurement Systems Analysis( Y( :new Y ), X( :Operator, :Instrument ), Part( :Part ), Model( "Crossed with Two Factor Interactions" ), Dispersion Chart Type( "Range" ), Variance Components( 1 ) ); ``` #### [Crossed with Two Factor Interaction Effects Model, Std Dev Chart](#crossed-with-two-factor-interaction-effects-model-std-dev-chart) ``` dt = Open( "$SAMPLE_DATA/Variability Data/3 Factors Crossed.jmp" ); obj = dt << EMP Measurement Systems Analysis( Y( :new Y ), X( :Operator, :Instrument ), Part( :Part ), Model( "Crossed with Two Factor Interactions" ), Dispersion Chart Type( "Standard Deviation" ), Variance Components( 1 ) ); ``` #### [Main Effects Model, Range Chart](#main-effects-model-range-chart) ``` dt = Open( "$SAMPLE_DATA/Variability Data/Gasket.jmp" ); obj = dt << EMP Measurement Systems Analysis( Y( :Y ), X( :Operator ), Part( :Part ), Model( "Main" ), Dispersion Chart Type( "Range" ), Variance Components( 1 ) ); ``` #### [Main Effects Model, Std Dev Chart](#main-effects-model-std-dev-chart) ``` dt = Open( "$SAMPLE_DATA/Variability Data/Gasket.jmp" ); obj = dt << EMP Measurement Systems Analysis( Y( :Y ), X( :Operator ), Part( :Part ), Model( "Main" ), Dispersion Chart Type( "Standard Deviation" ), Variance Components( 1 ) ); ``` #### [Nested Effects Model, Range Chart](#nested-effects-model-range-chart) ``` dt = Open( "$SAMPLE_DATA/Variability Data/2 Factors Nested.jmp" ); obj = dt << EMP Measurement Systems Analysis( Y( :Y ), X( :Operator ), Part( :Part ), Model( "Nested" ), Dispersion Chart Type( "Range" ), Variance Components( 1 ) ); ``` #### [Nested Effects Model, Std Dev Chart](#nested-effects-model-std-dev-chart) ``` dt = Open( "$SAMPLE_DATA/Variability Data/2 Factors Nested.jmp" ); obj = dt << EMP Measurement Systems Analysis( Y( :Y ), X( :Operator ), Part( :Part ), Model( "Nested" ), Dispersion Chart Type( "Standard Deviation" ), Variance Components( 1 ) ); ``` #### [Nested then Crossed Effects Model, Range Chart](#nested-then-crossed-effects-model-range-chart) ``` dt = Open( "$SAMPLE_DATA/Variability Data/3 Factors Nested & Crossed.jmp" ); obj = dt << EMP Measurement Systems Analysis( Y( :Y ), X( :Operator, :Instrument ), Part( :Part ), Model( "Nested then Crossed (3 Factors Only)"n ), Dispersion Chart Type( "Range" ), Variance Components( 1 ) ); ``` #### [Nested then Crossed Effects Model, Std Dev Chart](#nested-then-crossed-effects-model-std-dev-chart) ``` dt = Open( "$SAMPLE_DATA/Variability Data/3 Factors Nested & Crossed.jmp" ); obj = dt << EMP Measurement Systems Analysis( Y( :Y ), X( :Operator, :Instrument ), Part( :Part ), Model( "Nested then Crossed (3 Factors Only)"n ), Dispersion Chart Type( "Standard Deviation" ), Variance Components( 1 ) ); ``` ### [EWMA Control Chart](#ewma-control-chart) **Syntax:** EWMA Control Chart( Y( column ), \, \, \
) **Description:** Creates a chart that plots the exponentially weighted moving averages and a chart that plots either the individual observations or the subgroup means. An EWMA chart is also known as a feedback control chart. **JMP Version Added:** 16 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Clips1.jmp" ); obj = dt << EWMA Control Chart( Y( :Gap ) ); ``` ### [Explore Missing Values](#explore-missing-values) **Syntax:** Explore Missing Values( Y( columns ) ) **Description:** Find patterns of missing values and conduct imputation. ``` dt = Open( "$Sample_Data/Cities.jmp" ); obj = dt << Explore Missing Values( Y( :OZONE, :CO, :SO2, :NO, :PM10 ) ); ``` ### [Explore Outliers](#explore-outliers) **Syntax:** Explore Outliers( Y( columns ) ) **Description:** Identifies, explores, and manages outliers in univariate or multivariate data. ``` dt = Open( "$SAMPLE_DATA/Water Treatment.jmp" ); obj = dt << Explore Outliers( Y( Column Group( "Sensor Measurements" ) ) ); ``` ### [Explore Patterns](#explore-patterns) **Syntax:** Explore Patterns( Y( columns ) ) **Description:** Searches for unusual features in the data, including long runs, duplicate long sequences, unusual formatted values, and runs of linear relationships. ``` dt = Open( "$SAMPLE_DATA/Nicardipine Lab Patterns.jmp" ); obj = dt << Explore Patterns( Y( Column Group( "Laboratory Results" ) ) ); ``` ### [Factor Analysis](#factor-analysis) **Syntax:** Factor Analysis( Y( columns ) ) **Description:** Uncovers the underlying structure of data by extracting unobserved variables, or factors, that represent the common variability across observed variables. Factor rotation is used to increase their interpretability. ``` dt = Open( "$SAMPLE_DATA/Socioeconomic.jmp" ); obj = dt << Factor Analysis( Y( :Total Population, :Median School Years, :Total Employment, :Professional Services, :Median House Value ), Variance Scaling( "Correlations" ), Fit( "ML", "SMC", 2, "Varimax" ) ); ``` ### [Fatigue Model](#fatigue-model) **Syntax:** Fatigue Model( N( column ), X( column ), \, \ ) **Description:** Analyzes fatigue data, also known as S-N curve modeling. ``` dt = Open( "$SAMPLE_DATA/Reliability/Metal Wire Z.jmp" ); obj = dt << Fatigue Model( N( :Cycles ), S( :Stress ), Censor( :Censoring Indicator ), Censor Code( "Runout" ) ); ``` ### [Fit Curve](#fit-curve) **Syntax:** Fit Curve( Y( column ), X( column ) ) **Description:** Fits a variety of built-in nonlinear models. ``` dt = Open( "$SAMPLE_DATA/Nonlinear Examples/Bioassay.jmp" ); obj = dt << Fit Curve( Y( :Toxicity ), X( :log Conc ), Group( :formulation ) ); obj << Fit Logistic 4P; ``` ### [Fit Life by X](#fit-life-by-x) **Syntax:** Fit Life by X( Y( column ), X( column ), Relationship( string ), Distribution( string ), \ ) **Description:** Analyzes the distribution of time-to-event data parameterized by a single regression factor. Analysis options include accelerated failure models, life distributions across groups, and transformations of regression factors. ``` dt = Open( "$SAMPLE_DATA/Reliability/Devalt.jmp" ); obj = dt << Fit Life by X( Y( :Hours ), X( :Temp ), Distribution( Lognormal ), Censor( :Censor ), Freq( :Weight ), Relationship( Arrhenius Celsius ) ); ``` ### [Fit Parametric Survival](#fit-parametric-survival) **Syntax:** Fit Model( Y( columns ), Effects( columns ), Personality( "Parametric Survival" ), Censor( columns ) ) **Description:** Fits a general linear regression model to survival times. These models can be used for survival times that can be expressed as a function of one or more explanatory variables. Takes into account various survival distributions and censoring. ``` dt = Open( "$SAMPLE_DATA/VA Lung Cancer.jmp" ); obj = dt << Fit Model( Y( :Time ), Effects( :Age, :Diag Time ), Personality( "Parametric Survival" ), Distribution( "Weibull" ), Censor( :censor ), Run Model ); ``` ### [Fit Proportional Hazards](#fit-proportional-hazards) **Syntax:** Fit Model( Y( columns ), Effects( columns ), Personality( "Proportional Hazard" ), Censor( columns ) ) **Description:** Fits a semiparametric regression model (the Cox proportional hazards model) to assess the effect of explanatory variables on survival times while taking censoring into account. ``` dt = Open( "$SAMPLE_DATA/Rats.jmp" ); obj = dt << Fit Model( Y( :days ), Effects( :Group ), Personality( "Proportional Hazard" ), Censor( :Censor ), Run Model ); ``` ### [Formula Depot](#formula-depot) **Syntax:** Formula Depot **Description:** A container for prediction models that supports model comparison, profiling, and scoring code generation. The Formula Depot is launched through the analyze menu, Publish commands in modeling platforms, Recode, and the Formula Editor. ``` fd1 = Formula Depot(); dt = Open( "$SAMPLE_DATA\Iris.jmp" ); model = dt << RunScript( "Nominal Logistic" ); model << Publish Probability Formulas; fd_script = fd1 << Get Script; Save Text File( "$TEMP\fd.jrp", Char( Name Expr( fd_script ) ) ); fd1 << Close Window; Open( "$TEMP\fd.jrp" ); fd2 = Formula Depot[1]; ``` ### [Functional Data Explorer](#functional-data-explorer) **Syntax:** Functional Data Explorer( Y(column), X(column), ID(column) ) **Description:** Fits functional models using a B-Spline, P-Spline, Fourier, or Wavelets basis model. A functional principal components analysis can be performed on the functional model to extract important features from the data. There is also an option to perform functional principal components analysis directly on the data, without fitting a basis function model first. ``` dt = Open( "$SAMPLE_DATA/Functional Data/Weekly Weather Data.jmp" ); obj = dt << Functional Data Explorer( Y( :TMAX ), X( :Week of Year ), ID( :NAME ) ); ``` ### [Gaussian Process](#gaussian-process) **Syntax:** Gaussian Process( Y( column ), X( columns ) ) **Description:** Models the relationship between a continuous response and one or more continuous predictors as a spline with interpolation. ``` dt = Open( "$SAMPLE_DATA/2D Gaussian Process Example.jmp" ); obj = dt << Gaussian Process( Y( :Y ), X( :X1, :X2 ) ); ``` ### [Graph Builder](#graph-builder) **Syntax:** Graph Builder( Variables( X(column ), Y( column ), \, \, \, \, \, \ ), \ ) ) **Description:** Provides an interactive graphical interface that enables you to explore your data. You can drag columns into graph zones to create a variety of graphs including scatterplots, contour plots, bar charts, area charts, box plots, histograms, heat maps, pie charts, treemaps, mosaic plots, and maps. #### [100% stacked bar chart](#100-stacked-bar-chart) ``` Open( "$SAMPLE_DATA/Lipid Data.jmp" ); // 100% stacked bar chart, custom legend colors Graph Builder( Show Control Panel( 0 ), Variables( X( :Age ), Y( :Cholesterol ), Overlay( :Alcohol Use ) ), Elements( Bar( X, Y, Legend( 55 ), Bar Style( "Stacked" ), Summary Statistic( "% of Factor" ) ) ), SendToReport( Dispatch( {}, "Cholesterol", ScaleBox, {Max( 1 )} ), Dispatch( {}, "400", ScaleBox, {Legend Model( 55, Properties( 0, {Fill Color( RGB Color( 0.9, 0.9, 0.9 ) )} ), Properties( 1, {Fill Color( RGB Color( 1.0, 0.8, 0.8 ) )} ), Properties( 2, {Fill Color( RGB Color( 1.0, 0.6, 0.6 ) )} ), Properties( 3, {Fill Color( RGB Color( 1.0, 0.3, 0.3 ) )} ) )} ) ) ); ``` #### [Arrow lines, one per row](#arrow-lines-one-per-row) ``` Open( "$SAMPLE_DATA/Cholesterol.jmp" ); // arrow lines, one per row Graph Builder( Show Control Panel( 0 ), Variables( X( :April AM ), X( :April PM, Position( 1 ) ), Y( :June AM ), Y( :June PM, Position( 1 ) ), Overlay( :treatment ) ), Elements( Line( X( 1 ), X( 2 ), Y( 1 ), Y( 2 ), Legend( 8 ), Ordering( "Within Row" ), Connection( "Arrow" ) ) ) ); ``` #### [Axis summary table](#axis-summary-table) ``` Open( "$SAMPLE_DATA/Big Class.jmp" ); // caption axis table Graph Builder( Show Control Panel( 0 ), Variables( X( :sex ), Y( :height ) ), Elements( Bar( X, Y, Legend( 4 ) ), Caption Box( X, Y, Legend( 5 ), Summary Statistic( "Mean" ), Summary Statistic 2( "N" ), Location( "Axis Table" ) ) ) ); ``` #### [Bar chart and smooth trend line combination](#bar-chart-and-smooth-trend-line-combination) ``` Open( "$SAMPLE_DATA/Spring.jmp" ); // bar chart and smooth trend line combination, left and right y axes Graph Builder( Show Control Panel( 0 ), Variables( X( :April ), Y( :Temp ), Y( :Precip, Position( 1 ), Side( "Right" ) ) ), Elements( Points( X, Y( 1 ), Legend( 12 ) ), Smoother( X, Y( 1 ), Legend( 13 ) ), Bar( X, Y( 2 ), Legend( 16 ) ) ), SendToReport( Dispatch( {}, "Precip", ScaleBox, {Format( "Best", 12 ), Max( 5 ), Inc( 1 ), Minor Ticks( 1 )} ) ) ); ``` #### [Binomial proportion confidence interval](#binomial-proportion-confidence-interval) ``` Open( "$SAMPLE_DATA/Bands Data.jmp" ); // binomial proportion confidence interval Graph Builder( Show Control Panel( 0 ), Show Legend( 0 ), Show Title( 0 ), Show Y Axis Title( 0 ), Variables( X( :customer ), Y( :Banding? ) ), Elements( Points( X, Y, Legend( 3 ) ), Line Of Fit( X, Y, Legend( 4 ), Means and Std Devs( 1 ) ) ), Local Data Filter( Add Filter( columns( :customer ), Where( :customer == {"MODMAT", "REI", "ROSES", "SHEPLERS", "TARGET"} ) ) ), SendToReport( Dispatch( {}, "Banding?", ScaleBox, {Min( -0.07 ), Max( 1.07 ), Label Row( Show Major Grid( 1 ) )} ) ) ); ``` #### [Bubble chart with overlaid curves](#bubble-chart-with-overlaid-curves) ``` Open( "$SAMPLE_DATA/SATByYear.jmp" ); // Smooth trend line, variable dot size, overlaid y variables, bubble chart. data filter Graph Builder( Show Control Panel( 0 ), Variables( X( :"% Taking (2004)"n ), Y( :SAT Verbal ), Y( :SAT Math, Position( 1 ) ), Size( :Population ) ), Elements( Points( X, Y( 1 ), Y( 2 ), Legend( 7 ) ), Smoother( X, Y( 1 ), Y( 2 ), Legend( 8 ), Lambda( 0.45 ) ) ), Local Data Filter( Add Filter( columns( :Year ), Where( :Year == 2004 ) ) ), SendToReport( Dispatch( {}, "% Taking (2004)", ScaleBox, {Format( "Percent", 12, 0 )} ), Dispatch( {}, "400", ScaleBox, {Legend Model( 7, Properties( 0, {Marker Size( 6 )} ) )} ) ) ); ``` #### [Connected lines with overlaid dots](#connected-lines-with-overlaid-dots) ``` Open( "$SAMPLE_DATA/Time Series/M3C Quarterly Wide Format.jmp" ); // connected lines with overlaid dots, custom markers, nested date axis Graph Builder( Show Control Panel( 0 ), Variables( X( :Time ), Y( :N 646 ), Y( :N 647, Position( 1 ) ) ), Elements( Line( X, Y( 1 ), Y( 2 ), Legend( 10 ) ), Points( X, Y( 1 ), Y( 2 ), Legend( 11 ) ) ), SendToReport( Dispatch( {}, "Time", ScaleBox, {Min( 2515958948 ), Max( 2872394250 ), Interval( "Quarter" ), Inc( 1 ), Minor Ticks( 0 ), Label Row Nesting( 2 ), Label Row( 1, Set Font Size( 12 ) )} ), Dispatch( {}, "N 646", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ), Dispatch( {}, "400", ScaleBox, {Legend Model( 10, Properties( 0, {Line Label Properties( {Last Label( 1 )} )} ), Properties( 1, {Line Label Properties( {Last Label( 1 )} )} ) ), Legend Model( 11, Base( 0, 0, 0, Item ID( "N 646", 1 ) ), Base( 1, 0, 1, Item ID( "N 647", 1 ) ), Properties( 0, {Marker( "FilledCircle" )} ), Properties( 1, {Marker( "Filled Up Triangle" )} ) )} ), Dispatch( {}, "Graph Builder", FrameBox, {DispatchSeg( Line Seg( "Line (N 646)" ), Label Offset( "Last", 45, {2843799627.0183, 6317.56810988166} ) ), DispatchSeg( Line Seg( "Line (N 647)" ), Label Offset( "Last", 45, {2857099451.70628, 4518.71614237549} ) )} ) ) ); ``` #### [Contour plot and scatter plot points](#contour-plot-and-scatter-plot-points) ``` Open( "$SAMPLE_DATA/Nonlinear Examples/CES Production Function.jmp" ); // contour plot and scatter plot points, smoothing, alpha shapes for non-convex hull Graph Builder( Show Control Panel( 0 ), Variables( X( :Labor ), Y( :Capital ), Color( :Difference ) ), Elements( Contour( X, Y, Legend( 9 ), Boundary( 0 ), Number of Levels( 7 ), Alpha( 5 ), Smoothness( 0.2 ) ), Points( X, Y, Color( 0 ), Legend( 10 ) ) ) ); ``` #### [Coplot-style trellis grouping](#coplot-style-trellis-grouping) ``` Open( "$SAMPLE_DATA/Design Experiment/Algorithm Data.jmp" ); // coplot style grouping using continuous grouping variables, smoother and scatter plot Graph Builder( Show Control Panel( 0 ), Variables( X( :Alpha, Levels( 2 ) ), Y( :CPU Time ), Group X( :Beta, Levels( 2 ) ), Group Y( :Gamma, Levels( 2 ) ), Overlay( :Algorithm ) ), Elements( Points( X, Y, Legend( 29 ) ), Smoother( X, Y, Legend( 30 ), Lambda( 0.25 ) ) ) ); ``` #### [Independent charts using BY variable](#independent-charts-using-by-variable) ``` Open( "$SAMPLE_DATA/Financial.jmp" ); // by variable creates multiple Graph Builder instances Graph Builder( Show Control Panel( 0 ), Variables( X( :"Assets($Mil.)"n ), Y( :"Stockholder's Eq($Mil.)"n ), ), Elements( Points( X, Y, Legend( 17 ) ), Smoother( X, Y, Legend( 18 ) ) ), By( :Type ) ); ``` #### [Left and right y axes](#left-and-right-y-axes) ``` Open( "$SAMPLE_DATA/Functional Data/Fermentation Process.jmp" ); // left and right y axes sharing a graph, overlaid lines Graph Builder( Show Control Panel( 0 ), Variables( X( :Time ), Y( :pH ), Y( :Tank Level, Position( 1 ), Side( "Right" ) ) ), Elements( Line( X, Y( 1 ), Legend( 41 ) ), Line( X, Y( 2 ), Legend( 46 ) ) ), SendToReport( Dispatch( {}, "Time", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ) ) ); ``` #### [Line with custom band interval](#line-with-custom-band-interval) ``` Open( "$SAMPLE_DATA/Big Class.jmp" ); // range area, custom interval, overlaid line, transparency Graph Builder( Transform Column( "Quantile...=0.75[height][age]", Formula( Col Quantile( :height, 0.75, :age, :"@Exclude"n, :"@Filter"n ) ) ), Transform Column( "Quantile...=0.25[height][age]", Formula( Col Quantile( :height, 0.25, :age, :"@Exclude"n, :"@Filter"n ) ) ), Show Control Panel( 0 ), Variables( X( :age ), Y( :height ), Y( :"Quantile...=0.25[height][age]"n, Position( 1 ) ), Y( :"Quantile...=0.75[height][age]"n, Position( 1 ) ) ), Elements( Area( X, Y( 2 ), Y( 3 ), Legend( 5 ), Area Style( "Range" ) ), Line( X, Y( 1 ), Legend( 6 ) ) ), SendToReport( Dispatch( {}, "400", ScaleBox, {Legend Model( 5, Level Name( 0, "IQR" ), Properties( 0, {Transparency( 0.33 )} ) )} ), Dispatch( {}, "400", LegendBox, {Set Title( "" )} ) ) ); ``` #### [Linear regression panels](#linear-regression-panels) ``` Open( "$SAMPLE_DATA/Financial.jmp" ); // line of fit, regression, small multiples, custom group color, custom graph spacing Graph Builder( Show Control Panel( 0 ), Grid Color( "Medium Light Gray" ), Grid Transparency( 0.25 ), Title Fill Color( "Medium Light Gray" ), Title Frame Color( "Medium Light Gray" ), Level Fill Color( {217, 217, 217} ), Level Frame Color( "Medium Light Gray" ), Level Spacing Color( "Medium Light Gray" ), Graph Spacing( 10 ), Variables( X( :"Assets($Mil.)"n ), Y( :"Stockholder's Eq($Mil.)"n ), Wrap( :Type ) ), Elements( Points( X, Y, Legend( 17 ) ), Line Of Fit( X, Y, Legend( 19 ) ) ), Local Data Filter( Add Filter( columns( :"Assets($Mil.)"n ), Where( :"Assets($Mil.)"n <= 60941 ) ) ) ); ``` #### [Mediterranean equal-area choropleth](#mediterranean-equal-area-choropleth) ``` Open( "$SAMPLE_DATA/World Demographics.jmp" ); // Mediterranean map, choropleth, equal area projection, grid lines Graph Builder( Size( 1094, 586 ), Show Control Panel( 0 ), Variables( Color( :Total Median Age ), Shape( :Territory ) ), Elements( Map Shapes( Legend( 3 ) ) ), SendToReport( Dispatch( {}, "", ScaleBox, {Format( "Longitude DDD", "PUNDIR", 16 ), Min( -14.2917884823647 ), Max( 64.9684846475565 ), Inc( 20 ), Minor Ticks( 1 ), Label Row( Show Major Grid( 1 ) )} ), Dispatch( {}, "", ScaleBox( 2 ), {Format( "Latitude DDD", "PUNDIR", 16 ), Min( 21.8020806509188 ), Max( 61.3932495299748 ), Inc( 10 ), Minor Ticks( 1 ), Label Row( Show Major Grid( 1 ) )} ) ) ); ``` #### [Multiple x axes](#multiple-x-axes) ``` Open( "$SAMPLE_DATA/Design Experiment/Algorithm Data.jmp" ); // mutiple x variables in separate panels, smoother with confidence intervals and scatter plot Graph Builder( Show Control Panel( 0 ), Variables( X( :Alpha ), X( :Beta ), X( :Gamma ), Y( :CPU Time ), Overlay( :Algorithm ) ), Elements( Position( 1, 1 ), Points( X, Y, Legend( 39 ) ), Smoother( X, Y, Legend( 40 ), Lambda( 1.5 ), Confidence of Fit( 1 ) ) ), Elements( Position( 2, 1 ), Points( X, Y, Legend( 41 ) ), Smoother( X, Y, Legend( 42 ), Lambda( 1.5 ), Confidence of Fit( 1 ) ) ), Elements( Position( 3, 1 ), Points( X, Y, Legend( 43 ) ), Smoother( X, Y, Legend( 44 ), Lambda( 1.5 ), Confidence of Fit( 1 ) ) ), SendToReport( Dispatch( {}, "400", ScaleBox, {Legend Model( 40, Properties( 2, {Line Color( RGB Color( 0.4, 0.4, 0.4 ) )} ) )} ) ) ); ``` #### [Napoleon's March flow diagram](#napoleons-march-flow-diagram) ``` Open( "$SAMPLE_DATA/Napoleons March.jmp" ); // flow diagram Graph Builder( Show Control Panel( 0 ), Show X Axis( 0 ), Show Y Axis( 0 ), Show X Axis Title( 0 ), Show Y Axis Title( 0 ), Variables( X( :Longitude ), Y( :Latitude ), Overlay( :Group ), Color( :Direction ), Size( :Army Size ) ), Elements( Line( X, Y, Legend( 3 ), Ordering( "Row Order" ), Missing Values( "No Connection" ) ) ), SendToReport( Dispatch( {}, "Longitude", ScaleBox, {Min( 26.71 ), Max( 34.9 ), Inc( 2.5 ), Minor Ticks( 0 ), Label Row( Show Major Grid( 1 ) )} ), Dispatch( {}, "Latitude", ScaleBox, {Min( 53.32 ), Max( 56.61 ), Inc( 0.5 ), Minor Ticks( 1 ), Label Row( Show Major Grid( 1 ) )} ), Dispatch( {}, "400", ScaleBox, {Legend Model( 3, Properties( 0, {Line Width( 10 )} ), Properties( 1, {RGB Color( 1, 0.69, 0.49 )} ), Properties( 2, {RGB Color( 0.47, 0.47, 0.47 )} ) )} ), Dispatch( {}, "graph title", TextEditBox, {Set Text( "Napoleon's March to Moscow" )} ), Dispatch( {}, "Graph Builder", FrameBox, {Background Map( Images( "Detailed Earth", Transparency( 0.75 ) ) )} ) ) ); ``` #### [Overlaid bivariate kernel density contours](#overlaid-bivariate-kernel-density-contours) ``` Open( "$SAMPLE_DATA/Penguins.jmp" ); // overlaid bivariate kernel density contour Graph Builder( Show Control Panel( 0 ), Variables( X( :Culmen Depth ), Y( :Culmen Length ), Overlay( :Species ) ), Elements( Contour( X, Y, Legend( 6 ), Line( 1 ), Number of Levels( 5 ), Smoothness( 0.2174 ) ) ) ); ``` #### [Overlaid empirical cumulative distribution function curves](#overlaid-empirical-cumulative-distribution-function-curves) ``` Open( "$SAMPLE_DATA/Penguins.jmp" ); // CDF, empirical cumulative distribution function Graph Builder( Transform Column( "Rank[Culmen Length]@Overlay", Formula( Col Rank( :Culmen Length, :"@Exclude"n, :"@Filter"n, :"@Graph"n, :"@Overlay"n ) / Col Number( :Culmen Length, :"@Exclude"n, :"@Filter"n, :"@Graph"n, :"@Overlay"n ) ) ), Show Control Panel( 0 ), Legend Position( "Inside Bottom Right" ), Show Title( 0 ), Show Y Axis Title( 0 ), Variables( X( :Culmen Length ), Y( :"Rank[Culmen Length]@Overlay"n ), Overlay( :Species ) ), Elements( Line( X, Y, Legend( 15 ), Connection( "Step" ) ) ), SendToReport( Dispatch( {}, "Rank[Culmen Length]@Overlay", ScaleBox, {Max( 1.0117745954803 )} ), Dispatch( {}, "400", ScaleBox, {Legend Model( 15, Level Name( 0, "Adelie" ), Level Name( 1, "Chinstrap" ), Level Name( 2, "Gentoo" ) )} ) ) ); ``` #### [Panels with unaligned y axes](#panels-with-unaligned-y-axes) ``` Open( "$SAMPLE_DATA/US Regional Population.jmp" ); // panels with unaligned y axes Graph Builder( Transform Column( "Transform[Year]", Continuous, Formula( Num( :Year ) ) ), Show Control Panel( 0 ), Extend Axis to Zero( 10 ), Link Page Axes( "X Only" ), Replicate Linked Page Axes( 0 ), Variables( X( :"Transform[Year]"n ), Y( :Population ), Page( :Region, Levels per Row( 3 ) ) ), Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) ), Local Data Filter( Add Filter( columns( :Region ), Where( :Region == {"AR,LA,OK,TX", "Great Lakes", "KY,TN,AL,MS", "Midwest", "Mountain", "New England", "NY,NJ,PA", "Pacific", "South Atlantic"} ) ) ), SendToReport( Dispatch( {}, "Population", ScaleBox, {Format( "Engineering SI", 10 )} ), Dispatch( {}, "Population", ScaleBox( 2 ), {Format( "Engineering SI", 10 )} ), Dispatch( {}, "Population", ScaleBox( 3 ), {Format( "Engineering SI", 10 )} ), Dispatch( {}, "Population", ScaleBox( 4 ), {Format( "Engineering SI", 10 )} ), Dispatch( {}, "Population", ScaleBox( 5 ), {Format( "Engineering SI", 10 )} ), Dispatch( {}, "Population", ScaleBox( 6 ), {Format( "Engineering SI", 10 )} ), Dispatch( {}, "Population", ScaleBox( 7 ), {Format( "Engineering SI", 10 )} ), Dispatch( {}, "Population", ScaleBox( 8 ), {Format( "Engineering SI", 10 )} ), Dispatch( {}, "Population", ScaleBox( 9 ), {Format( "Engineering SI", 10 )} ), Dispatch( {}, "Population", ScaleBox( 10 ), {Format( "Engineering SI", 10 )} ), Dispatch( {}, "Transform[Year]", TextEditBox, {Set Text( "Year" )} ), Dispatch( {}, "Transform[Year]", Text Edit Box( 2 ), {Set Text( "Year" )} ), Dispatch( {}, "Transform[Year]", Text Edit Box( 3 ), {Set Text( "Year" )} ) ) ); ``` #### [Parallel y axes, overlaid lines](#parallel-y-axes-overlaid-lines) ``` Open( "$SAMPLE_DATA/Functional Data/Fermentation Process.jmp" ); // parallel y axes, multiple y scales sharing a graph, overlaid lines Graph Builder( Show Control Panel( 0 ), Parallel Axes( "Y Only" ), Variables( X( :Time ), Y( :Temp ), Y( :NH3 Feed ), Y( :Air ), Y( :Tank Level ), Y( :pH ) ), Elements( Position( 1, 1 ), Line( X, Y, Legend( 37 ) ) ), Elements( Position( 1, 2 ), Line( X, Y, Legend( 39 ) ) ), Elements( Position( 1, 3 ), Line( X, Y, Legend( 40 ) ) ), Elements( Position( 1, 4 ), Line( X, Y, Legend( 41 ) ) ), Elements( Position( 1, 5 ), Line( X, Y, Legend( 42 ) ) ), SendToReport( Dispatch( {}, "Time", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ) ) ); ``` #### [Points and smoother](#points-and-smoother) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); gb = Graph Builder( Show Control Panel( 0 ), Variables( X( :height ), Y( :weight ) ), Elements( Points( X, Y ), Smoother( X, Y ) ) ); ``` #### [Scatter plot with marginal box plots](#scatter-plot-with-marginal-box-plots) ``` Open( "$SAMPLE_DATA/Penguins.jmp" ); // scatter plot with marginal box plots, custom graph sizes Graph Builder( Transform Column( "dummy1", Nominal, Formula( 1 ) ), Transform Column( "dummy2", Nominal, Formula( 1 ) ), Show Control Panel( 0 ), Variables( X( :Delta 13 C ), X( :dummy1 ), Y( :dummy2 ), Y( :Delta 15 N ), Color( :Sex ), Size( :Body Mass ) ), Relative Sizes( "X", [100 10] ), Relative Sizes( "Y", [10 100] ), Elements( Position( 1, 1 ), Box Plot( X, Y, Color( 0 ), Size( 0 ), Legend( 12 ) ) ), Elements( Position( 1, 2 ), Points( X, Y, Legend( 4 ) ) ), Elements( Position( 2, 1 ) ), Elements( Position( 2, 2 ), Box Plot( X, Y, Color( 0 ), Size( 0 ), Legend( 13 ) ) ), SendToReport( Dispatch( {}, "dummy1", ScaleBox, {Label Row( Show Major Labels( 0 ) )} ), Dispatch( {}, "dummy2", ScaleBox, {Label Row( Show Major Labels( 0 ) )} ), Dispatch( {}, "400", ScaleBox, {Legend Model( 4, Properties( 1, {Transparency( 0.75 )} ), Properties( 2, {Transparency( 0.75 )} ) )} ), Dispatch( {}, "dummy1", TextEditBox, {Set Text( "" )} ), Dispatch( {}, "dummy2", TextEditBox, {Set Text( "" )} ), Dispatch( {}, "400", LegendBox, {Legend Position( {12, [1, -3], 4, [0, 3, 4], 13, [2, -3]} )} ) ) ); ``` #### [Variability chart](#variability-chart) ``` Open( "$SAMPLE_DATA/Variability Data/2 Factors Nested.jmp" ); // variability chart, mean and range interval, nested axis Graph Builder( Show Control Panel( 0 ), Variables( X( :Operator ), X( :Part, Position( 1 ) ), Y( :Y ) ), Elements( Points( X( 1 ), X( 2 ), Y, Legend( 3 ), Summary Statistic( "Mean" ), Error Interval( "Range" ) ) ), SendToReport( Dispatch( {}, "Operator", ScaleBox, {Label Row( 2, Show Major Grid( 1 ) )} ) ) ); ``` #### [Violin plots with quartiles](#violin-plots-with-quartiles) ``` Open( "$SAMPLE_DATA/Penguins.jmp" ); // violin plots, overlaid median line and quartile intervals Graph Builder( Show Control Panel( 0 ), Variables( X( :Species ), Y( :Body Mass ) ), Elements( Contour( X, Y, Legend( 3 ) ), Bar( X, Y, Legend( 4 ), Bar Style( "Float" ), Summary Statistic( "Median" ), Error Interval( "Interquartile Range" ) ) ) ); ``` #### [Wafer map](#wafer-map) ``` Open( "$SAMPLE_DATA/Wafer Stacked.jmp" ); // wafer map, heat map, trellis, wrap arrangement Graph Builder( Show Control Panel( 0 ), Variables( X( :X_Die ), Y( :Y_Die ), Wrap( :Wafer ), Color( :Defects ) ), Elements( Heatmap( X, Y, Legend( 8 ) ) ), SendToReport( Dispatch( {}, "X_Die", ScaleBox, {Minor Ticks( 9 )} ), Dispatch( {}, "Y_Die", ScaleBox, {Minor Ticks( 9 )} ), Dispatch( {}, "400", ScaleBox, {Legend Model( 8, Properties( 0, {gradient( {Color Theme( "White to Orange" )} )} ) )} ) ) ); ``` ### [Hierarchical Cluster](#hierarchical-cluster) **Syntax:** Hierarchical Cluster( Y( columns ) ) **Description:** Clusters rows based on continuous or categorical variables. Hierarchical clustering begins by treating each row as its own cluster, then successively combining two clusters at a time. ``` dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" ); obj = dt << Hierarchical Cluster( Y( :birth, :death ), Label( :country ) ); ``` ### [Item Analysis](#item-analysis) **Syntax:** Item Analysis( Y( columns ) ) **Description:** Relates a trait or ability to an individual's probability of endorsing or correctly responding to an item. ``` dt = Open( "$SAMPLE_DATA/MathScienceTest.jmp" ); obj = Item Analysis( Y( :Q1, :Q2, :Q3, :Q4, :Q5, :Q6, :Q7, :Q8, :Q9 ) ); ``` ### [K Means Cluster](#k-means-cluster) **Syntax:** K Means Cluster( Y( column(s) ), Number of Clusters( number ) ) **Description:** Clusters rows based on numeric variables in data tables with up to millions of rows. You must specify the number of clusters in advance. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << K Means Cluster( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ), Number of Clusters( 3 ) ); obj << Go; ``` ### [K Nearest Neighbors](#k-nearest-neighbors) **Syntax:** K Nearest Neighbors(Y( column ), X( columns )) **Description:** Predicts a continuous or categorical response based on the responses of the k nearest neighbors in the space of the X variables. ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = K Nearest Neighbors( Y( :Species ), X( :Sepal length, :Sepal width, :Petal length, :Petal width ), K( 10 ) ); ``` ### [Latent Class Analysis](#latent-class-analysis) **Syntax:** Latent Class Analysis( Y( column(s) ), Number of Clusters( number ) ) **Description:** Clusters rows based on categorical variables using multinomial mixtures. You must specify the number of latent classes (clusters) in advance. ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Latent Class Analysis( Y( :sex, :marital status, :country, :size, :type ), Number of Clusters( 3 ) ); ``` ### [Life Distribution](#life-distribution) **Syntax:** Life Distribution( Y( column(s) ) ) **Description:** Analyzes the distribution of time-to-event data. Can be used for modeling censored data, product lifetime, reliability, and competing causes. ``` dt = Open( "$SAMPLE_DATA/Reliability/Fan.jmp" ); obj = dt << Life Distribution( Y( :Time ), Censor( :Censor ) ); ``` ### [Logistic](#logistic) **Syntax:** Logistic( Y( columns ), X( columns ) ) **Description:** Models a categorical response with respect to a continuous variable. Analysis methods include logistic regression and ROC curves. ``` dt = Open( "$SAMPLE_DATA/Penicillin.jmp" ); obj = dt << Logistic( Y( :Response ), X( :"ln(dose)"n ), Freq( :Count ) ); ``` ### [Make Validation Column](#make-validation-column) **Syntax:** Make Validation Column( \, \, \, \ ) **Description:** Makes a column used to divide the data into training, validation, and test sets. **Cutpoint Example** ``` dt = Open( "$SAMPLE_DATA/Functional Data/Weekly Weather Data.jmp" ); dt << Make Validation Column( Cutpoint Column( :Week of Year ), Cutpoint Batch ID( :ID ), Training Set( 0.60 ), Validation Set( 0.25 ), Test Set( 0.15 ), New Column Name( "Cutpoint Batch Validation" ), Go ); ``` **Stratification Example** ``` dt = Open( "$SAMPLE_DATA/Lipid Data.jmp" ); dt << Make Validation Column( Stratification Columns( :Sex ), Training Set( 0.50 ), Validation Set( 0.25 ), Test Set( 0.25 ), New Column Name( "Valid1" ), Random Seed( 1234 ), Go ); ``` ### [Manage Limits](#manage-limits) **Syntax:** Manage Limits( Process Variables( columns ) ) **Description:** Launches utility for managing quality limits for multiple columns at once. You can add, edit, and save limits to column properties. ``` dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" ); obj = dt << Manage Limits( Process Variables( dt << Get Column Group( "Processes" ) ) ); ``` ### [Marker Admixture](#marker-admixture) **Syntax:** Marker Admixture( Marker( columns ) ) **Description:** Estimates population admixture for individuals based on marker genotypes. **JMP Version Added:** 19 **Example 1** ``` dt = Open( "$SAMPLE_DATA/Life Sciences/Genotypes Pedigree.jmp" ); dt << Marker Admixture( Marker( Column Group( "Markers" ) ), Set(), Fit() ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Life Sciences/Genotypes Pedigree.jmp" ); dt << Marker Admixture( Marker( Column Group( "Markers" ) ), Set( Missing Marker Imputation Method( "Specified" ), Estimation Method( "Fixed Parameter" ), Unthreaded( 1 ), Imputation Value( 1 ), Number of Ancestral Populations( 3 ) ), Fit( Missing Marker Imputation Method( "Specified" ), Estimation Method( "Fixed Parameter" ), Unthreaded( 1 ), Imputation Value( 1 ), Number of Ancestral Populations( 3 ) ) ); ``` ### [Marker Imputation](#marker-imputation) **Syntax:** Marker Imputation( Marker( columns ) ) **Description:** Imputes numeric missing marker genotypes. **JMP Version Added:** 19 **Example 1** ``` dt = Open( "$SAMPLE_DATA/Life Sciences/Genotypes Pedigree.jmp" ); //Set missing values for some markers dt = Current Data Table(); Random Reset( 1234 ); markers = dt << Get Column Group( "Markers" ); markers = markers[Random Index( N Items( markers ), 15 )]; For Each( {col}, markers, col[Random Index( N Rows( dt ), Random Integer( 1, 20 ) )] = . ); //Run platform dt << Marker Imputation( Marker( Column Group( "Markers" ) ), Ploidy( 2 ), Missing Marker Imputation Method( "LD-kNN" ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Life Sciences/Genotypes Pedigree.jmp" ); //Set missing values for some markers dt = Current Data Table(); Random Reset( 1234 ); markers = dt << Get Column Group( "Markers" ); markers = markers[Random Index( N Items( markers ), 15 )]; For Each( {col}, markers, col[Random Index( N Rows( dt ), Random Integer( 1, 20 ) )] = . ); //Run platform obj = dt << Marker Imputation( Marker( Column Group( "Markers" ) ), Ploidy( 2 ), Set Random Seed( 0 ), Method( "Specified" ), Imputation Value( 1 ) ); ``` ### [Marker Relatedness](#marker-relatedness) **Syntax:** Marker Relatedness( Marker( columns ) ) **Description:** Estimates several types of genomic relationship measures between pairs of individuals based genetic markers in both diploid and polyploid organisms. **JMP Version Added:** 18 **Example 1** ``` dt = Open( "$SAMPLE_DATA/Life Sciences/Genotypes Pedigree.jmp" ); //Run platform dt << Marker Relatedness( Marker( Column Group( "Markers" ) ), Ploidy( 2 ), Set Random Seed( 12345 ), Missing Marker Imputation Method( "HWE Off" ), Kinship Type( "Identical by State" ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Life Sciences/Genotypes Pedigree.jmp" ); //Run platform obj = dt << Marker Relatedness( Marker( Column Group( "Markers" ) ), Ploidy( 2 ), Set Random Seed( 12345 ), Missing Marker Imputation Method( "HWE On" ), Kinship Type( "Identical by State" ) ); ``` ### [Marker Simulation](#marker-simulation) **Syntax:** Marker Simulation( Marker( columns ), Predictor Formula( columns ) ) **Description:** Simulates marker genotypes from parental crosses and computes related measures of breeding performance. **JMP Version Added:** 17 **Example 1** ``` dt = Open( "$SAMPLE_DATA/Life Sciences/Genotypes Pedigree.jmp" ); //Hide and Exclude Rows dt << Clear Select << Clear Row States; dt << Select Where( :Father == 0 & :Mother == 0 & Row() <= 100 ); dt << Invert Row Selection << Exclude; dt << Clear Select; //Run platform dt << Marker Simulation( Marker( Column Group( "Markers" ) ), Predictor Formula( :Pred Formula Trait1, :Pred Formula Trait2, :Pred Formula Trait3, :Pred Formula Trait4, :"Probability( Disease Status=1 )"n ), Cross( :Sex ), Ploidy( 2 ), Number of Generations( 2 ), Number of Individuals per Cross( 10 ), Set Random Seed( 12345 ), Threshold to Make Line Plots( 1000 ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Life Sciences/Genotypes Pedigree.jmp" ); //Hide and Exclude Rows dt << Clear Select << Clear Row States; dt << Select Where( :Father == 0 & :Mother == 0 & Row() <= 100 ); dt << Invert Row Selection << Exclude; dt << Clear Select; //Run platform obj = dt << Marker Simulation( Marker( Column Group( "Markers" ) ), Predictor Formula( :Pred Formula Trait1, :Pred Formula Trait2, :Pred Formula Trait3, :Pred Formula Trait4, :"Probability( Disease Status=1 )"n ), Cross( :Sex ), Unthreaded( 1 ), Ploidy( 2 ), Number of Generations( 2 ), Number of Individuals per Cross( 10 ), Set Random Seed( 12345 ), Threshold to Make Line Plots( 1000 ) ); ``` ### [Marker Statistics](#marker-statistics) **Syntax:** Marker Statistics( Marker( columns ), With Marker( columns ) ) **Description:** Performs analysis on genetic marker data to compute measures such as minor allele frequency, Hardy-Weinberg equilibrium, and linkage disequilibrium. **JMP Version Added:** 17 **Example 1** ``` dt = Open( "$SAMPLE_DATA/Life Sciences/Genotypes Pedigree.jmp" ); dt << Marker Statistics( Marker( Column Group( "Markers" ) ), Ploidy( 2 ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Life Sciences/Genotypes Pedigree.jmp" ); obj = dt << Marker Statistics( Marker( Column Group( "Markers" ) ), With Marker( Column Group( "Markers" ) ), Ploidy( 2 ) ); ``` ### [Matched Pairs](#matched-pairs) **Syntax:** Matched Pairs( Y( columns ), X( column ) ) **Description:** Compares the means of matched sets of variables using paired t tests or simple repeated measures analysis to account for correlation between responses. ``` dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" ); obj = dt << Matched Pairs( X( :Dose ), Y( :BP 8M, :BP 8W ) ); ``` ### [MaxDiff](#maxdiff) **Syntax:** MaxDiff( Profile DataTable( data table ), Profile ID( column ), Profile Effects( column(s) ), \, \, \, \, \, \, \, \, \ ) **Description:** Creates a design to find the combination of product attributes that customers most prefer and least prefer. ``` dt = Open( "$SAMPLE_DATA/Potato Chip Combined.jmp" ); obj = dt << MaxDiff( One Table( 1 ), Subject ID( :Respondent ), Choice Set ID( :Choice Set ID ), Profile ID( :Response ), Profile Grouping( :Survey ID ), Profile Effects( :Profile ID ), Response Value Indicates Best( 1 ), Response Value Indicates Worst( -1 ) ); ``` ### [Mixture Profiler](#mixture-profiler) **Syntax:** Mixture Profiler( Y( column1, column2, ... ) ) **Description:** Produces an interactive ternary plot that enables you to explore the contours of the saved prediction formulas for mixture models with three or more factors. ``` dt = Open( "$SAMPLE_DATA/Plasticizer.jmp" ); obj = dt << Mixture Profiler( Y( :Pred Formula Y ) ); ``` ### [Model Comparison](#model-comparison) **Syntax:** Model Comparison( Predictors( columns ), Group( column ) ) **Description:** Compares performance across models using prediction formula columns. ``` dt = Open( "$Sample_Data/Big Class.jmp" ); dt << Fit Model( Y( :weight ), Effects( :height ), Personality( "Standard Least Squares" ), Run( Prediction Formula, Close Window ) ); dt << Fit Model( Y( :weight ), Effects( :age ), Personality( "Standard Least Squares" ), Run( Prediction Formula, Close Window ) ); obj = Model Comparison(); ``` ### [Model Driven Multivariate Control Chart](#model-driven-multivariate-control-chart) **Syntax:** Model Driven Multivariate Control Chart( Process( columns ) ) **Description:** Creates multivariate control charts based on principal components or partial least squares methods. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Quality Control/Flight Delays.jmp" ); obj = dt << Model Driven Multivariate Control Chart( Process( :AA, :CO, :DL, :F9, :FL, :NW, :UA, :US, :WN ) ); ``` ### [Model Screening](#model-screening) **Syntax:** Model Screening( Y( column ), X( columns ) ) **Description:** Fits many different predictive models, so that you can select the best. ``` dt = Open( "$Sample_Data/Diabetes.jmp" ); obj = Model Screening( Y( :Y ), Validation( :Validation ), X( :Age, :Gender, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ) ); ``` ### [Multidimensional Scaling](#multidimensional-scaling) **Syntax:** Multidimensional Scaling( Y( columns ) ) **Description:** Creates a visual representation of the pattern of proximities among a set of objects. ``` dt = Open( "$SAMPLE_DATA/Flight Distances.jmp" ); obj = dt << Multidimensional Scaling( Y( :Birmingham, :Boston, :Buffalo, :Chicago, :Cleveland, :Dallas, :Denver, :Detroit, :El Paso, :Houston, :Indianapolis, :Kansas City, :Los Angeles, :Louisville, :Memphis, :Miami, :Minneapolis, :New Orleans, :New York, :Omaha, :Philadelphia, :Phoenix, :Pittsburgh, :St. Louis, :Salt Lake City, :San Francisco, :Seattle, :Washington DC ) ); ``` ### [Multiple Correspondence Analysis](#multiple-correspondence-analysis) **Syntax:** Multiple Correspondence Analysis( Y( columns ), X( columns ) ) **Description:** Identifies associations between the levels of categorical variables. Multiple Correspondence Analysis is analogous to principal components analysis for categorical data. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Cereal.jmp" ); dt << Multiple Correspondence Analysis( Y( :Mfr, :"Hot/Cold"n, :Fiber Gr ), X( :Manufacturer ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Multiple Correspondence Analysis( Y( :country, :size, :type ) ); ``` ### [Multiple Factor Analysis](#multiple-factor-analysis) **Syntax:** Multiple Factor Analysis( MFABLocks({"Block 1", columns},{"Block 2", columns}) ) **Description:** Analyzes agreement among panelists in sensory data analysis. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Wine Sensory Data.jmp" ); dt << Multiple Factor Analysis( Product ID( :Vineyard ), Z( :Region ), MFA Blocks( {"Susan Fruity etc.", :Susan Fruity, :Susan Flowery, :Susan Spicy, :Susan Crispness}, {"Florence Flowery etc.", :Florence Flowery, :Florence Crispness, :Florence Tannin, :Florence Savory, :Florence Lightness}, {"Xavier Fruity etc.", :Xavier Fruity, :Xavier Spicy, :Xavier Crispness, :Xavier Alcohol, :Xavier Savory, :Xavier Lightness}, {"Robert Fruity etc.", :Robert Fruity, :Robert Flowery, :Robert Spicy, :Robert Crispness, :Robert Tannin, :Robert Alcohol, :Robert Savory, :Robert Lightness }, {"Paula Fruity etc.", :Paula Fruity, :Paula Flowery, :Paula Spicy, :Paula Crispness, :Paula Tannin, :Paula Savory}, {"Monica Fruity etc.", :Monica Fruity, :Monica Flowery, :Monica Spicy, :Monica Tannin, :Monica Alcohol, :Monica Savory, :Monica Lightness}, {"Frank Fruity etc.", :Frank Fruity, :Frank Flowery, :Frank Spicy, :Frank Crispness, :Frank Tannin, :Frank Alcohol, :Frank Savory, :Frank Lightness} ) ); ``` ### [Multivariate](#multivariate) **Syntax:** Multivariate( Y( columns ) ) **Description:** Explores correlation and associations among numeric variables using a variety of multivariate analysis techniques. These techniques include both parametric and nonparametric measures of association, scatterplot matrices, principal components analysis, outlier analysis, and item reliability. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = Multivariate( Y( :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ) ); ``` ### [Multivariate Embedding](#multivariate-embedding) **Syntax:** Multivariate Embedding( Y( columns ) ) **Description:** Maps data from very high-dimensional spaces to a low-dimensional space, using the Uniform Manifold Approximation and Projection (UMAP) method or the t-Distributed Stochastic Neighbor Embedding (t-SNE) method. Many times, you want to map the data to either two or three dimensions so that the low-dimensional space can be easily visualized. Both methods try to preserve the local structure of the data, but UMAP is generally faster than t-SNE for large data sets. **JMP Version Added:** 17 **Example 1** ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << Multivariate Embedding( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); /* Parameters can be changed according to data features */ obj = dt << Multivariate Embedding( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ), Method( "t-SNE" ), Maximum Iterations( 1500 ), Perplexity( 15 ), Initial Principal Component Dimensions( 55 ), Random Seed( 2022 ), Output Dimensions( 3 ) ); ``` **Example 3** ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); /* by group example */ dt << New Column( "_bycol", Character, Nominal, set values( Repeat( {"A", "B"}, N Rows( dt ) )[1 :: N Rows( dt )] ) ); obj = dt << Multivariate Embedding( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ), By( _bycol ) ); ``` ### [Naive Bayes](#naive-bayes) **Syntax:** Naive Bayes( Y( column ), X( columns ), Method( "Naive Bayes" ) ) **Description:** Predicts group membership for a categorical variable based on the closeness of its predictor values to the predictor values for each group. ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << Naive Bayes( Y( :Species ), X( :Sepal length, :Sepal width, :Petal length, :Petal width ) ); ``` ### [Neural](#neural) **Syntax:** Neural( Y( column ), X( columns ), \ ) **Description:** Predicts one or more response variables using a flexible function of the input variables. The flexible framework incorporates layering and s-shaped functions. ``` dt = Open( "$SAMPLE_DATA/Diabetes.jmp" ); obj = dt << Neural( Y( :Y ), X( :Age, :BMI, :BP, :Total Cholesterol, :LDL, :HDL, :TCH, :LTG, :Glucose ), Go ); ``` ### [New Table](#new-table) **Syntax:** dt = New Table( name, \, \, ) **Description:** Creates a new data table. "Invisible" hides the data table from view but lists it in the JMP Home Window. "Private" hides the table completely. "Visible" is the default, and creates a normal table that is visible and listed in the JMP Home Window. The optional actions arguments are any messages that data tables support. ``` dt = New Table( "Little Class", Add Rows( 3 ), New Column( "name", Character, Nominal, Set Values( {"KATIE", "LOUISE", "JANE"} ) ), New Column( "height", Continuous, Set Values( [59, 61, 55] ) ) ); ``` ### [Nonlinear](#nonlinear) **Syntax:** Nonlinear( Y( column ), X( column with predictor formula ) ) **Description:** Fits nonlinear models using least squares or a custom loss function. ``` dt = Open( "$SAMPLE_DATA/Nonlinear Examples/US Population.jmp" ); obj = dt << Nonlinear( Y( :pop ), X( :"X-formula"n ), Finish() ); ``` ### [Normal Mixtures](#normal-mixtures) **Syntax:** Normal Mixtures( Y( column(s) ), Number of Clusters( number ) ) **Description:** Clusters rows based on numeric variables when your data come from a mixture of overlapping multivariate normal distributions. You must specify the number of clusters in advance. ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << Normal Mixtures( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ), Number of Clusters( 3 ) ); obj << Go; ``` ### [Normalization](#normalization) **Syntax:** Normalization( Y( columns ) ) **Description:** Adjusts for technical biases and improves suitability for subsequent analysis **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << Normalization( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ) ); ``` ### [Notebook](#notebook) **Syntax:** nb = Notebook( name|number ) **Description:** Creates a new notebook, or returns the notebook with the provided name or index. ``` nb = Notebook(); ``` ### [Oneway](#oneway) **Syntax:** Oneway( Y( columns ), X( columns ) ) **Description:** Models a continuous response across a set of categorical groups. Analysis methods include ANOVA, means comparisons, analysis of means, and quantile plots. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); obj = dt << Oneway( Y( :Height ), X( :Age ) ); ``` ### [Open](#open) **Syntax:** Open( filePath, \ ) **Description:** Opens a JMP file or imports another supported file type. The open data table option 'Invisible' hides the file from view but lists it in the JMP Home Window, 'Private' hides the file completely. The file option 'Select Columns' reads in only the specified columns, 'Ignore Columns' is the inverse of 'Select Columns', it does not read in the specified columns. The JMP file options 'Column Names Only' and 'Table Info' do not read in the data, nor create a data table. 'Column Names Only' returns the list of the data table's columns names, 'Table Info' returns the number of columns and rows in the data table. The options 'FIRST(n)'/'LAST(n)'/'RANDOM(n)' read in only n rows of the data table. If n is a number between 0 and 1, n is a fraction of the total number of rows in the data table. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp", ignore columns( "age" ) ); ``` **Example 3** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp", "Column Names Only" ); ``` **Example 4** ``` info = Open( "$SAMPLE_DATA/probe.jmp", "Table Info" ); Print( info ); ``` **Example 5** ``` info = Open( "$SAMPLE_DATA/SATByYear.jmp", random( 10 ) ); Print( info ); ``` **Example 6** ``` info = Open( "$SAMPLE_DATA/SATByYear.jmp", First( 10 ) ); Print( info ); ``` ### [Parallel Plot](#parallel-plot) **Syntax:** Parallel Plot( Y( columns ), \ ) **Description:** Produces a plot of two or more variables with connecting line segments for each row. **Example 1** ``` dt = Open( "$SAMPLE_DATA/SAT.jmp" ); dt << Parallel Plot( Y( :"2004 Verbal"n, :"2004 Math"n, :"2003 Verbal"n, :"2003 Math"n, :"2002 Verbal"n, :"2002 Math"n, :"2001 Verbal"n, :"2001 Math"n, :"1999 Verbal"n, :"1999 Math"n, :"1994 Verbal"n, :"1994 Math"n, :"1997 Verbal"n, :"1997 Math"n, :"1992 Verbal"n, :"1992 Math"n ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Dogs.jmp" ); obj = dt << Parallel Plot( Y( :hist0, :hist1, :hist3, :hist5 ) ); ``` ### [Pareto Plot](#pareto-plot) **Syntax:** Pareto Plot( Cause( column ), \, \, \, \ ) **Description:** Displays the relative frequency of items in a quality-related process in decreasing order. You can define one or more classification variables to create a comparative Pareto plot. #### [Group](#group) ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure2.jmp" ); obj = dt << Pareto Plot( Cause( :failure ), X( :clean ), Freq( :N ) ); ``` #### [Simple](#simple) ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure Raw Data.jmp" ); obj = dt << Pareto Plot( Cause( :failure ) ); ``` #### [Subcategory](#subcategory) ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failure2.jmp" ); obj = dt << Pareto Plot( Cause( :failure ), Subcategory( :clean ), Freq( :N ), Subcategory Bar Style( Stacked ) ); ``` ### [Partial Least Squares](#partial-least-squares) **Syntax:** Partial Least Squares( Y( columns ), X( columns ) ) **Description:** Fits a model to one or more response variables using latent factors. This permits models to be fit when explanatory variables are highly correlated, or when there are more explanatory variables than there are observations. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Wine Tasting.jmp" ); obj = dt << Partial Least Squares( Y( :Hedonic, :Goes with meat, :Goes with dessert ), X( :Price, :Sugar, :Alcohol, :Acidity ), Go ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Baltic.jmp" ); obj = dt << 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 ), Go ); ``` ### [Predictor Screening](#predictor-screening) **Syntax:** Predictor Screening( Y( columns ), X( columns ) ) **Description:** Identifies significant predictors from a large number of candidates by using bootstrap forest partitioning to evaluate the contribution of the predictors on the response. ``` dt = Open( "$SAMPLE_DATA/Bands Data.jmp" ); obj = dt << Predictor Screening( Y( :Banding? ), X( Column Group( "Predictors" ) ) ); ``` ### [Principal Components](#principal-components) **Syntax:** Principal Components( Y( columns ) ) **Description:** Models the variation in a set of variables in terms of a smaller number of independent linear combinations (principal components) of those variables. ``` dt = Open( "$SAMPLE_DATA/Solubility.jmp" ); obj = dt << Principal Components( Y( :Ether, :Chloroform, :Benzene, :Carbon Tetrachloride, :Hexane ) ); ``` ### [Process Capability](#process-capability) **Syntax:** Process Capability( Process Variables (columns), < Spec Limits() > ) **Description:** Computes a process capability analysis for each process and creates graphs useful for analyzing the capability of multiple processes at one time. Specification limits can also be defined. ``` dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" ); obj = dt << Process Capability( Process Variables( :NPN1[:lot_id, :wafer], :PNP1[:lot_id, :wafer], :PNP2[:lot_id, :wafer], :NPN2[:lot_id, :wafer], :PNP3[:lot_id, :wafer] ) ); ``` ### [Process History Explorer](#process-history-explorer) **Syntax:** Process History Explorer( Y( columns ),ID( columns), X( columns ), Step( columns ), Timestamp( columns ) ) **Description:** Identifies process steps associated with poor yield. ``` dt = Open( "$sample_data\Quality Control\Lot Wafer History.jmp" ); dt2 = Open( "$sample_data\Quality Control\Lot Wafer Yield.jmp" ); obj = dt << Process History Explorer( ID( :Lot, :Wafer ), X( :Tool, :Route ), Step( :Layer, :Operation ), Timestamp( :TimeIn, :TimeOut ), Yield Table( "Lot Wafer Yield" ), Yield Columns( "Yield" ) ); ``` ### [Process Screening](#process-screening) **Syntax:** Process Screening( Process Variables( columns ) ) **Description:** Examines many processes from several perspectives, including stability, capability, control chart tests, and shift (drift). Assists with the ability to focus on which processes need attention. #### [Screen Count Processes with Alarm Graph for Environmental Monitoring](#screen-count-processes-with-alarm-graph-for-environmental-monitoring) ``` dt = Open( "$Sample_Data/Quality Control/Environmental Monitor Sim.jmp" ); obj = dt << Process Screening( Process Variables( :Count ), Grouping( :Type, :Grade, :Site ), Control Chart Type( "Count" ), Time( :Time ), Set Scrolling( 10 ), // table shows only the first 10 processes Alarm Graph( 1 ), Show Charts as Selected( 1 ), Select Where( Action >= 1 ) ); ``` #### [Screen Many Processes with Grouping Column](#screen-many-processes-with-grouping-column) ``` dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" ); obj = dt << Process Screening( Process Variables( Column Group( "Processes" ) ), Grouping( :Site ) ); ``` #### [Screen Many Processes with Individual-and-Moving-Range Control Chart Metrics](#screen-many-processes-with-individual-and-moving-range-control-chart-metrics) ``` dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" ); obj = dt << Process Screening( Process Variables( Column Group( "Processes" ) ), Control Chart Type( "Indiv and MR" ) ); ``` #### [Screen Many Processes with XBar-and-R Control Chart Metrics](#screen-many-processes-with-xbar-and-r-control-chart-metrics) ``` dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" ); obj = dt << Process Screening( Process Variables( Column Group( "Processes" ) ), Control Chart Type( "XBar and R" ) ); ``` #### [Screen Many Processes with XBar-and-S Control Chart Metrics](#screen-many-processes-with-xbar-and-s-control-chart-metrics) ``` dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" ); obj = dt << Process Screening( Process Variables( Column Group( "Processes" ) ), Subgroup( :wafer ), Control Chart Type( "XBar and S" ) ); ``` #### [Screen Nonnegative Continuous Data for Environmental Monitoring](#screen-nonnegative-continuous-data-for-environmental-monitoring) ``` dt = Open( "$Sample_Data/Quality Control/Environmental Monitor Sim.jmp" ); obj = dt << Process Screening( Process Variables( :Count ), Grouping( :Type, :Grade, :Site ), Control Chart Type( "Nonnegative Continuous" ), Time( :Time ), Set Scrolling( 10 ), // table shows only the first 10 processes Alarm Graph( 1 ), Show Charts as Selected( 1 ) ); ``` #### [Screen Process with a 3-Way Chart (XBar-MR-and-R)](#screen-process-with-a-3-way-chart-xbar-mr-and-r) ``` dt = Open( "$Sample_Data/Quality Control/Vial Fill Weights.jmp" ); obj = dt << Process Screening( Process Variables( :Fill Weight ), Subgroup( :Sample ), Control Chart Type( "XBar MR and R" ), Moving Range Limit Exceeded( 1 ), Chart Options as Selected( Dispersion Chart( 1 ) ), Show Charts as Selected( 1 ), RowStates( [0 1] ) ); ``` #### [Screen Process with a 3-Way Chart (XBar-MR-and-S)](#screen-process-with-a-3-way-chart-xbar-mr-and-s) ``` dt = Open( "$Sample_Data/Quality Control/Vial Fill Weights.jmp" ); obj = dt << Process Screening( Process Variables( :Fill Weight ), Subgroup( :Sample ), Control Chart Type( "XBar MR and S" ), Moving Range Limit Exceeded( 1 ), Show Charts as Selected( 1 ), RowStates( [0 1] ) ); ``` #### [Screen Process with a Proportion Chart](#screen-process-with-a-proportion-chart) ``` dt = Open( "$Sample_Data/Quality Control/Electrical Component Defect Screening.jmp" ); obj = dt << Process Screening( Process Variables( :N Defective ), Control Chart Type( "Proportion" ), n Trials( :N Units ), Show Charts as Selected( 1 ), RowStates( [0 1] ) ); ``` #### [Screen Processes to Show Control Charts for Selected Processes](#screen-processes-to-show-control-charts-for-selected-processes) ``` dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" ); obj = dt << Process Screening( Process Variables( Column Group( "Processes" ) ), Control Chart Type( "Indiv and MR" ), Show Charts as Selected( 1 ), Select Where( Alarm Rate > 0.006 ), // what selects in the table Filter Where( Alarm Rate > 0.005 ) // what shows in the table ); ``` #### [Screen Processes with Capability Goal Plot](#screen-processes-with-capability-goal-plot) ``` dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" ); obj = dt << Process Screening( Process Variables( Column Group( "Processes" ) ), Set Scrolling( 10 ), // table shows only the first 10 processes Goal Plot( 1 ) ); ``` #### [Screen Processes with Process Performance Graph](#screen-processes-with-process-performance-graph) ``` dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" ); obj = dt << Process Screening( Process Variables( Column Group( "Processes" ) ), Set Scrolling( 10 ), // table shows only the first 10 processes Process Performance Graph( 1 ) ); ``` #### [Screen Processes with Process Potential Graph](#screen-processes-with-process-potential-graph) ``` dt = Open( "$Sample_Data/Quality Control/Coating.jmp" ); Column( "Weight" ) << Set Property( "Process Screening", {Centerline( 20.5 ), Specified Sigma( 1.5 ), Measurement Sigma( .8 )} ); Column( "Weight" ) << Set Property( "Spec Limits", {LSL( 17 ), USL( 24 )} ); obj = dt << Process Screening( Process Variables( :Weight ), Subgroup( :Sample ), Control Chart Type( "XBar and R" ), Out of Spec Count( 0 ), Out of Spec Rate( 0 ), Latest Out of Spec( 0 ), Process Potential Graph( 1 ) ); ``` #### [Screen Processes with Shift Detection](#screen-processes-with-shift-detection) ``` dt = Open( "$SAMPLE_DATA/Quality Control/Steam Turbine Current.jmp" ); obj = dt << Process Screening( Process Variables( :Fuel, :Steam Flow, :Steam Temp, :MW, :Cool Temp, :Pressure ), Control Chart Type( "Indiv and MR" ), Shift Graph( 1 ), Show Charts as Selected( 1 ), Select Where( Stability Index > 2 ) ); ``` #### [Screen Processes with Specification Limits in a Separate Table](#screen-processes-with-specification-limits-in-a-separate-table) ``` dt1 = Open( "$SAMPLE_DATA/Cities.jmp" ); dt2 = Open( "$SAMPLE_DATA/CitySpecLimits.jmp" ); obj = dt1 << Process Screening( Y( :OZONE, :CO, :SO2, :NO ), Use Limits Table( 1, dt2, Process Variables( :Column 1 ), LSL( :_LSL ), USL( :_USL ), Target( :_Target ), Go ) ); ``` ### [Profiler](#profiler) **Syntax:** Profiler( Y( column1, , ..., \, ... ), ) **Description:** Produces an interactive graph that enables you to explore how a predicted response changes as you change factor settings. For each factor, the profiler shows prediction traces that are based on saved predictions formulas and linear constraints and illustrate how the response changes with respect to that factor. The Expand argument corresponds to the Expand Intermediate Formulas option in the launch window. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Profiler( Y( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ), Desirability Functions( 1 ) ); ``` **Example 2** ``` dt = Open( "$Sample_Data/Diabetes.jmp" ); colNum = N Items( dt << Get Column Names ); obj = dt << Fit Model( Validation( :Validation ), Y( :Y ), Effects( :Age, :Gender, :BMI, :BP, :Total Cholesterol ), Personality( "Standard Least Squares" ), Emphasis( "Effect Screening" ), Run() ); obj << Save Columns( Prediction Formula( 1 ), StdErr Pred Formula( 1 ) ); obj << Close Window( 1 ); predCol = Column( dt, colNum + 1 ); stderrCol = Column( dt, colNum + 2 ); dt << Profiler( Y( predCol, stderrCol ), Profiler( 1, Confidence Intervals( 1 ), ), Use SE Formula( 1 ) ); ``` **Example 3** ``` dt = Open( "$Sample_Data/Stochastic Optimization.jmp" ); dt << Profiler( Y( :Yield ), Profiler( 1, Desirability Functions( 1 ), ), Expand ); ``` ### [Recurrence Analysis](#recurrence-analysis) **Syntax:** Recurrence Analysis( Y( column ), Cost( column ), Label( column ), \ ) **Description:** Analyzes how a recurring event is distributed over time, per system, or until the system goes out of service. ``` dt = Open( "$SAMPLE_DATA/Reliability/Bladder Cancer.jmp" ); obj = dt << Recurrence Analysis( Y( :Age ), Cost( :Cost ), Grouping( :Treatment Group ), Label( :Patient Number ) ); ``` ### [Reliability Forecast](#reliability-forecast) **Syntax:** Reliability Forecast **Description:** Predicts future failures based on observed data and future units at risk. The platform accepts several input formats. See each format for specification details. #### [Dates Format](#dates-format) ``` dt1 = Open( "$SAMPLE_DATA/Reliability/Small Production part1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Reliability/Small Production part2.jmp" ); obj = dt1 << Reliability Forecast( Input Format( Dates ), Production Data Table( dt1, Production Count( :Sold Quantity ), Timestamp( :Sold Month ) ), Failure Data Table( dt2, Failure Time( :Return Month ), Timestamp( :Sold Month ), Failure Count( :Return Quantity ) ), Life Time Unit( Month ), Show Legend( 1 ), Show Graph Filter( 0 ), Forecast( Group( "" ), Risk Set( [2550, 2600, 2650, 2700, 2750, 2800, 2850] ), Future Risk Set( [3082.5, 3052.5, 3367.5, 3952.5, 3667, 3667], [3347740800, 3350160000, 3352579200, 3355257600, 3357849600, 3360528000] ), Forecast To( "02/2011" ), Distribution( Weibull ), Contract( 6, Month ), Forecast Type( Sequential ), Interval Type( Prediction Interval ), Set Interval Level( 0.9 ) ), Forecast Options( Animation( 1 ), Interactive Configuration of Risk Sets( 1 ), Spreadsheet Configuration of Risk Sets( 0 ), Show Interval( 1 ), Forecasting Interval Type( Prediction Interval ), Use Contract Length( 1 ), Use Failure Cost( 0 ), Set Failure Cost( . ), Monte Carlo Sample Size( 10000 ), Random Seed( -1 ), Use Approximate Distribution( 1 ) ) ); ``` #### [Nevada Format](#nevada-format) ``` dt = Open( "$SAMPLE_DATA/Reliability/Widgets.jmp" ); collist = Transform Each( {i}, 3 :: 38, Output( "List" ), Column( dt, i ) ); obj = dt << Reliability Forecast( Input Format( Nevada ), Production Count( :Volume ), Timestamp( :Time ), Failure Count( Eval List( collist ) ), Life Time Unit( Month ), Interval Censored Failure( 1 ), Show Legend( 0 ), Show Graph Filter( 0 ), Forecast( Group(), Risk Set( [1991, 2000, 1999, 2024, 1959, 1958, 2000, 2001, 1986, 1966, 1983, 2011, 2026, 1950, 1989, 1963, 1954, 2030, 1981, 2006, 1991, 1950, 2025, 1996, 1987, 1957, 1988, 1966, 2038, 2014, 1962, 1965, 1952, 2045, 2018, 2036] ), Forecast To( "01/2004" ), Distribution( Weibull ), Contract( 5, Month ), Forecast Type( Incremental ), Interval Type( No Interval ), Set Interval Level( 0.9 ) ), Forecast Options( Animation( 1 ), Interactive Configuration of Risk Sets( 1 ), Spreadsheet Configuration of Risk Sets( 0 ), Show Interval( 0 ), Forecasting Interval Type( Prediction Interval ), Use Contract Length( 1 ), Use Failure Cost( 0 ), Set Failure Cost( . ), Monte Carlo Sample Size( 10000 ), Random Seed( -1 ), Use Approximate Distribution( 1 ) ) ); ``` #### [Time to Event Format](#time-to-event-format) ``` dt = Open( "$SAMPLE_DATA/Reliability/Small Production Time to Event.jmp" ); obj = dt << Reliability Forecast( Input Format( Time to Event ), Time to Event( :"Time (Month)"n, :Time Right ), Freq( :Freq ), Life Time Unit( Month ), Forecast Start( Informat( "03/01/2010", "Locale Date" ) ), Forecast( Group( "" ), Future Risk Set( [33, 33, 33], [3352924800, 3355516800, 3358195200] ), Forecast To( "09/01/2010" ), Distribution( Weibull ), Contract( 5, Month ), Forecast Type( Incremental ), Interval Type( No Interval ), Set Interval Level( 0.9 ) ), Forecast Options( Animation( 1 ), Interactive Configuration of Risk Sets( 1 ), Spreadsheet Configuration of Risk Sets( 0 ), Show Interval( 0 ), Forecasting Interval Type( Prediction Interval ), Use Contract Length( 1 ), Use Failure Cost( 0 ), Set Failure Cost( [1] ), Monte Carlo Sample Size( 10000 ), Random Seed( 0 ), Use Approximate Distribution( 1 ) ) ); ``` ### [Reliability Growth](#reliability-growth) **Syntax:** obj = Reliability Growth( Input Format( Time to Event ), Time to Event( column, ), \, \ ); obj = Reliability Growth( Input Format( Dates ), Timestamp( column, ), \, \ ); obj = Reliability Growth( Input Format( Concurrent Systems ), Time to Event( column, column, ... ), System ID( column ), \ ) obj = Reliability Growth( Input Format( Parallel Systems ), Time to Event( column, column, ... ), \, System ID( column ), \ ) **Description:** Models the change in reliability of a single repairable system over time as improvements are incorporated into its design. The platform accepts several input formats. See each format for specification details. #### [Concurrent Systems](#concurrent-systems) ``` dt = Open( "$SAMPLE_DATA/Reliability/Concurrent Systems.jmp" ); obj = dt << Reliability Growth( Input Format( Concurrent Systems ), Time to Event( :Prototype 1, :Prototype 2 ), System ID( :Failed System ), ); obj << Crow AMSAA; ``` #### [Dates](#dates) ``` dt = Open( "$SAMPLE_DATA/Reliability/BrakeReliability.jmp" ); obj = dt << Reliability Growth( Input Format( Dates ), Timestamp( :Date ), Event Count( :Fixes ) ); ``` #### [Parallel Systems](#parallel-systems) ``` dt = Open( "$SAMPLE_DATA/Reliability/Parallel Systems Multiple Phases.jmp" ); obj = dt << Reliability Growth( Input Format( Parallel Systems ), Time to Event( :Hours ), Event Count( :Fixes ), System ID( :System ID ), Phase( :Phase ) ); obj << Piecewise Weibull NHPP with Different Intercepts; ``` #### [Time to Event](#time-to-event) ``` dt = Open( "$SAMPLE_DATA/Reliability/NewEngineOperation.jmp" ); obj = dt << Reliability Growth( Input Format( Time to Event ), Time to Event( :Hours ) ); obj << Crow AMSAA; ``` ### [Repeated Measures Degradation](#repeated-measures-degradation) **Syntax:** Repeated Measures Degradation( Y( column ), Time( column ), \, \, \ ) **Description:** Models repeated measures degradation data over time with random parameters. ``` dt = Open( "$SAMPLE_DATA/Reliability/Device B.jmp" ); obj = dt << Repeated Measures Degradation( Y( :Power Drop ), Time( :Hours ), Label( :Device ), X( :Degrees C ), Reference Temperature( "Celsius", 195 ), Control( "Linear", "Linear", "First Order Kinetics Type 2" ) ); ``` ### [Response Screening](#response-screening) **Syntax:** Response Screening( Y( columns ), X( columns ) ) **Description:** Automates the process of conducting tests for linear model effects across a large number of responses. Test results and summary statistics are presented in data tables and plots. The false discovery rate (FDR) guards against incorrect declarations of significance. A robust estimation method reduces the sensitivity of tests to outliers. #### [Response Screening in subgroups with volcano plot selected](#response-screening-in-subgroups-with-volcano-plot-selected) ``` dt = Open( "$Sample_Data/Life Sciences/Genotypes Pedigree.jmp" ); obj = dt << Response Screening( Y( :Trait1, :Trait2, :Trait3, :Trait4 ), X( :Father, :Mother, :Sex, :Disease Status ), Subgroup( Column Group( "Markers" ) ), Common Y Scale( 1 ), SendToReport( Dispatch( {}, "", TabListBox, {Set Selected( 4 )} ) ) ); ``` #### [Response Screening of 4 Responses and 26 Prospective Predictors](#response-screening-of-4-responses-and-26-prospective-predictors) ``` dt = Open( "$SAMPLE_DATA/Baltic.jmp" ); obj = dt << Response Screening( Y( :ls, :ha, :dt ), X( Column Group( "Intensities" ) ) ); ``` #### [Response Screening of Many Columns in Groups](#response-screening-of-many-columns-in-groups) ``` dt = Open( "$Sample_Data/Life Sciences/Genotypes Pedigree.jmp" ); obj = dt << Response Screening( Y( Column Group( "Markers" ) ), X( :Trait1, :Trait2, :Trait3, :Trait4 ), Grouping( "Sex" ) ); ``` #### [Response Screening of Many Columns on Each of Four Predictors](#response-screening-of-many-columns-on-each-of-four-predictors) ``` dt = Open( "$Sample_Data/Life Sciences/Genotypes Pedigree.jmp" ); obj = dt << Response Screening( Y( Column Group( "Markers" ) ), X( :Trait1, :Trait2, :Trait3, :Trait4 ) ); ``` #### [Response Screening of Many Columns with Means Differences Volcano Plot](#response-screening-of-many-columns-with-means-differences-volcano-plot) ``` dt = Open( "$Sample_Data/Life Sciences/Genotypes Pedigree.jmp" ); obj = dt << Response Screening( Y( Column Group( "Markers" ) ), X( :Father, :Mother, :Sex, :Disease Status ), Common Y Scale( 1 ), Volcano Plots Use FDR Axis( 1 ), SendToReport( Dispatch( {}, "", TabListBox( 1 ), {Set Selected( 4 )} ), Dispatch( {}, "", TabListBox( 2 ), {Set Selected( 2 )} ) ) ); ``` #### [Response Screening Specified with Column Numbers](#response-screening-specified-with-column-numbers) ``` dt = Open( "$Sample_Data/Probe.jmp" ); obj = dt << Response Screening( X( :Process ), Y( Eval( 8 :: 108 ) ) ); ``` #### [Response Screening with Robust Fitting](#response-screening-with-robust-fitting) ``` dt = Open( "$SAMPLE_DATA/Probe.jmp" ); obj = dt << Response Screening( Y( Column Group( "Responses" ) ), X( :Process ), Robust( 1 ) ); ``` ### [Scatterplot 3D](#scatterplot-3d) **Syntax:** Scatterplot 3D( Y( columns ) ) **Description:** Produces a rotating three-dimensional scatterplot for three or more variables. If you specify more than three variables, you can cycle through which variables are shown in the scatterplot. ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << Scatterplot 3D( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ) ); ``` ### [Scatterplot Matrix](#scatterplot-matrix) **Syntax:** Scatterplot Matrix( Y( columns ), \, \, \ ) **Description:** Produces a grid of scatterplots that enables you to explore bivariate relationships. If no X variables are specified, the scatterplots are for all pairs of the Y variables. If one or more X variables are specified, the scatterplots are for the Y variables plotted against the X variables. ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = dt << Scatterplot Matrix( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ) ); ``` ### [Structural Equation Models](#structural-equation-models) **Syntax:** Structural Equation Models( Model Variables ( columns ) ) **Description:** Provides a framework to fit a variety of models, including confirmatory factor analysis, path models with or without latent variables, measurement error models, and latent growth curve models. **JMP Version Added:** 15 #### [Confirmatory Factor Analysis](#confirmatory-factor-analysis) ``` dt = Open( "$SAMPLE_DATA/Job Satisfaction.jmp" ); obj = dt << Structural Equation Models( Model Variables( :Support_L, :Goal_L, :Work_L, :Interact_L ), Fit( Model Name( "One Factor CFA" ), New Latent( "Leader" ), Means( {"Constant", {:Support_L, :Goal_L, :Work_L, :Interact_L}} ), Loadings( {"Leader", {:Support_L, :Goal_L, :Work_L, :Interact_L}, {1}} ), Variances( {:Support_L, {:Support_L}}, {:Goal_L, {:Goal_L}}, {:Work_L, {:Work_L}}, {:Interact_L, {:Interact_L}}, {"Leader", {"Leader"}} ), Standardized Parameter Estimates( 1 ), Normalized Residuals Heat Map( 1 ) ) ); ``` #### [Higher Order Confirmatory Factor Analysis](#higher-order-confirmatory-factor-analysis) ``` dt = Open( "$SAMPLE_DATA/Job Satisfaction.jmp" ); dt << Structural Equation Models( Model Variables( :Support_L, :Goal_L, :Work_L, :Interact_L, :Person_C, :Intra_C, :Inter_C, :General_S, :Growth_S, :Coworker_S, :Supervisor_S ), Fit( Model Name( "Higher Order CFA" ), New Latent( "Leadership", "Conflict", "Satisfaction", "General" ), Means( {"Constant", {:Support_L, :Goal_L, :Work_L, :Interact_L, :Person_C, :Intra_C, :Inter_C, :General_S, :Growth_S, :Coworker_S, :Supervisor_S}} ), Loadings( {"Leadership", {:Support_L, :Goal_L, :Work_L, :Interact_L}, {1}}, {"Conflict", {:Person_C, :Intra_C, :Inter_C}, {1}}, {"Satisfaction", {:General_S, :Growth_S, :Coworker_S, :Supervisor_S}, {1}}, {"General", {"Leadership", "Conflict", "Satisfaction"}, {1}} ), Variances( {:Support_L, {:Support_L}}, {:Goal_L, {:Goal_L}}, {:Work_L, {:Work_L}}, {:Interact_L, {:Interact_L}}, {:Person_C, {:Person_C}}, {:Intra_C, {:Intra_C}}, {:Inter_C, {:Inter_C}}, {:General_S, {:General_S}}, {:Growth_S, {:Growth_S}}, {:Coworker_S, {:Coworker_S}}, {:Supervisor_S, {:Supervisor_S}}, {"Leadership", {"Leadership"}}, {"Conflict", {"Conflict"}}, {"Satisfaction", {"Satisfaction"}}, {"General", {"General"}} ) ) ); ``` #### [Linear Latent Growth Curve Model](#linear-latent-growth-curve-model) ``` dt = Open( "$SAMPLE_DATA/Academic Achievement.jmp" ); obj = dt << Structural Equation Models( Model Variables( :Multiple Choice Year1, :Multiple Choice Year2, :Multiple Choice Year3, :Multiple Choice Year4 ), Fit( Model Name( "Linear Growth Curve Model" ), New Latent( "Intercept", "Slope" ), Means( {"Constant", {"Intercept", "Slope"}} ), Loadings( {"Intercept", {:Multiple Choice Year1, :Multiple Choice Year2, :Multiple Choice Year3, :Multiple Choice Year4}, {1, 1, 1, 1}}, {"Slope", {:Multiple Choice Year1, :Multiple Choice Year2, :Multiple Choice Year3, :Multiple Choice Year4}, {0, 1, 2, 3}} ), Variances( {:Multiple Choice Year1, {:Multiple Choice Year1}, {"b1"}}, {:Multiple Choice Year2, {:Multiple Choice Year2}, {"b1"}}, {:Multiple Choice Year3, {:Multiple Choice Year3}, {"b1"}}, {:Multiple Choice Year4, {:Multiple Choice Year4}, {"b1"}}, {"Intercept", {"Intercept"}}, {"Slope", {"Slope"}} ), Covariances( {"Intercept", {"Slope"}} ), Path Diagram Properties( Show Means( 1 ) ) ) ); ``` #### [Multiple Linear Regression with SEM](#multiple-linear-regression-with-sem) ``` dt = Open( "$SAMPLE_DATA/Job Satisfaction.jmp" ); dt << Structural Equation Models( Model Variables( :Satisfaction_Avg, :Support_L, :Goal_L, :Work_L ), Fit( Model Name( "Multiple Regression" ), Means( {"Constant", {:Satisfaction_Avg, :Support_L, :Goal_L, :Work_L}} ), Regressions( {:Support_L, {:Satisfaction_Avg}}, {:Goal_L, {:Satisfaction_Avg}}, {:Work_L, {:Satisfaction_Avg}} ), Variances( {:Satisfaction_Avg, {:Satisfaction_Avg}}, {:Support_L, {:Support_L}}, {:Goal_L, {:Goal_L}}, {:Work_L, {:Work_L}} ), Covariances( {:Support_L, {:Goal_L, :Work_L}}, {:Goal_L, {:Work_L}} ), ) ); ``` #### [Path Analysis Model](#path-analysis-model) ``` dt = Open( "$SAMPLE_DATA/Online Consumer Data.jmp" ); dt << Structural Equation Models( Model Variables( :Privacy, :Reputation, :Trust, :Purchase Int ), Fit( Model Name( "Path Analysis with Observed Variables" ), Means( {"Constant", {:Privacy, :Reputation, :Trust, :Purchase Int}} ), Regressions( {:Privacy, {:Trust}}, {:Reputation, {:Trust, :Purchase Int}}, {:Trust, {:Purchase Int}} ), Variances( {:Privacy, {:Privacy}}, {:Reputation, {:Reputation}}, {:Trust, {:Trust}}, {:Purchase Int, {:Purchase Int}} ), Covariances( {:Privacy, {:Reputation}} ) ) ); ``` #### [Path Analysis with Latent Variables](#path-analysis-with-latent-variables) ``` dt = Open( "$SAMPLE_DATA/Job Satisfaction.jmp" ); dt << Structural Equation Models( Model Variables( :Support_L, :Goal_L, :Work_L, :Interact_L, :Person_C, :Intra_C, :Inter_C, :General_S, :Growth_S, :Coworker_S, :Supervisor_S ), Fit( Model Name( "Path Analysis with Latent Variables" ), New Latent( "Leadership", "Conflict", "Satisfaction" ), Means( {"Constant", {:Support_L, :Goal_L, :Work_L, :Interact_L, :Person_C, :Intra_C, :Inter_C, :General_S, :Growth_S, :Coworker_S, :Supervisor_S}} ), Loadings( {"Leadership", {:Support_L, :Goal_L, :Work_L, :Interact_L}, {1}}, {"Conflict", {:Person_C, :Intra_C, :Inter_C}, {1}}, {"Satisfaction", {:General_S, :Growth_S, :Coworker_S, :Supervisor_S}, {1}} ), Regressions( {"Leadership", {"Conflict", "Satisfaction"}}, {"Conflict", {"Satisfaction"}} ), Variances( {:Support_L, {:Support_L}}, {:Goal_L, {:Goal_L}}, {:Work_L, {:Work_L}}, {:Interact_L, {:Interact_L}}, {:Person_C, {:Person_C}}, {:Intra_C, {:Intra_C}}, {:Inter_C, {:Inter_C}}, {:General_S, {:General_S}}, {:Growth_S, {:Growth_S}}, {:Coworker_S, {:Coworker_S}}, {:Supervisor_S, {:Supervisor_S}}, {"Leadership", {"Leadership"}}, {"Conflict", {"Conflict"}}, {"Satisfaction", {"Satisfaction"}} ) ) ); ``` #### [Quadratic Latent Growth Curve Model](#quadratic-latent-growth-curve-model) ``` dt = Open( "$SAMPLE_DATA/Academic Achievement.jmp" ); obj = dt << Structural Equation Models( Model Variables( :Multiple Choice Year1, :Multiple Choice Year2, :Multiple Choice Year3, :Multiple Choice Year4 ), Fit( Model Name( "Quadratic Growth Model" ), New Latent( "Intercept", "Slope", "QuadSlope" ), Means( {"Constant", {"Intercept", "Slope", "QuadSlope"}} ), Loadings( {"Intercept", {:Multiple Choice Year1, :Multiple Choice Year2, :Multiple Choice Year3, :Multiple Choice Year4}, {1, 1, 1, 1}}, {"Slope", {:Multiple Choice Year1, :Multiple Choice Year2, :Multiple Choice Year3, :Multiple Choice Year4}, {0, 1, 2, 3}}, {"QuadSlope", {:Multiple Choice Year1, :Multiple Choice Year2, :Multiple Choice Year3, :Multiple Choice Year4}, {0, 1, 4, 9}} ), Variances( {:Multiple Choice Year1, {:Multiple Choice Year1}}, {:Multiple Choice Year2, {:Multiple Choice Year2}}, {:Multiple Choice Year3, {:Multiple Choice Year3}}, {:Multiple Choice Year4, {:Multiple Choice Year4}}, {"Intercept", {"Intercept"}}, {"Slope", {"Slope"}}, {"QuadSlope", {"QuadSlope"}} ), Covariances( {"Intercept", {"Slope", "QuadSlope"}}, {"Slope", {"QuadSlope"}} ), Path Diagram Properties( Show Means( 1 ) ) ) ); ``` #### [Simple Linear Regression with SEM](#simple-linear-regression-with-sem) ``` dt = Open( "$SAMPLE_DATA/Job Satisfaction.jmp" ); dt << Structural Equation Models( Model Variables( :Leadership_Avg, :Satisfaction_Avg ), Fit( Model Name( "Simple Regression" ), Means( {"Constant", {:Leadership_Avg, :Satisfaction_Avg}} ), Regressions( {:Leadership_Avg, {:Satisfaction_Avg}} ), Variances( {:Leadership_Avg, {:Leadership_Avg}}, {:Satisfaction_Avg, {:Satisfaction_Avg}} ) ) ); ``` #### [Simple Mediation Model](#simple-mediation-model) ``` dt = Open( "$SAMPLE_DATA/Job Satisfaction.jmp" ); dt << Structural Equation Models( Model Variables( :Leadership_Avg, :Conflict_Avg, :Satisfaction_Avg ), Fit( Model Name( "Mediation Analysis" ), Means( {"Constant", {:Leadership_Avg, :Conflict_Avg, :Satisfaction_Avg}} ), Regressions( {:Leadership_Avg, {:Conflict_Avg, :Satisfaction_Avg}}, {:Conflict_Avg, {:Satisfaction_Avg}} ), Variances( {:Leadership_Avg, {:Leadership_Avg}}, {:Conflict_Avg, {:Conflict_Avg}}, {:Satisfaction_Avg, {:Satisfaction_Avg}} ) ) ); ``` ### [Support Vector Machines](#support-vector-machines) **Syntax:** Support Vector Machines(Y( column ), X( columns )) **Description:** Predicts a response based on the support vectors in the space of the X variables. One of the goals of the Support Vector Machines algorithm is to use training data to learn how to classify new data. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Iris.jmp" ); obj = Support Vector Machines( Y( :Species ), X( :Sepal length, :Sepal width, :Petal length, :Petal width ) ); ``` ### [Surface Plot](#surface-plot) **Syntax:** Surface Plot( Columns() ) **Description:** Produces a rotating three-dimensional plot of points or a surface defined by a saved formula. ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); obj = dt << Surface Plot( Columns( :Pred Formula ABRASION, :Pred Formula MODULUS, :Pred Formula ELONG, :Pred Formula HARDNESS ) ); ``` ### [Survival](#survival) **Syntax:** Survival( Y( columns ), Censor( column ), \ ) **Description:** Calculates estimates of survival functions using the product-limit (Kaplan-Meier) method for one or more groups. ``` dt = Open( "$SAMPLE_DATA/Rats.jmp" ); obj = dt << Survival( Y( :days ), Censor( :Censor ), Grouping( :Group ) ); ``` ### [Tabulate](#tabulate) **Syntax:** Tabulate( Add Table( Column Table( Analysis Columns( column(s) )|Grouping Columns( column(s))|Statistics( )), Row Table( Analysis Columns( column(s) )|Grouping Columns( column(s))|Statistics( )) ) **Description:** Creates a custom table of summary statistics of one or more variables. The variables can be grouped by one or more classification columns. Enables you to build the summary table using drag and drop operations. #### [Categories and stats](#categories-and-stats) ``` dt = Open( "$SAMPLE_DATA/Children's Popularity.jmp" ); obj = dt << Tabulate( Show Control Panel( 0 ), Add Table( Column Table( Grouping Columns( :gender, :goals ), Statistics( N, Column % ) ), Row Table( Grouping Columns( :Grade, :Age ) ) ) ); ``` #### [Columns by Categories](#columns-by-categories) ``` dt = Open( "$SAMPLE_DATA/Children's Popularity.jmp" ); obj = dt << Tabulate( Show Control Panel( 0 ), Add Table( Row Table( Columns by Categories( :Grades, :Sports, :Looks, :Money ) ) ) ); ``` #### [Frequency](#frequency) ``` dt = Open( "$SAMPLE_DATA/Quality Control/Failures.jmp" ); obj = dt << Tabulate( Show Control Panel( 0 ), Freq( :Count ), Add Table( Row Table( Grouping Columns( :Causes ) ) ) ); ``` #### [ID column](#id-column) ``` dt = Open( "$SAMPLE_DATA/Hybrid Fuel Economy.jmp" ); obj = dt << Tabulate( Show Control Panel( 0 ), ID( :Division ), Set Format( Uniform Format( 10, 2 ) ), Add Table( Column Table( Statistics( Sum ), Analysis Columns( :City MPG, :Hwy MPG, :Comb MPG ), Pack( Analysis Columns( City MPG, Hwy MPG, Comb MPG ), Template( "^FIRST (^OTHERS)", "/" ) ) ), Row Table( Grouping Columns( :Mfr Name ) ) ) ); ``` #### [Multiple response grouping columns](#multiple-response-grouping-columns) ``` dt = Open( "$Sample_Data/Consumer Preferences.jmp" ); obj = dt << Tabulate( Show Control Panel( 0 ), Add Table( Column Table( Grouping Columns( :Floss Delimited ), Statistics( N, "% of Total"n ) ), Row Table( Grouping Columns( :Frequency of Teeth Cleaning, :Brush Delimited ) ) ) ); ``` #### [Multiple response page column](#multiple-response-page-column) ``` dt = Open( "$Sample_Data/Big Class Families.jmp" ); obj = Tabulate( Show Control Panel( 0 ), Page Column( :family cars( "Jeep" ) ), Add Table( Column Table( Analysis Columns( :height ), Statistics( N, "% of Total"n ) ), Row Table( Grouping Columns( :sex ) ) ) ); ``` #### [Multiple row and column tables](#multiple-row-and-column-tables) ``` dt = Open( "$SAMPLE_DATA/Children's Popularity.jmp" ); obj = dt << Tabulate( Show Control Panel( 0 ), Add Table( Column Table( Grouping Columns( :gender ) ), Column Table( Grouping Columns( :race ) ), Row Table( Grouping Columns( :goals ) ), Row Table( Grouping Columns( :"Urban/Rural"n ) ) ) ); ``` #### [Multiple row tables](#multiple-row-tables) ``` dt = Open( "$SAMPLE_DATA/Children's Popularity.jmp" ); obj = dt << Tabulate( Show Control Panel( 0 ), Add Table( Row Table( Grouping Columns( :Grades ) ), Row Table( Grouping Columns( :Sports ) ), Row Table( Grouping Columns( :Looks ) ), Row Table( Grouping Columns( :Money ) ) ) ); ``` #### [Nested categories](#nested-categories) ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Tabulate( Show Control Panel( 0 ), Add Table( Column Table( Grouping Columns( :sex, :marital status ) ), Row Table( Grouping Columns( :country, :size ) ) ) ); ``` #### [Packed columns](#packed-columns) ``` dt = Open( "$SAMPLE_DATA/Hybrid Fuel Economy.jmp" ); obj = dt << Tabulate( Show Control Panel( 0 ), Add Table( Column Table( Statistics( Sum, Max ), Analysis Columns( :City MPG, :Hwy MPG, :Comb MPG ), Pack( Analysis Columns( City MPG, Hwy MPG, Comb MPG ), Template( "^FIRST (^OTHERS)", "/" ) ) ), Row Table( Grouping Columns( :Mfr Name, :Engine ) ) ) ); ``` #### [Page column](#page-column) ``` dt = Open( "$SAMPLE_DATA/Hybrid Fuel Economy.jmp" ); obj = dt << Tabulate( Show Control Panel( 0 ), Page Column( :Engine( "Gas" ) ), Add Table( Column Table( Analysis Columns( :City MPG, :Hwy MPG ), Statistics( Max ) ), Row Table( Grouping Columns( :Mfr Name ) ) ) ); ``` #### [Stacked grouping columns](#stacked-grouping-columns) ``` dt = Open( "$SAMPLE_DATA/Car Poll.jmp" ); obj = dt << Tabulate( Show Control Panel( 0 ), Add Table( Column Table( Grouping Columns( :marital status ), Add Aggregate Statistics( :marital status ), Analysis Columns( :age ), Statistics( Min, Max ) ), Row Table( Grouping Columns( :sex, :country, :size ), Add Aggregate Statistics( :sex, :country, :size ), Stack Grouping Columns( 1 ) ) ) ); ``` #### [Weight](#weight) ``` dt = Open( "$SAMPLE_DATA/Car Physical Data.jmp" ); obj = dt << Tabulate( Show Control Panel( 0 ), Weight( :Weight ), Add Table( Column Table( Analysis Columns( :Horsepower ), Statistics( Mean ) ), Row Table( Grouping Columns( :Type ) ) ) ); ``` ### [Ternary Plot](#ternary-plot) **Syntax:** Ternary Plot( Y( columns ) ) **Description:** Produces a two-dimensional plot of three mixture components that sum to a constant. ``` dt = Open( "$SAMPLE_DATA/Plasticizer.jmp" ); obj = dt << Ternary Plot( Y( :p1, :p2, :p3 ) ); ``` ### [Text Explorer](#text-explorer) **Syntax:** Text Explorer( Text Columns( columns ) ) **Description:** Parses words from text in a column, counts them, associates them with other columns, saves indicators, and graphs relationships. ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); obj = dt << Text Explorer( Text Columns( :Reasons Not to Floss ) ); ``` ### [Time Series](#time-series) **Syntax:** Time Series( Y( column ) ) **Description:** Models a series of observations over equally spaced time points. Includes a time series plot, autocorrelations, variogram, spectral density, ARIMA, seasonal ARIMA, smoothing models, and forecasts. ``` dt = Open( "$SAMPLE_DATA/Time Series/Steel Shipments.jmp" ); obj = dt << Time Series( Y( :steel shipments ) ); ``` ### [Time Series Forecast](#time-series-forecast) **Syntax:** Time Series Forecast( Y( column ) ) **Description:** Fits and forecasts multiple time series using specified methods. ``` dt = Open( "$SAMPLE_DATA/Time Series/M3C Quarterly.jmp" ); obj = dt << Time Series Forecast( Y( :Y ), Grouping( :Series ), Time( :Time ) ); ``` ### [Uplift](#uplift) **Syntax:** Uplift( Y( column ), X( columns ), Treatment( column ) ) **Description:** Fits a recursive partition tree that selects splits to maximize treatment differences. The models identify groups of individuals who are most likely to respond to a treatment. **Example 1** ``` dt = Open( "$Sample_Data/Hair Care Product.jmp" ); obj = Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Split Best( 3 ) ); ``` **Example 2** ``` dt = Open( "$Sample_Data/Hair Care Product.jmp" ); dt << Make Validation Column( Training Set( .6 ), Validation Set( .2 ), Test Set( .2 ), New Column Name( "Valid1" ), Go ); obj = dt << Uplift( Y( :Purchase ), X( :Gender, :Age, :Hair Color, :U.S. Region, :Residence ), Treatment( :Promotion ), Validation( :Valid1 ), Split Best( 3 ) ); ``` ### [Variability Chart](#variability-chart_1) **Syntax:** Variability Chart( Y( column ), X( columns ) ) **Description:** Analyzes continuous measurements to determine how your measurement system is performing. You can also perform a gauge study to see measures of variation in your data. #### [Crossed Effects Model](#crossed-effects-model) ``` dt = Open( "$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp" ); obj = dt << Variability Chart( Y( :Measurement ), Model( "Crossed" ), X( :Operator, :part# ), Variance Components( 1 ) ); ``` #### [Crossed then Nested Effects Model](#crossed-then-nested-effects-model) ``` dt = New Table( "3 Factors Crossed then Nested", Add Rows( 81 ), New Column( "Operator", Character( 7 ), "Nominal", Set Values( {"Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Clara", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Eduardo", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane", "Jane"} ), Set Display Width( 0 ) ), New Column( "Instrument", Character( 1 ), "Nominal", Set Values( {"A", "A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "C", "C", "C", "C", "C", "C", "C", "C", "C", "A", "A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "C", "C", "C", "C", "C", "C", "C", "C", "C", "A", "A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "C", "C", "C", "C", "C", "C", "C", "C", "C"} ), Set Display Width( 0 ) ), New Column( "Part", Numeric, "Nominal", Format( "Best", 8 ), Set Values( [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 22, 22, 22, 23, 23, 23, 24, 24, 24, 25, 25, 25, 26, 26, 26, 27, 27, 27] ), Set Display Width( 0 ) ), New Column( "Y", Numeric, "Continuous", Format( "Best", 8 ), Set Values( [0.5, 0.6, 0.2, 0.8, 0.6, 0.6, 1.6, 1.1, 1, 0.4, 0.2, 0.1, 0.1, 0.5, 0, 0.3, 0.6, 0.8, 0.1, 0.1, 0.2, 0.4, 0.9, 1.8, 0.1, 0.3, 0.4, 0.1, 0.3, 0.1, 0.9, 0.4, 0, 0.6, 0.7, 0.7, 0.3, 0.1, 0.2, 0.3, 0.6, 0.2, 0.2, 0.4, 0.4, 0.8, 0.3, 0.3, 2.6, 0.4, 1.6, 0.5, 0.3, 2.9, 0, 0, 0.5, 0.1, 0, 0.3, 0.5, 0, 0, 0.4, 0, 0.4, 0.3, 0.2, 0, 0, 0.5, 0.1, 0.1, 0.2, 0.3, 1.1, 0.2, 0.1, 0.6, 0.3, 0.6] ), Set Display Width( 68 ) ) ); obj = dt << Variability Chart( Y( :Y ), X( :Operator, :Instrument, :Part ), Model( "Crossed then Nested" ), Variance Components( 1 ) ); ``` #### [Decide Later on Model](#decide-later-on-model) ``` dt = Open( "$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp" ); obj = dt << Variability Chart( Y( :Measurement ), X( :Operator, :part# ) ); ``` #### [Main Effects Model](#main-effects-model) ``` dt = Open( "$SAMPLE_DATA/Variability Data/Wafer.jmp" ); obj = dt << Variability Chart( Y( :Y ), Model( "Main Effect" ), X( :Operator, :Wafer ), Variance Components( 1 ) ); ``` #### [Nested Effects Model](#nested-effects-model) ``` dt = Open( "$SAMPLE_DATA/Variability Data/2 Factors Nested.jmp" ); obj = dt << Variability Chart( Y( :Y ), Model( "Nested" ), X( :Operator, :Part ), Variance Components( 1 ) ); ``` #### [Nested then Crossed Effects Model](#nested-then-crossed-effects-model) ``` dt = Open( "$SAMPLE_DATA/Variability Data/3 Factors Nested & Crossed.jmp" ); obj = dt << Variability Chart( Y( :Y ), Model( "Nested then Crossed" ), X( :Operator, :Instrument, :Part ), Variance Components( 1 ) ); ``` ### [Virtual Join](#virtual-join) **Syntax:** Virtual Join **Description:** Links a main data table to an auxiliary data table through an ID column. Enables the main table to access columns from the auxiliary table without physically joining the tables. The Link ID column property marks a column in the auxiliary table as the ID column. The Link Reference column property maps a column in the main table to the ID column in the auxiliary table. Link Reference Property lets you set data table reference or the path of the data table that you want to link. The option 'Use Linked Column Name' will build the linked columns with the source column name instead of the fully qualified unique name. **Example 1** ``` cID = New Table( "Color IDs", Add Rows( 2 ), New Column( "ID", Numeric, Set Property( "Link ID", 1 ), Set Values( [1, 2] ) ), New Column( "color", Character, Set Values( {"magenta", "cyan"} ) ) ); cID << Save( "$temp\cID.jmp" ); Favs = New Table( "Favorite Colors", Add Rows( 4 ), New Column( "colorID", Numeric, Set Property( "Link Reference", Reference Table( "$temp\cID.jmp" ) ), Set Values( [1, 2, 1, 2] ) ), New Column( "person", Character, Set Values( {"fred", "ralph", "artemus", "neil"} ) ) ); Favs:"color[colorID]"n << hide( 0 ); // show the color column in the table, it is hidden by default Write( "\!n", Favs:person[2], " likes ", Favs:"color[colorID]"n[2] ); Favs:colorID[2] = 1; // change ralph's color by changing his color id Write( "\!n", Favs:person[2], " likes ", Favs:"color[colorID]"n[2] ); Favs:"color[colorID]"n << hide( 1 ) << hide( 0 ); Write( "\!nRalph's color changed." ); ``` **Example 2** ``` cID = New Table( "Color IDs", Add Rows( 2 ), New Column( "ID", Numeric, Set Values( [1, 2] ) ), New Column( "color", Character, Set Values( {"magenta", "cyan"} ) ) ); Favs = New Table( "Favorite Colors", Add Rows( 4 ), New Column( "colorID", Numeric, Set Values( [1, 2, 1, 2] ) ), New Column( "person", Character, Set Values( {"fred", "ralph", "artemus", "neil"} ) ) ); cID:ID << Set Property( "Link ID", 1 ); Favs:colorID << Set Property( "Link Reference", {Reference Table( cID ), options( "use linked column name" )} ); Favs:color << hide( 0 ); // show the color column in the table, it is hidden by default Write( "\!n", Favs:person[2], " likes ", Favs:color[2] ); // not Favs:"color[colorID]"n Favs:colorID[2] = 1; // change ralph's color by changing his color id Write( "\!n", Favs:person[2], " likes ", Favs:color[2] ); Write( "\!nRalph's color changed." ); ``` **Example 3** ``` cID = New Table( "Color IDs", Add Rows( 2 ), New Column( "ID", Numeric, Set Values( [1, 2] ) ), New Column( "color", Character, Set Values( {"magenta", "cyan"} ) ) ); Favs = New Table( "Favorite Colors", Add Rows( 4 ), New Column( "colorID", Numeric, Set Values( [1, 2, 1, 2] ) ), New Column( "person", Character, Set Values( {"fred", "ralph", "artemus", "neil"} ) ) ); cID:ID << Set Property( "Link ID", 1 ); Favs:colorID << Set Property( "Link Reference", {Reference Table( cID ), options( "use linked column name"(1), "auto open" )} ); Favs2 = New Table( "More Favorites", Add Rows( 4 ), New Column( "ID", Numeric, Set Values( [1, 2, 3, 4] ) ), New Column( " person", Character, Set Values( {"susie", "james", "mark", "ami"} ) ) ); // A link ID and link reference can be assigned to the same column. The option "Auto open" will // automatically open the linked tables for you when you open the main referencing table. Favs2:ID << Set Property( "Link ID", 1 ); cID:ID << Set Property( "Link Reference", {Reference Table( Favs2 ), Options( "Use Linked Column Name"(1) )} ); Favs:color << hide( 0 ); // Show the color column in the table, it is hidden by default Favs:ID << hide( 0 ); // Show the ID column in the table, from More Favorites table Write( "\!n", Favs:person[2], " likes ", Favs:color[2] ); // Not Favs:"color[colorID]"n Favs:colorID[2] = 1; // Change ralph's color by changing his color id Write( "\!n", Favs:person[2], " likes ", Favs:color[2] ); Write( "\!nRalph's color changed." ); cid:person << hide( 0 ); Write( "\!n", cID:person[2], " likes ", Favs:color[4] ); ``` ## [Item Messages](#item-messages) ### [Add Properties to Table](#add-properties-to-table) **Syntax:** obj \<< Add Properties to Table **Description:** Add the properties to the table. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Select Properties( {2, 4} ); proplist = dt << Get Selected Properties(); dt2 = New Table( "Little Class" ); dt2 << Add Properties to Table( proplist ); ``` ### [Add Scripts to Table](#add-scripts-to-table) **Syntax:** obj \<< Add Scripts to Table **Description:** This command is an alias of 'Add properties to table'. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Select Properties( {2, 4} ); proplist = dt << Get Selected Properties(); dt2 = New Table( "Little Class" ); dt2 << Add scripts to table( proplist ); ``` ### [Anonymize](#anonymize) **Syntax:** obj \<< Anonymize( columns( columns ), \ ) **Description:** Creates a new data table with unique identifiers removed. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << anonymize( columns( :name, :age ), output table name( "anonymized" ) ); ``` ### [Apply Columns List Filter To Data Grid](#apply-columns-list-filter-to-data-grid) **Syntax:** obj \<< Apply Columns List Filter To Data Grid( state=0|1 ) **Description:** Turn on to apply filters in the data table Columns list to the data grid. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << Column Filter( Column Name( "tude" ) ); Wait( 1 ); dt << Apply Columns List Filter To Data Grid( 0 ); Wait( 1 ); dt << Apply Columns List Filter To Data Grid( 1 ); ``` ### [Apply Formula](#apply-formula) **Syntax:** dt \<< Apply Formula(\[Columns(\, \[Ref()\], \[List Ref()\]\]+, \[Output(In Place|In Place Formula|New Formula(|New Static()\], \[Group()\]) **Description:** Use a formula to transform one or more columns and place the results (either as formulas or data) into new or existing columns. At least one column group must be defined (a single column, an explicit list of columns, a run of columns, or an existing column group name). The first group defined serves as the target if the output is 'in place'. If needed, you can specify a name in the formula that refers to the columns taken one at a time (Ref) or as a list of columns (ListRef). Lastly, the output type can be specified, optionally with a name and group name for new columns. **JMP Version Added:** 18 #### [New Data Columns/ListRef](#new-data-columnslistref) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); Data Table( "Big Class" ) << Apply Formula( Columns( Group( :height, 2 ), Ref( "_relative_from_height" ), ListRef( "height_to_weight" ) ), Formula( _relative_from_height / Sum( height_to_weight ) ), Output( New Static ) ); ``` #### [New Formula Columns/Grouping](#new-formula-columnsgrouping) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Apply Formula( Columns( Group( :height, 2 ), Ref( "_relative_from_height" ) ), Formula( _relative_from_height * 2 ), Output( New Formula( "result", Group( "output group" ) ) ) ); ``` #### [Simple New Formula Column](#simple-new-formula-column) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); Data Table( "Big Class" ) << Apply Formula( Columns( :height ), Formula( :height / 5 ), Output( New Formula ) ); ``` ### [Begin Data Update](#begin-data-update) **Syntax:** obj \<< Begin Data Update **Description:** Holds all Update messages until the End Data Update command is reached. This is useful for updating many cells without interruption. This applies only to changes in data cells. ``` dt = Open( "$SAMPLE_DATA/Central Limit Theorem.jmp" ); dt << Add Rows( 2000 ); dt << Distribution( Column( :"N=1"n, :"N=5"n, :"N=10"n ) ); Wait(); dt << Begin Data Update; dt << Add Rows( 2000 ); dt << End Data Update; ``` ### [Checksum](#checksum) **Syntax:** obj \<< Checksum( < Version(version) >, < Include(flags) >, < Exclude(flags) > ) **Description:** Compute the table's checksum. Available flags include: "ColData", "ColName", "ColDataType", "ColModelingType", "ColFormat", "ColInFormat", "ColFormatWidth", "ColAttributes", "ColProperties", "ColListCheck", "ColRangeCheck", "ColCompact", "ColLabel", "ColHidden", "ColExclude", "ColSelection", "ColState", "ColDisplayWidth", "TableVariables", "TableScripts", "RowExclude", "RowHidden", "RowLabel", "RowColor", "RowMarker", "RowSelection", "RowState" **JMP Version Added:** 18 **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Checksum(); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Checksum( Exclude( "ColData" ) ); ``` **Example 3** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Checksum( Include( "ColData", "ColAttributes" ) ); ``` **Example 4** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); flags = {"ColData", "ColAttributes"}; dt << Checksum( Include( flags ) ); ``` ### [Clear Cell Colors](#clear-cell-colors) **Syntax:** obj \<< Clear Cell Colors **Description:** Clear the cell color of the selected columns. If no columns are selected, cell colors of all columns are cleared. **JMP Version Added:** 15 **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); :age << Color Cells( "Red" ); a = {1, 3, 5}; b = {2, 4, 6}; :height << color cells( {{"Red", a}, {"blue", b}} ); :weight << color cells( {{"blue", a}} ); Wait( 2 ); dt << Clear cell colors( {:height, :age} ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); :age << Color Cells( "Red" ); a = {1, 3, 5}; b = {2, 4, 6}; :height << color cells( {{"Red", a}, {"blue", b}} ); :weight << color cells( {{"blue", a}} ); Wait( 2 ); dt << Clear cell colors(); ``` ### [Clear Column Selection](#clear-column-selection) **Syntax:** obj \<< Clear Column Selection **Description:** Clears the column selection in the data table. ``` dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" ); dt << Go To( :BP 12F ); Wait( 2 ); dt << Clear Column Selection(); ``` ### [Clear Edit Lock](#clear-edit-lock) **Syntax:** obj \<< Clear Edit Lock( [ \<"Modify Cells">, \<"Add rows">, \<"Add Columns">, \<"Delete Rows">, \<"Delete Columns">] ) **Description:** Allow specified operations on the data table which were previously disallowed. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Set Edit Lock( "Modify Cells", "Add Rows", "Delete Columns" ); :age << set selected( 1 ); :height << set selected( 1 ); Wait( 2 ); dt << Clear Edit Lock( "Delete Columns" ); ``` ### [Clear Properties Selection](#clear-properties-selection) **Syntax:** obj \<< Clear Properties Selection( { property1, property2, ... ) **Description:** Deselect the specified table properties, where the list can be a list of property name or indices to the properties. If no list is given, deselect all the selected properties. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); list = {"Bivariate", "Logistic"}; proplist = dt << Select Properties(); Wait( 1 ); dt << clear properties selection( list ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); list = {"Bivariate", "Logistic"}; proplist = dt << Select Properties(); Wait( 1 ); dt << clear properties selecction(); ``` ### [Clone](#clone) **Syntax:** dt \<< Clone( < Table Name(name) >, < Copy Formulas(1|0) >, < Eval Formulas(1|0) > ) **Description:** Create a copy of the data table **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dtClone = dt << Clone; ``` ### [Close Data Grid](#close-data-grid) **Syntax:** obj \<< Close Data Grid **Description:** Close or open the data grid. ``` dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" ); dt << Close Data Grid( 1 ); ``` ### [Close Side Panels](#close-side-panels) **Syntax:** obj \<< Close Side Panels **Description:** Close or open the data table's side panels. ``` dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" ); dt << Close Side Panels( 1 ); ``` ### [Close summary panels](#close-summary-panels) **Syntax:** obj \<< Close summary panels **Description:** Close or open the data table's summary panels. **JMP Version Added:** 15 ``` dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" ); dt << Close Summary Panels( 1 ); ``` ### [Cluster](#cluster) **Syntax:** obj \<< Cluster ### [Collapse All Column Groups](#collapse-all-column-groups) **Syntax:** obj \<< Collapse All Column Groups **Description:** Collapses all column groups **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" ); dt << Group Columns( "Monday", BP 8M, 3 ); dt << Group Columns( "Wednesday", BP 8W, 3 ); dt << Group Columns( "Friday", BP 8F, 3 ); dt << Expand All Column Groups; Wait( 2 ); dt << Collapse All Column Groups; ``` ### [Column Filter](#column-filter) **Syntax:** obj \<< Column Filter **Description:** Retrieves object to manipulate active column filter for the table. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Lipid Data.jmp" ); dt << Expand All Column Groups; dt:sex << Hide( 1 ); // Use immediately dt << Column Filter( Column Name( "Weight|Wt", Regular Expression( 1 ) ) ); dt << Column Filter( Tags( {"Blood Measurements", "Good Measure"} ) ); dt << Column Filter( Tags( {"Blood Measurements", "Good Measure"}, Intersection( 1 ) ) ); dt << Column Filter( Column Name( "3" ), Tags( {"Blood Measurements"} ) ); dt << Column Filter( Clear ); // Return an object and send messages later cf = dt << Column Filter; cf << Column Name( "3yr" ); cf << Get Script; // Related to (can also send to object) dt << Show Hidden Columns in Columns List( 0 ); dt << Apply Columns List Filter to Data Grid( 0 ); ``` ### [Column Switcher](#column-switcher) **Syntax:** obj \<< Column Switcher(column reference, {column reference, ...}, < Title(title) >, < Close Outline(0|1) >, < Retain Axis Settings(0|1) >, < Layout(0|1) >) **Description:** Creates a standalone column switcher **JMP Version Added:** 16 **Example 1** ``` dt = Open( "$SAMPLE_DATA/Process Measurements.jmp" ); dt << Column Switcher( :Process 1, {:Process 1, :Process 3, :Process 4, :Process 5, :Process 6, :Process 7} ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); New Window( "Bivariate", H List Box( cs = dt << Column Switcher( :age, {:age, :weight} ), V List Box( female = Bivariate( Y( :age ), X( :height ), Where( :sex == "F" ) ), male = Bivariate( Y( :age ), X( :height ), Where( :sex == "M" ) ) ) ) ); cs << Link Platform( female ); cs << Link Platform( male ); ``` **Example 3** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); New Window( "Bivariate", H List Box( cs = dt << Column Switcher( :age, {:age, :weight} ), b = Bivariate( Y( :age ), X( :height ), by( :sex ) ) ) ); cs << Link Platform( b[1] ); cs << Link Platform( b[2] ); ``` ### [Combine Columns](#combine-columns) **Syntax:** obj \<< Combine Columns **Description:** Combine several columns into a single column, with each source column's values separated by the given delimiter. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); dt << Combine Columns( delimiter( "," ), Columns( :Brush After Waking Up, :Brush After Meal, :Brush Before Sleep, :Brush Another Time ), Selected Columns are Indicator Columns( 1 ), Column Name( "When to Brush" ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Consumer Preferences.jmp" ); dt << Combine Columns( delimiter( "," ), Columns( :Brush After Waking Up, :Brush After Meal, :Brush Before Sleep, :Brush Another Time ), Column Name( "When to Brush" ) ); ``` ### [Compare Data Tables](#compare-data-tables) **Syntax:** obj \<< Compare Data Tables( Compare with( Data Table( name )), \, ,\, \, \, \ ) **Description:** Compares two open data tables and reports differences between data, as well as metadata. ``` dt = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); dt << compare data tables( compare With( Data Table( "Students2" ) ) ); ``` ### [Compress File When Saved](#compress-file-when-saved) **Syntax:** obj \<< Compress File When Saved( state=0|1 ) **Description:** Compress the file when saving the data table. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Compress File When Saved( 1 ); ``` ### [Compress Selected Columns](#compress-selected-columns) **Syntax:** obj \<< Compress Selected Columns( { column1, column2, ...} ) **Description:** Compresses each column into the most compact form. Character data will be 1-byte if there are fewer than 255 levels. Numeric data will be 1-byte if the data is between -127 and 127. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Compress Selected Columns( {:Age, :sex, :Height, :Weight} ); ``` ### [Concatenate](#concatenate) **Syntax:** obj \<< Concatenate( , , Data Table( name ), \ \, \, , ) **Description:** Combines rows from several data tables and creates a new data table or appends the rows to the first data table. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Trial1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Trial2.jmp" ); dt << Concatenate( Data Table( "Trial2" ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Students.jmp" ); dt1 = Open( "$SAMPLE_DATA/Students1.jmp" ); dt2 = Open( "$SAMPLE_DATA/Students2.jmp" ); dt << Concatenate( Data Table( dt1 ), Data Table( dt2 ), "Append to first table", "Create source column" ); ``` ### [Copy Column Properties](#copy-column-properties) **Syntax:** obj \<< Copy Column Properties( \ ) **Description:** Copies to the clipboard the column properties of selected columns into a list of separate lists of properties. Optionally, you can specify a list of source columns instead of pre-selecting them in the data table. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); dt << Select Columns( :MODULUS, :ELONG ); dt << Copy Column Properties; New Window( "Script", Script Box( "//Try Paste here " ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Tiretread.jmp" ); dt << Copy Column Properties( {:MODULUS, :ELONG} ); New Window( "Script", Script Box( "//Try Paste here " ) ); ``` ### [Copy Selected Properties](#copy-selected-properties) **Syntax:** obj \<< Copy Selected Properties **Description:** Copy the selected table properties to the clipboard. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << select properties( {"Distribution", "Oneway"} ); proplist = dt << Copy Selected Properties(); New Window( "Script", Script Box( "//Try Paste here " ) ); ``` ### [Copy Table Script](#copy-table-script) **Syntax:** obj \<< Copy Table Script( \<"No data"> ) **Description:** Copies a script to re-create the data table. The resultant script includes all the table scripts stored in the data table. Optionally, add the keyword "No Data" to omit data from the script. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Copy Table Script(); New Window( "Script", Script Box( "//Try Paste here " ) ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Copy Table Script( "No Data" ); New Window( "Script", Script Box( "//Try Paste here " ) ); ``` ### [Debug Script](#debug-script) **Syntax:** obj \<< Debug Script( name ) **Description:** Debugs a named script stored as a property in the data table. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Debug Script( "Distribution" ); ``` ### [Decision Tree](#decision-tree) **Syntax:** obj \<< Decision Tree ### [Define Tag](#define-tag) **Syntax:** Define Tag(, \[Color()\], \[Symbol()\], \[Description()\], \[Replace()\]) **Description:** Create or update a column tag definition on the table. If the tag doesn't exist, create it. Optionally assign color, symbol, and other attributes. **JMP Version Added:** 19 #### [Color, Symbol, or None](#color-symbol-or-none) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Define Tag( "ID1", Color( Red ) ); dt << Define Tag( "ID2", Symbol( "\!UD83D\!UDCCB" ) ); dt << Define Tag( "ID3" ); ``` #### [New Tag](#new-tag) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Define Tag( "ID", Color( Blue ) ); ``` #### [Replace](#replace) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Define Tag( "ID", Color( Red ) ); :height << Set Property( "Tags", {"ID"} ); dt << Define Tag( "Identifier", Replace( "ID" ), Color( Blue ) ); :height << Get Property( "Tags" ); ``` ### [Delete Columns](#delete-columns) **Syntax:** obj \<< Delete Columns( , , ... ) **Description:** Deletes the specified column(s). If no argument is specified, deletes selected columns in the data table. **JMP Version Added:** 14 **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt:height << Set Selected; Wait( 2 ); dt << Delete Columns(); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); Wait( 2 ); dt << Delete Columns( :Height ); ``` **Example 3** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); cols = {"height", "weight"}; Wait( 2 ); dt << Delete Columns( cols ); ``` ### [Delete Filter View](#delete-filter-view) **Syntax:** obj \<< Delete Filter View( name | obj ) **Description:** Delete the given filter view. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Penguins.jmp" ); fv dream = dt << New Filter View( "Dream", Active( 0 ), Data Filter( Add Filter( Columns( :Island ), Where( :Island == "Dream" ) ) ) ); fv male = dt << New Filter View( "Male", Active( 0 ), Data Filter( Add Filter( Columns( :Sex ), Where( :Sex == "MALE" ) ) ) ); Wait( 1 ); dt << Delete Filter View( fv dream ); dt << Delete Filter View( "Male" ); ``` ### [Delete Scripts](#delete-scripts) **Syntax:** obj \<< Delete Scripts( \ ) **Description:** Deletes the specified scripts from the data table. **JMP Version Added:** 14 **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << New Table Script( "New Script", Distribution( Column( :Height, :Weight ), By( :sex ) ) ); Wait( 2 ); dt << Delete Scripts( "New Script" ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); list = {"Bivariate", "Logistic"}; Wait( 2 ); dt << Delete Scripts( list ); ``` ### [Delete Table Property](#delete-table-property) **Syntax:** obj \<< Delete Table Property **Description:** Alias for Delete Scripts. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << New Table Script( "New Script", Distribution( Column( :Height, :Weight ), By( :sex ) ) ); Wait( 2 ); dt << Delete Table Property( "New Script" ); ``` ### [Delete Table Variable](#delete-table-variable) **Syntax:** obj \<< Delete Table Variable( name ) **Description:** Deletes a table variable stored in the data table. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << New Table Variable( "Days", 42 ); Wait( 2 ); dt << Delete Table Variable( "Days" ); ``` ### [Delete Tag](#delete-tag) **Syntax:** Delete Tag(|{, , ...}, \[force(0|1) **Description:** Delete a tag from the table. Tags will not be deleted if any columns still use them, unless the Force(1) flag is provided. **JMP Version Added:** 19 #### [Delete tag](#delete-tag_1) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Define Tag( "ID" ); Wait( 3 ); dt << Delete Tag( "ID" ); ``` #### [Force delete](#force-delete) ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Define Tag( "ID" ); :height << Set Property( "Tags", {"ID"} ); Wait( 3 ); dt << Delete Tag( "ID", Force( 1 ) ); ``` ### [Deselect Column Group](#deselect-column-group) **Syntax:** obj \<< Deselect Column Group( name of group | list of names ) **Description:** Deselect the column groups. If the column group is omitted, all column groups will be deselected. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << group columns( "xy", {:X, :y} ); dt << group columns( "pollutants", :Ozone :: :Lead ); dt << select column group(); Wait( 2 ); dt << deselect column group( "pollutants" ); ``` ### [Disable Undo](#disable-undo) **Syntax:** obj \<< Disable Undo( state=0|1 ) **Description:** When the option is set, any operation on the data table cannot be undone. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << disable undo( 1 ); ``` ### [End Data Update](#end-data-update) **Syntax:** obj \<< End Data Update **Description:** Sends all Update messages held since the Begin Data Update command was issued. This is useful for updating many cells without interruption. This applies only to changes in data cells. ``` dt = Open( "$SAMPLE_DATA/Central Limit Theorem.jmp" ); dt << Add Rows( 2000 ); dt << Distribution( Column( :"N=1"n, :"N=5"n, :"N=10"n ) ); Wait(); dt << Begin Data Update; dt << Add Rows( 2000 ); dt << End Data Update; ``` ### [Exclude Columns](#exclude-columns) **Syntax:** obj \<< Exclude Columns( < 0|1 > | < { column1, column2, ... } > ) **Description:** Excludes the columns from any analysis run **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Exclude Columns( 1, {:Age, :Name} ); ``` ### [Exit Filter View](#exit-filter-view) **Syntax:** obj \<< Exit Filter View **Description:** Return to the unfiltered view. If already in the unfiltered view, this has no effect. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Penguins.jmp" ); dt << New Filter View( "Dream", Data Filter( Add Filter( Columns( :Island ), Where( :Island == "Dream" ) ) ) ); Wait( 1 ); dt << Exit Filter View; ``` ### [Expand All Column Groups](#expand-all-column-groups) **Syntax:** obj \<< Expand All Column Groups **Description:** Expands all column groups **JMP Version Added:** 18 ``` dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" ); dt << Group Columns( "Monday", BP 8M, 3 ); dt << Group Columns( "Wednesday", BP 8W, 3 ); dt << Group Columns( "Friday", BP 8F, 3 ); dt << Collapse All Column Groups; Wait( 2 ); dt << Expand All Column Groups; ``` ### [Fit Model](#fit-model) **Syntax:** Fit Model( Y( columns ), Effects( columns ), Personality( "Standard Least Squares" ) ) **Description:** Fits linear regression models, including analysis of variance, logistic regression, variance components, penalized regression, stepwise regression, MANOVA, and survival models. ``` dt = Open( "$SAMPLE_DATA/Drug.jmp" ); dt << Fit Model( Y( :y ), Effects( :Drug, :x ), Personality( "Standard Least Squares" ), Run Model() ); ``` ### [Get Active Filter View](#get-active-filter-view) **Syntax:** fv = obj \<< Get Active Filter View **Description:** Get the active filter view. Returns a FilterView object. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Penguins.jmp" ); dt << New Filter View( "Dream", Data Filter( Add Filter( Columns( :Island ), Where( :Island == "Dream" ) ) ) ); fv active = dt << Get Active Filter View; Show( fv active << Get Name ); ``` ### [Get All Columns As Matrix](#get-all-columns-as-matrix) **Syntax:** obj \<< Get All Columns As Matrix **Description:** Returns the data table as a matrix. Character columns are numbered according to the sorted levels, starting at 1. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); m = dt << Get All Columns As Matrix(); Show( m ); ``` ### [Get As Report](#get-as-report) **Syntax:** obj \<< Get As Report **Description:** Returns a report of the data table. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); jmp_report = New Window( "Big Class", Text Box( "Big Class" ), H List Box( Outline Box( "Big Class", dt << Get As Report ) ), ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Select Where( :Age < 14 ); dt << Select Columns( :name, :age, :height ); jmp_report = New Window( "Big Class", Text Box( "Big Class" ), H List Box( Outline Box( "Big Class", dt << Get As Report ) ), ); ``` ### [Get Cell Height](#get-cell-height) **Syntax:** obj \<< Get Cell Height **Description:** Get a row's display height. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); ht = dt << Get Cell Height; ``` ### [Get Column Group](#get-column-group) **Syntax:** obj \<< Get Column Group( name of column group | list of names ) **Description:** Returns the list of the columns in the column group. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << group columns( "xy", {:X, :y} ); dt << group columns( "pollutants", :Ozone :: :Lead ); dt << get column group( "xy" ); ``` ### [Get Column Groups Names](#get-column-groups-names) **Syntax:** obj \<< Get Column Groups Names **Description:** Returns the names of the columns groups. ``` dt = Open( "$SAMPLE_DATA/Cities.jmp" ); dt << group columns( "xy", {:X, :y} ); dt << group columns( "pollutants", :Ozone :: :Lead ); dt << get column groups names; ``` ### [Get Column Names](#get-column-names) **Syntax:** obj \<< Get Column Names( \, \, ) **Description:** Returns the column names in the data table. If the string keyword is used, strings are returned. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); n = dt << Get Column Names(); Show( n ); CNames = dt << Get Column Names( Continuous ); Show( CNames ); SNames = dt << Get Column Names( String ); Show( SNames ); ``` ### [Get Column Reference](#get-column-reference) **Syntax:** obj \<< Get Column Reference( list of column names ) **Description:** Returns the column reference of the strings in the list **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); refList = dt << Get Column Reference( {"sex", "age"} ); Show( refList ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); a = {1, 3, 4}; refList = dt << Get Column Reference( a ); Show( refList ); ``` ### [Get Edit Lock](#get-edit-lock) **Syntax:** obj \<< Get Edit Lock **Description:** Get the list of disallowed operations on the data table. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Set Edit Lock( "Add Rows", "Delete Columns" ); Wait( 2 ); dt << Get Edit Lock(); ``` ### [Get Excluded Columns](#get-excluded-columns) **Syntax:** obj \<< Get Excluded Columns **Description:** Returns the currently excluded columns in the data table. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt:Name << Exclude; exCols = dt << Get Excluded Columns; Show( exCols ); ``` ### [Get Excluded Rows](#get-excluded-rows) **Syntax:** obj \<< Get Excluded Rows **Description:** Returns the currently excluded rows in the data table. Prefer Where. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Select Rows( 1 ); dt << Select Rows( 5 ); dt << Exclude(); r1 = dt << Get Excluded Rows(); r2 = Where( Excluded() ); Show( r1, r2 ); ``` ### [Get Filter View](#get-filter-view) **Syntax:** fv = obj \<< Get Filter View( name | \<, < Unfiltered(0|1) > ) **Description:** Get a list of all filter views. By default, the temporary and unfiltered views are not included. **JMP Version Added:** 19 ``` dt = Open( "$SAMPLE_DATA/Penguins.jmp" ); fv dream = dt << New Filter View( "Dream", Active( 0 ), Data Filter( Add Filter( Columns( :Island ), Where( :Island == "Dream" ) ) ) ); fvs = dt << Get Filter Views( Unfiltered( 1 ), Temporary( 1 ) ); Show( fvs << Get Name ); ``` ### [Get Header Height](#get-header-height) **Syntax:** obj \<< Get Header Height **Description:** Get column header's display height ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); ht = dt << Get Header Height; ``` ### [Get Hidden Columns](#get-hidden-columns) **Syntax:** obj \<< Get Hidden Columns **Description:** Returns the columns currently hidden in the data table. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt:Weight << Hide; hidCols = dt << Get Hidden Columns; Show( hidCols ); ``` ### [Get Hidden Rows](#get-hidden-rows) **Syntax:** obj \<< Get Hidden Rows **Description:** Returns the currently hidden rows in the data table. Prefer Where. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Select Rows( 1 ); dt << Select Rows( 5 ); dt << Hide(); r1 = dt << Get Hidden Rows(); r2 = Where( Hidden() ); Show( r1, r2 ); ``` ### [Get Label Columns](#get-label-columns) **Syntax:** obj \<< Get Label Columns **Description:** Returns the columns used to label rows. **JMP Version Added:** 14 ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); labelCols = dt << Get Label Columns; Show( labelCols ); ``` ### [Get Labeled Rows](#get-labeled-rows) **Syntax:** obj \<< Get Labeled Rows **Description:** Returns the currently labeled rows in the data table. Prefer Where. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << Select Rows( 1 ); dt << Select Rows( 5 ); dt << Label(); r1 = dt << Get Labeled Rows(); r2 = Where( Labeled() ); Show( r1, r2 ); ``` ### [Get Lock](#get-lock) **Syntax:** obj \<< Get Lock( state=0|1 ) **Description:** Checks whether the data table is locked. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); a = dt << get lock(); Show( a ); Wait( 1 ); dt << Lock Data Table( 1 ); a = dt << get lock(); Show( a ); ``` ### [Get MM SAS DATA Step for Formula Columns](#get-mm-sas-data-step-for-formula-columns) **Syntax:** obj \<< Get MM SAS DATA Step for Formula Columns **Description:** Creates Model Manager SAS DATA step code corresponding to formula columns in a JMP data table. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << New Column( "Ratio", Formula( :height / :weight ) ); dt << Get MM SAS Data Step for Formula Columns; ``` ### [Get Name](#get-name) **Syntax:** obj \<< Get Name( \<"Ignore Extension"> ) **Description:** Returns the display name of the data table. With the optional argument 'Ignore Extension', the command returns the name of the data table without the extension **Example 1** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); n = dt << Get Name(); Show( n ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); n = dt << Get Name( "Ignore Extension" ); Show( n ); ``` ### [Get Path](#get-path) **Syntax:** obj \<< Get Path **Description:** Returns the complete path of the data table. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); path = dt << Get Path(); Show( path ); ``` ### [Get Property](#get-property) **Syntax:** obj \<< Get Property( name ) **Description:** Returns the named property in the data table as a script. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); s = dt << Get Property( "Distribution" ); Show( s ); ``` ### [Get Row ID Width](#get-row-id-width) **Syntax:** obj \<< Get Row ID Width **Description:** Get row ID area's display width ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); ht = dt << Get Row ID Width; ``` ### [Get Row States](#get-row-states) **Syntax:** obj \<< Get Row States **Description:** Returns a vector containing encoded row state values for every row in the data table. Note that encoded row state values cannot be used as a row state structure in row state functions like Color Of. See Example 2 for a way you can use the vector directly. **Example 1** ``` dt = Open( "$SAMPLE_DATA/Cereal.jmp" ); rs = dt << Get Row States; Show( rs ); ``` **Example 2** ``` dt = Open( "$SAMPLE_DATA/Cereal.jmp" ); rs = dt << GetRowStates; w = Marker Of( As Row State( rs[3] ) ); dt2 = Open( "$SAMPLE_DATA/Big Class.jmp" ); Row State( dt2, 5 ) = Marker State( w ); ``` ### [Get Rows Where](#get-rows-where) **Syntax:** obj \<< Get Rows Where **Description:** Returns the rows in the data table matching the where criteria. Prefer Where instead. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); r1 = dt << Get Rows Where( :sex == "M" ); r2 = Where( :sex == "M" ); Show( r1, r2 ); ``` ### [Get SAS DATA Step for Formula Columns](#get-sas-data-step-for-formula-columns) **Syntax:** obj \<< Get SAS DATA Step for Formula Columns **Description:** Creates SAS DATA step code corresponding to formula columns in a JMP data table. ``` dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); dt << New Column( "Ratio", Formula( :height / :weight ) ); dt << Get SAS Data Step for Formula Columns; ``` ### [Get Script](#get-script) **Syntax:** obj \<< Get Script(