Functional Data Explorer
Functional Data Explorer Group
Example 1
Summary: Opens a data table, launches the Functional Data Explorer Group, and configures multiple explorers with specific variables, validation, and plot settings.
Code:
dt = Open("data_table.jmp");
Functional Data Explorer Group(
Functional Data Explorer(
Y( :"Size/nm"n ),
X( :Time ),
ID( :Batch ),
Z( :"%Beads"n, :"%Strength"n, :"Flow(g/min)"n, :"T(ºC)"n ),
Validation( :Run Type ),
Plot Mean( 0 ),
Plot Standard Deviation( 0 )
),
Functional Data Explorer(
Y( :"#Oversize"n ),
X( :Time ),
ID( :Batch ),
Z( :"%Beads"n, :"%Strength"n, :"Flow(g/min)"n, :"T(ºC)"n ),
Validation( :Run Type ),
Plot Mean( 0 ),
Plot Standard Deviation( 0 ),
B Splines(
Diagnostic Plots( 0 ),
Function Summaries( 0 ),
Basis Function Coefficients( 0 ),
Random Coefficients( 0 ),
Functional PCA(
1,
Score Plot( 0 ),
FPC Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
Time( 9.875, Lock( 1 ), Show( 1 ) ),
FPC 1( 0, Lock( 0 ), Show( 1 ) ),
FPC 2( 0, Lock( 0 ), Show( 1 ) ),
FPC 3( 0, Lock( 0 ), Show( 1 ) )
)
)
)
),
SendToReport( Dispatch( {}, "Data Processing", OutlineBox, {Close( 1 )} ) )
)
);
Code Explanation:
- Open data table.
- Launch Functional Data Explorer Group.
- Configure first Functional Data Explorer.
- Set Y variable: Size/nm.
- Set X variable: Time.
- Set ID variable: Batch.
- Set Z variables: %Beads, %Strength, Flow(g/min), T(ºC).
- Set validation: Run Type.
- Disable mean plot.
- Disable standard deviation plot.
Example 2
Summary: Analyze and visualize functional data explorer groups, including B-splines, Functional PCA, and generalized regression models.
Code:
Open("data_table.jmp") << Functional Data Explorer Group(
Functional Data Explorer(
Y( :"Size/nm"n ),
X( :Time ),
ID( :Batch ),
Z( :"%Beads"n, :"%Strength"n, :"Flow(g/min)"n, :"T(ºC)"n ),
Validation( :Run Type ),
B Splines(
Functional PCA(
1,
FPC Profiler(
1,
Confidence Intervals( 1 ),
Term Value( Time( 9.707, Lock( 1 ), Show( 1 ) ), FPC 1( 0, Lock( 0 ), Show( 1 ) ) )
)
),
Functional DOE Analysis(
FDOE Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
Time( 9.707, Lock( 1 ), Show( 1 ) ),
"%Beads"n( 85, Lock( 0 ), Show( 1 ) ),
"%Strength"n( 20, Lock( 0 ), Show( 1 ) ),
"Flow(g/min)"n( 350, Lock( 0 ), Show( 1 ) ),
"T(ºC)"n( 30, Lock( 0 ), Show( 1 ) )
)
),
Generalized Regression FPC Model(
FPC Number( 1 ),
Estimation Method( Best Subset ),
Validation Method( Holdback, 0.3 ),
Enforce Heredity,
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
),
SendToReport( Dispatch( {"Functional Data Explorer - Size/nm"}, "Data Processing", OutlineBox, {Close( 1 )} ) )
),
Functional Data Explorer(
Y( :"#Oversize"n ),
X( :Time ),
ID( :Batch ),
Z( :"%Beads"n, :"%Strength"n, :"Flow(g/min)"n, :"T(ºC)"n ),
Validation( :Run Type )
)
);
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Define time variable.
- Specify batch identifier.
- Include additional factors.
- Set validation method.
- Apply B-splines analysis.
- Conduct Functional PCA.
- Display FPC profiler.
- Enable confidence intervals.
- Set term values.
- Perform Functional DOE analysis.
- Launch FDOE profiler.
- Configure profiler settings.
- Define term values.
- Build generalized regression model.
- Select FPC number.
- Choose estimation method.
- Set validation method.
- Enforce heredity constraint.
- Hide model summary.
- Hide parameter estimates.
- Hide effect tests.
- Close data processing outline.
Example 1
Summary: Analyze and visualize functional data using Fourier Basis and Functional PCA, with customization options for FPC Profiler.
Code:
Open("data_table.jmp");
Functional Data Explorer(
Y( :TMAX ),
X( :Week of Year ),
ID( :NAME ),
Plot Mean( 0 ),
Plot Standard Deviation( 0 ),
Fourier Basis(
Diagnostic Plots( 0 ),
Function Summaries( 0 ),
Basis Function Coefficients( 0 ),
Random Coefficients( 0 ),
Functional PCA(
1,
FPC Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
Week Of Year( 27, Lock( 1 ), Show( 1 ) ),
FPC 1( 0, Lock( 0 ), Show( 1 ) ),
FPC 2( 0, Lock( 0 ), Show( 1 ) ),
FPC 3( 0, Lock( 0 ), Show( 1 ) )
)
)
)
),
SendToReport(
Dispatch( {}, "Data Processing", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Summaries", OutlineBox, {Close( 1 )} ),
Dispatch( {"Fourier Basis on Initial data"}, "Model Selection", OutlineBox, {Close( 1 )} ),
Dispatch( {"Fourier Basis on Initial data", "Functional PCA", "Score Plot"}, "Functional PCA", FrameBox,
{Add Pin Annotation(
Seg( Marker Seg( 1 ) ),
Index( 9 ),
Index Row( 9 ),
UniqueID( 835420409 ),
FoundPt( {207, 418} ),
Origin( {-61.5168539325843, 18.625} ),
Offset( {-88, -75} ),
Tag Line( 1 )
), Add Pin Annotation(
Seg( Marker Seg( 1 ) ),
Index( 11 ),
Index Row( 11 ),
UniqueID( 835420411 ),
FoundPt( {380, 468} ),
Origin( {84.2696629213483, 4.04166666666666} ),
Offset( {29, -7} ),
Tag Line( 1 )
), Add Pin Annotation(
Seg( Marker Seg( 1 ) ),
Index( 10 ),
Index Row( 10 ),
UniqueID( 835420410 ),
FoundPt( {155, 594} ),
Origin( {-105.337078651685, -32.7083333333333} ),
Tag Line( 1 )
)}
)
)
);
Code Explanation:
- Open data table;
- Launch Functional Data Explorer.
- Set Y variable to TMAX.
- Set X variable to Week of Year.
- Use NAME as ID.
- Disable plot mean.
- Disable plot standard deviation.
- Configure Fourier Basis.
- Enable Functional PCA.
- Customize FPC Profiler.
Example 2
Summary: Analyze and visualize ethanol data using Functional Data Explorer, applying B Splines transformation, Functional PCA, and FPC Profiler to identify patterns and trends.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :Ethanol ),
X( :Time ),
ID( :BatchID ),
Data Processing( Align 0 to 1 ),
B Splines(
Functional PCA(
1,
FPC Profiler(
1,
Confidence Intervals( 1 ),
Reorder X Variables( FPC 10, FPC 9, FPC 8, FPC 7, FPC 6, FPC 5, FPC 4, FPC 3, FPC 2, FPC 1 )
)
)
)
);
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable: Ethanol.
- Set predictor variable: Time.
- Set ID variable: BatchID.
- Align data from 0 to 1.
- Apply B Splines transformation.
- Perform Functional PCA.
- Generate FPC Profiler.
- Display confidence intervals.
Example 3
Summary: Analyze ethanol data using Functional Data Explorer, performing B Splines and Functional PCA with confidence intervals.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :Ethanol ),
X( :Time ),
ID( :BatchID ),
Data Processing( Align 0 to 1 ),
B Splines(
Functional PCA(
1,
FPC Profiler(
1,
Confidence Intervals( 1 ),
Reorder X Variables( FPC 10, FPC 9, FPC 8, FPC 7, FPC 6, FPC 5, FPC 4, FPC 3, FPC 2, FPC 1 )
)
)
)
);
obj << Redo Analysis;
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable: Ethanol.
- Set predictor variable: Time.
- Set ID variable: BatchID.
- Apply data processing: Align 0 to 1.
- Configure B Splines analysis.
- Perform Functional PCA with 1 component.
- Enable FPC Profiler with confidence intervals.
- Reorder FPC variables for visualization.
Example 4
Summary: Analyze a data table using Functional Data Explorer, performing Functional PCA and Generalized Regression FPC modeling with P Splines.
Code:
Open("data_table.jmp") << Functional Data Explorer(
Y( :Homogeneity Grade ),
X( :T ),
ID( :Formulation ),
Z( :Solvent, :Active, :Water ),
P Splines(
Functional PCA(
1,
FPC Profiler(
1,
Confidence Intervals( 1 ),
Term Value( T( 45, Lock( 1 ), Show( 1 ) ), FPC 1( 0, Lock( 0 ), Show( 1 ) ), FPC 2( 0, Lock( 0 ), Show( 1 ) ) )
)
),
Functional DOE Analysis(
FDOE Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
T( 45, Lock( 1 ), Show( 1 ) ),
Solvent( 0.5375, Lock( 0 ), Show( 1 ) ),
Active( 0.25, Lock( 0 ), Show( 1 ) ),
Water( 0.2125, Lock( 0 ), Show( 1 ) )
)
),
Generalized Regression FPC Model(
FPC Number( 1 ),
Estimation Method( Best Subset ),
Validation Method( AICc ),
Enforce Heredity,
Force( [1 1 1 0 0 0 0 0 0 0] ),
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
),
Generalized Regression FPC Model(
FPC Number( 2 ),
Estimation Method( Best Subset ),
Validation Method( AICc ),
Enforce Heredity,
Force( [1 1 1 0 0 0 0 0 0 0] ),
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
);
Code Explanation:
- Open data table;
- Launch Functional Data Explorer.
- Set response variable.
- Define time variable.
- Specify ID variable.
- List covariates.
- Configure P Splines.
- Perform Functional PCA.
- Create FPC Profiler.
- Set confidence intervals.
Example 5
Summary: Analyze oversize data by applying B-splines and Functional PCA to identify trends and patterns.
Code:
Open("data_table.jmp") << Functional Data Explorer(
Y( :"#Oversize"n ),
X( :Time ),
ID( :Batch ),
Z( :"%Beads"n, :"%Strength"n, :"Flow(g/min)"n, :"T(ºC)"n ),
Validation( :Run Type ),
Data Processing( Load Targets( 2905 ) ),
B Splines(
Functional PCA(
1,
AICc( 0 ),
BIC( 0 ),
GCV( 0 ),
FPC Profiler(
1,
Confidence Intervals( 1 ),
"#Oversize"n << Response Limits(
{Lower( -100000000, 1 ), Middle( 682649666.256783, 1 ), Upper( 1465299332.51357, 1 ), Goal( "None" ), Importance( 1 )}
),
Difference from Target 2905 << Response Limits(
{Lower( -600000000, 1 ), Middle( 0, 1 ), Upper( 600000000, 1 ), Goal( "None" ), Importance( 1 )}
),
Integrated Error from Target 2905 << Response Limits(
{Lower( -100000000, 0.9819 ), Middle( 300000000, 0.5 ), Upper( 700000000, 0.066 ), Goal( "Minimize" ), Importance( 1 )}
),
Term Value( Time( 9.875, Lock( 1 ), Show( 1 ) ), FPC 1( 0, Lock( 0 ), Show( 1 ) ), FPC 2( 0, Lock( 0 ), Show( 1 ) ) )
)
),
Customize Function Summaries( Number of FPCs( 2 ) )
),
SendToReport( Dispatch( {}, "Data Processing", OutlineBox, {Close( 1 )} ) )
);
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Define time variable.
- Specify batch identifier.
- Include control variables.
- Set validation method.
- Load target values.
- Apply B-splines method.
- Perform Functional PCA.
Example 6
Summary: Analyze a functional data explorer by applying B Splines and performing Functional PCA to model relationships between 'Size/nm', 'Time', and other variables, while validating results against target values.
Code:
Open("data_table.jmp") << Functional Data Explorer(
Y( :"Size/nm"n ),
X( :Time ),
ID( :Batch ),
Z( :"%Beads"n, :"%Strength"n, :"Flow(g/min)"n, :"T(ºC)"n ),
Validation( :Run Type ),
Data Processing( Load Targets( 2905 ) ),
B Splines(
Functional PCA(
1,
AICc( 0 ),
BIC( 0 ),
GCV( 0 ),
FPC Profiler(
1,
Confidence Intervals( 1 ),
"Size/nm"n << Response Limits(
{Lower( 50, 1 ), Middle( 186.425, 1 ), Upper( 322.85, 1 ), Goal( "None" ), Importance( 1 )}
),
Difference from Target 2905 << Response Limits(
{Lower( -125, 1 ), Middle( 0, 1 ), Upper( 125, 1 ), Goal( "None" ), Importance( 1 )}
),
Integrated Error from Target 2905 << Response Limits(
{Lower( -25, 0.9819 ), Middle( 50, 0.5 ), Upper( 125, 0.066 ), Goal( "Minimize" ), Importance( 1 )}
),
Term Value( Time( 9.71, Lock( 1 ), Show( 1 ) ), FPC 1( 10, Lock( 0 ), Show( 1 ) ) )
)
)
)
);
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set Y variable.
- Set X variable.
- Set ID variable.
- Define Z variables.
- Specify validation method.
- Load target data.
- Apply B Splines.
- Perform Functional PCA.
Example 7
Summary: Creates and configures a Functional Data Explorer for simple spline data analysis, utilizing B Splines method.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Data Format( Row ),
Y(
:Name( "1980" ), :Name( "1984" ), :Name( "1988" ), :Name( "1992" ), :Name( "1996" ), :Name( "2000" ), :Name( "2004" ),
:Name( "2008" ), :Name( "2012" )
),
ID( :State ),
B Splines
);
Close( dt, No Save );
dt = New Table( "Simple Spline Data", New Column( "x", Values( 0 :: 10 ) ), New Column( "y", Formula( Random Normal() ) ) );
obj = dt << Functional Data Explorer( Data Format( Column ), Y( :x, :y ), B Splines );
Code Explanation:
- Open data table;
- Launch Functional Data Explorer.
- Set data format to row.
- Define Y variables for election years.
- Set ID variable to "State".
- Use B Splines method.
- Close table without saving.
- Create new table "Simple Spline Data".
- Add column "x" with values 0 to 10.
- Add column "y" with random normal formula.
Example 8
Summary: Sets up a Functional Data Explorer to analyze data across states, using B Splines and specifying Y variables for years.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Data Format( Row ),
Y(
:Name( "1980" ), :Name( "1984" ), :Name( "1988" ), :Name( "1992" ), :Name( "1996" ), :Name( "2000" ), :Name( "2004" ),
:Name( "2008" ), :Name( "2012" )
),
ID( :State ),
B Splines
);
Close( dt, No Save );
a = 1;
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set data format to row.
- Specify Y variables for years.
- Identify ID variable as State.
- Use B Splines method.
- Close data table without saving.
- Assign value 1 to variable a.
Example 9
Summary: Runs the exploration and modeling of data using Functional Data Explorer, adding B Splines, P Splines, and Fourier Basis models.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :TAVG ), X( :Week of Year ), ID( :STATION ) );
obj << B Splines;
obj << P Splines;
obj << Fourier Basis;
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set Y variable to TAVG.
- Set X variable to Week of Year.
- Set ID variable to STATION.
- Add B Splines model.
- Add P Splines model.
- Add Fourier Basis model.
Example 10
Summary: Opens a data table and launches the Functional Data Explorer to visualize and explore relationships between 'kHours' and 'event time', filtered by 'System ID'.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :kHours, :event time ), ID( :System ID ) );
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
Example 11
Summary: Launches Functional Data Explorer with event time as Y variable and System ID as ID variable, allowing for interactive exploration of data.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :event time ), ID( :System ID ) );
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set event time as Y variable.
- Set System ID as ID variable.
Example 12
Summary: Creates a Functional Data Explorer to analyze data across states, using B Splines method and setting ID variable to State.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Data Format( Row ),
Y(
:Name( "1980" ), :Name( "1984" ), :Name( "1988" ), :Name( "1992" ), :Name( "1996" ), :Name( "2000" ), :Name( "2004" ),
:Name( "2008" ), :Name( "2012" )
),
ID( :State ),
B Splines
);
Code Explanation:
- Open table.
- Create Functional Data Explorer.
- Set data format to row.
- Define Y variables for years.
- Set ID variable to State.
- Use B Splines method.
Example 13
Summary: Launches Functional Data Explorer with TAVG as the response variable, DATE as the predictor variable, and STATION as the ID variable using P Splines method.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :TAVG ), X( :DATE ), ID( :STATION ), P Splines );
Code Explanation:
- Open data table.
- Assign table to variable
dt. - Launch Functional Data Explorer.
- Set response variable to TAVG.
- Set predictor variable to DATE.
- Set ID variable to STATION.
- Use P Splines method.
Example 14
Summary: Creates a B Splines model with 2 knots for the 'weight' variable in a data table, using GCV for model selection.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :weight ),
X( :weight ),
B Splines( Knot Locations( [93, 120] ), GCV, Select Model( Knots( 2 ) ) )
);
Code Explanation:
- Open data table;
- Launch Functional Data Explorer.
- Set Y variable to "weight".
- Set X variable to "weight".
- Use B Splines method.
- Specify knot locations at 93 and 120.
- Use GCV for model selection.
- Select model with 2 knots.
Example 15
Summary: Explores a functional data relationship using P Splines and Generalized Cross-Validation.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :weight ), X( :weight ), P Splines( GCV ) );
Code Explanation:
- Open data table;
- Assign data table to variable.
- Launch Functional Data Explorer.
- Set response variable to weight.
- Set predictor variable to weight.
- Use P Splines method.
- Apply Generalized Cross-Validation.
Example 16
Summary: Processes and analyzes data using B Splines in JMP's Functional Data Explorer, generating a report with dynamic time warping and row alignment.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Ethanol ), X( :Time ), ID( :BatchID ), Validation( :Validation ), B Splines );
rpt = obj << report;
scptObj = rpt[Outline Box( "B-Spline on Initial data" )] << get scriptable object;
scptObj << Remove Fit;
obj << B Splines;
obj << (Model["B Splines"] << Remove Fit);
obj << Data Processing( Dynamic Time Warping( Reference( 100 ) ) );
obj << Data Processing( Row Alignment );
obj << Data Processing( Align Range 0 to 1 );
obj << Data Processing( Range 0 to 1 );
obj << Data Processing( Dynamic Time Warping( Reference( 5 ) ) );
obj << Data Processing( Range 0 to 1 );
Code Explanation:
- Open table.
- Launch Functional Data Explorer.
- Set response variable.
- Set time variable.
- Set ID variable.
- Set validation variable.
- Use B Splines.
- Get report object.
- Access B-Spline outline box.
- Remove fit from scriptable object.
Example 17
Summary: Launches Functional Data Explorer to analyze data table relationships, setting variables for Y, X, ID, Z, and validation, with B-splines method applied.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Flow ), X( :Order ), ID( :Wafer Id ), Z( :Condition ), Validation( :Validation ), B Splines );
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set Y variable.
- Set X variable.
- Set ID variable.
- Set Z variable.
- Set validation variable.
- Use B-splines method.
Example 18
Summary: Analyze a data table using Functional Data Explorer, generating a report with P Splines model controls and interactive buttons.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :Homogeneity Grade ),
X( :T ),
ID( :Formulation ),
Z( :Solvent, :Active, :Water ),
Data Processing( Dynamic Time Warping( Reference( 1 ) ) ),
P Splines Model Controls,
);
rpt = obj << report;
rpt[Outline Box( "Model Controls" )][Button Box( 4 )] << Click();
Code Explanation:
- Open data table;
- Launch Functional Data Explorer.
- Set response variable.
- Define time variable.
- Specify ID variable.
- Include covariates.
- Apply dynamic time warping.
- Use P splines model.
- Generate report.
- Click on specific button.
Example 19
Summary: Analyze three temperature variables (TMIN, TMAX, and TAVG) using Functional Data Explorer in JMP, with Fourier basis, Functional PCA, and FPC Profiler configurations.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :TMIN ),
X( :Week of Year ),
ID( :NAME ),
Data Processing( Center ),
Fourier Basis(
Functional PCA(
1,
FPC Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
:Week of Year( 27, N Levels( 53 ), Lock( 1 ), Show( 1 ) ),
FPC 1( 0, Lock( 0 ), Show( 1 ) ),
FPC 2( 0, Lock( 0 ), Show( 1 ) )
)
)
)
)
);
obj = dt << Functional Data Explorer(
Y( :TMAX ),
X( :Week of Year ),
ID( :NAME ),
Data Processing( Center ),
Fourier Basis(
Functional PCA(
1,
FPC Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
:Week of Year( 27, N Levels( 53 ), Lock( 1 ), Show( 1 ) ),
FPC 1( 0, Lock( 0 ), Show( 1 ) ),
FPC 2( 0, Lock( 0 ), Show( 1 ) )
)
)
)
)
);
obj = dt << Functional Data Explorer(
Y( :TAVG ),
X( :Week of Year ),
ID( :NAME ),
Data Processing( Center ),
Fourier Basis(
Functional PCA(
1,
FPC Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
:Week of Year( 27, N Levels( 53 ), Lock( 1 ), Show( 1 ) ),
FPC 1( 0, Lock( 0 ), Show( 1 ) ),
FPC 2( 0, Lock( 0 ), Show( 1 ) )
)
)
)
)
);
Code Explanation:
- Open data table.
- Launch Functional Data Explorer for TMIN.
- Set Y to TMIN.
- Set X to Week of Year.
- Set ID to NAME.
- Center data processing.
- Use Fourier basis.
- Perform Functional PCA.
- Configure FPC Profiler.
- Display confidence intervals.
- Set term values for Week of Year.
- Show FPC 1 and FPC 2 terms.
- Repeat steps 2-12 for TMAX.
- Repeat steps 2-12 for TAVG.
Example 20
Summary: Explores and analyzes ethanol data using Functional Data Explorer, with B Splines method applied to model relationships between time and response variable.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :Ethanol ),
X( :Time ),
ID( :BatchID ),
B Splines( Knots( [0.18, 0.37, 0.73, 1.47, 2.20, 2.94, 4.41, 5.88] ) )
);
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Set time variable.
- Set ID variable.
- Use B Splines method.
- Define knot positions.
Example 21
Summary: Runs the analysis and processing of a data table by opening it, launching Functional Data Explorer, setting variables, removing zero values, disabling automatic recalculation, resetting the random seed, selecting and deleting rows, and closing the window.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Ethanol ), X( :Time ), ID( :BatchID ), Data Processing( Remove Zeros ) );
obj << Automatic Recalc( 0 );
Random Reset( 123456789 );
dt << Select Randomly( 0.1 ) << Delete Rows();
obj << close window;
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable to Ethanol.
- Set time variable to Time.
- Set ID variable to BatchID.
- Remove zero values from data.
- Disable automatic recalculation.
- Reset random seed.
- Randomly select and delete 10% of rows.
- Close the Functional Data Explorer window.
Example 22
Summary: Launches Functional Data Explorer to analyze relationships between Homogeneity Grade and T, with Formulation as an ID variable, using B Splines method.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Homogeneity Grade ), X( :T ), ID( :Formulation ), B Splines );
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Set predictor variable.
- Specify ID variable.
- Use B Splines method.
Example 23
Summary: Explores and filters data for election results by state, utilizing the Functional Data Explorer to define Y variables and apply a local data filter.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Data Format( Row ),
Y( :"1980"n, :"1984"n, :"1988"n, :"1992"n, :"1996"n, :"2000"n, :"2004"n, :"2008"n, :"2012"n ),
ID( :State ),
Local Data Filter( Add Filter( columns( :"1980"n ), Where( :"1980"n >= 30 & :"1980"n <= 30 ) ) )
);
rpt = Current Data Table();
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set data format to row.
- Define Y variables for election years.
- Set ID variable to State.
- Add local data filter for 1980 election.
- Filter where 1980 results are 30.
- Assign current data table to rpt variable.
Example 24
Summary: Launches Functional Data Explorer to analyze data table 'data_table.jmp', setting Y variable to TAVG, X variable to Week of Year, and ID variable to NAME.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :TAVG ), X( :Week of Year ), ID( :NAME ), );
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set Y variable to TAVG.
- Set X variable to Week of Year.
- Set ID variable to NAME.
Example 25
Summary: Runs the analysis and processing of a data table, including filtering out values above 95 and updating overall statistics.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :weight ) );
rpt = obj << report;
frame = rpt[Frame Box( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg1 = seg << Get Y Values;
overall1 = rpt[Outline Box( "Overall" )][Number Col Box( 1 )] << get as matrix;
obj << Data Processing( Remove Value( 95 ) );
frame = rpt[Frame Box( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg2 = seg << Get Y Values;
overall2 = rpt[Outline Box( "Overall" )][Number Col Box( 1 )] << get as matrix;
Code Explanation:
- Open data table;
- Launch Functional Data Explorer on weight.
- Retrieve the report object.
- Access the first frame box.
- Find segment with marker 1.
- Extract Y values from segment.
- Get overall statistics as matrix.
- Remove value 95 from data.
- Refresh the first frame box.
- Find segment with marker 1 again.
- Extract new Y values from segment.
- Get updated overall statistics as matrix.
Example 26
Summary: Explores data and filtering in JMP, extracting overall reports and counting rows based on specific conditions.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Air ), X( :Time ), ID( :BatchID ) );
rpt = obj << report;
overall = rpt[Outline Box( "Overall" )][Number Col Box( 1 )] << get as matrix;
rows0.25 = N Rows( (dt << Select Where( :Time < 0.25 )) << get selected rows() );
obj << Data Processing( Filter X( [0.25, .] ) );
overall0.25 = rpt[Outline Box( "Overall" )][Number Col Box( 1 )] << get as matrix;
rows11 = N Rows( (dt << Select Where( :Time > 11 )) << get selected rows() );
obj << Data Processing( Filter X( [., 11] ) );
overall11 = rpt[Outline Box( "Overall" )][Number Col Box( 1 )] << get as matrix;
rpt[Outline Box( "Steps" )][Button Box( 1 )] << Click();
rpt[Outline Box( "Steps" )][Button Box( 1 )] << Click();
rows8000 = N Rows( (dt << Select Where( :Air > 8000 )) << get selected rows() );
obj << Data Processing( Filter Y( [., 8000] ) );
overall8000 = rpt[Outline Box( "Overall" )][Number Col Box( 1 )] << get as matrix;
rows2000 = N Rows( (dt << Select Where( :Air < 2000 )) << get selected rows() );
obj << Data Processing( Filter Y( [2000, .] ) );
overall2000 = rpt[Outline Box( "Overall" )][Number Col Box( 1 )] << get as matrix;
Code Explanation:
- Open table.
- Launch Functional Data Explorer.
- Extract overall report.
- Count rows where Time < 0.25.
- Filter data for X > 0.25.
- Extract updated overall report.
- Count rows where Time > 11.
- Filter data for X < 11.
- Extract updated overall report.
- Click button twice in Steps outline box.
- Count rows where Air > 8000.
- Filter data for Y < 8000.
- Extract updated overall report.
- Count rows where Air < 2000.
- Filter data for Y > 2000.
- Extract updated overall report.
Example 27
Summary: Creates a Functional Data Explorer object to analyze and visualize data from a column-formatted table, using Fourier basis for analysis.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Data Format( Column ), Y( :Sepal length, :Sepal width, :Petal length, :Petal width ), Fourier Basis );
Code Explanation:
- Open data table;
- Create Functional Data Explorer object.
- Set data format to column.
- Specify response variables.
- Use Fourier basis for analysis.
Example 28
Summary: Analyze election data by opening a table, launching Functional Data Explorer, and defining Y variables for specific years.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Data Format( Row ),
Y(
:Name( "1980" ), :Name( "1984" ), :Name( "1988" ), :Name( "1992" ), :Name( "1996" ), :Name( "2000" ), :Name( "2004" ),
:Name( "2008" ), :Name( "2012" )
),
ID( :State ),
Fourier Basis
);
Code Explanation:
- Open table.
- Launch Functional Data Explorer.
- Set data format to row.
- Define Y variables for election years.
- Set ID variable to State.
- Use Fourier Basis method.
Example 29
Summary: Launches Functional Data Explorer with specified variables and Fourier Basis, enabling interactive analysis.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :TAVG ), X( :Week of Year ), ID( :NAME ), Fourier Basis );
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set Y variable.
- Set X variable.
- Set ID variable.
- Use Fourier Basis.
Example 30
Summary: Process of generating a Functional PCA report with eigenvalues from a data table, utilizing P Splines model and 100 knots.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Data Format( Column ),
Y( :Sepal length, :Sepal width, :Petal length, :Petal width ),
P Splines( Select Model( Knots( 100 ) ) ),
);
rpt = obj << report;
eigVal = rpt[Outline Box( "Functional PCA" )][Number Col Box( "Eigenvalue" )] << get as matrix;
Code Explanation:
- Open data table;
- Launch Functional Data Explorer.
- Set data format to column.
- Define Y variables.
- Use P Splines model.
- Specify 100 knots.
- Generate report.
- Extract Functional PCA outline.
- Retrieve Eigenvalue number column.
- Convert to matrix.
Example 31
Summary: Analyze and visualize functional data by opening a data table, launching Functional Data Explorer, and generating a report with eigenvalues.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Ethanol ), X( :Time ), ID( :BatchID ), P Splines );
rpt = obj << report;
eigVal = rpt[Outline Box( "Functional PCA" )][Number Col Box( "Eigenvalue" )] << get as matrix;
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Set time variable.
- Set ID variable.
- Choose P Splines method.
- Generate report object.
- Access Functional PCA outline.
- Retrieve Eigenvalue column box.
- Convert to matrix.
Example 32
Summary: Launches Functional Data Explorer with B-splines method and saves the script to Script Window, then extracts and closes the script.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Data Format( Column ), Y( :Sepal length, :Sepal width, :Petal length, :Petal width ), B Splines );
obj << Save Script to Script Window;
For( i = 1, i <= N Items( Window() ), i++,
If( (Window()[i] << get window title) == "Script Window",
txt = Window()[i][Script Box( 1 )] << get text;
Window()[i] << Close Window;
Break();
)
);
Code Explanation:
- Open data table;
- Launch Functional Data Explorer.
- Set data format to columns.
- Define response variables.
- Use B-splines method.
- Save script to Script Window.
- Loop through all windows.
- Check for Script Window.
- Extract script text.
- Close Script Window.
Example 33
Summary: Launches Functional Data Explorer to analyze data table 'data_table.jmp' with Y variable set to :TAVG, X variable set to :Week of Year, and ID variable set to :STATION.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :TAVG ), X( :Week of Year ), ID( :STATION ) );
Code Explanation:
- Open data table;
- Launch Functional Data Explorer.
- Set Y variable.
- Set X variable.
- Set ID variable.
Example 34
Summary: Analyze a data table by launching Functional Data Explorer and setting variables for Y, X, and ID, using Fourier Basis to explore relationships.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :TAVG ), X( :Week of Year ), ID( :STATION ), Fourier Basis );
dt1 = Current Data Table();
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set Y variable.
- Set X variable.
- Set ID variable.
- Use Fourier Basis.
- Assign current data table.
Example 35
Summary: Cutomizes function summaries in a data table using B Splines and retrieves a report object.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :TAVG ),
X( :Week of Year ),
ID( :STATION ),
B Splines(
Customize Function Summaries(
Number of FPCs( 3 ),
Mean( 0 ),
Std Dev( 0 ),
Integrated Difference( 0 ),
Median( 0 ),
Minimum( 0 ),
Maximum( 0 )
)
)
);
rpt = obj << report;
For( i = 4, i <= 16, i++,
visible = rpt[Outline Box( "Function Summaries" )][Number Col Box( i )] << get visibility
);
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Set predictor variable.
- Set ID variable.
- Use B Splines method.
- Customize function summaries.
- Set number of FPCs.
- Set mean to 0.
- Retrieve report object.
Example 36
Summary: Generates function summaries for a data table using B Splines and customizes summary statistics, disabling FPCs and mean calculation.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :TAVG ),
X( :Week of Year ),
ID( :STATION ),
B Splines(
Customize Function Summaries(
FPC 1( 0 ),
FPC 2( 0 ),
FPC 3( 0 ),
FPC 4( 0 ),
FPC 5( 0 ),
FPC 6( 0 ),
FPC 7( 0 ),
FPC 8( 0 ),
FPC 9( 0 ),
FPC 10( 0 ),
Mean( 0 ),
Std Dev( 0 ),
Integrated Difference( 0 ),
Median( 0 ),
Minimum( 0 ),
Maximum( 0 )
)
)
);
rpt = obj << report;
visible = rpt[Outline Box( "Function Summaries" )][Number Col Box( 14 )] << get visibility;
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Set predictor variable.
- Set ID variable.
- Use B Splines method.
- Customize function summaries.
- Disable all FPCs.
- Disable mean calculation.
- Retrieve visibility status.
Example 37
Summary: Runs data processing and report generation by opening a JMP data table, launching the Functional Data Explorer, setting variables, generating a report, and capturing log output.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Temp ), X( :Time ), ID( :BatchID ), );
rpt = obj << report;
scptObj = rpt[Outline Box( "Data Processing" )] << get scriptable object;
lCap = Words( Log Capture( scptObj << Remove Zeros ), "\!N" );
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set Y variable.
- Set X variable.
- Set ID variable.
- Generate report.
- Access Data Processing outline box.
- Get scriptable object.
- Log capture output.
- Extract non-zero values.
Example 38
Summary: Analyze ethanol data using Functional Data Explorer, retrieving fit statistics and basis function coefficients.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Ethanol ), X( :Time ), ID( :BatchID ), P Splines );
rpt = obj << report;
fStat = rpt[Outline Box( "Fit Statistics" )][Number Col Box( 1 )] << get as matrix;
est = rpt[Outline Box( "Basis Function Coefficients" )][Table Box( 1 )] << get as matrix;
nObs = N Rows( dt );
nPar = 2 * N Rows( est );
neg2LnL = fStat[3];
bic = neg2LnL + nPar * Log( nObs );
aic = 2 * nPar + neg2LnL;
aicc = aic + 2 * nPar * (nPar + 1) / (nObs - nPar - 1);
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable to Ethanol.
- Set predictor variable to Time.
- Set ID variable to BatchID.
- Use P Splines method.
- Retrieve fit statistics report.
- Extract basis function coefficients.
- Count number of observations.
- Calculate model parameters and statistics.
Example 39
Summary: Analyze a data table using Functional Data Explorer, configuring B Splines method with diagnostic plots, model summary, and functional PCA disabled.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :TMAX ),
X( :Week of Year ),
ID( :NAME ),
B Splines( Diagnostic Plots( 0 ), Model Summary( 0 ), Functional PCA( 0 ) )
);
rpt = obj << report;
ifBox8 = rpt[If Box( 19 )] << get;
ifBox11 = rpt[If Box( 22 )] << get;
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set Y variable.
- Set X variable.
- Set ID variable.
- Use B Splines method.
- Disable diagnostic plots.
- Disable model summary.
- Disable functional PCA.
- Get If Box 19 report.
- Get If Box 22 report.
Example 40
Summary: Analyze functional data by generating a report with customized function summaries and extracting FPC values as a matrix.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :TAVG ),
X( :Week of Year ),
ID( :STATION ),
B Splines( Customize Function Summaries( Number of FPCs( 7 ) ) )
);
rpt = obj << report;
fpc = rpt[Number Col Box( "FPC" )] << get as matrix;
Code Explanation:
- Open table.
- Launch Functional Data Explorer.
- Set Y variable.
- Set X variable.
- Set ID variable.
- Use B Splines method.
- Customize function summaries.
- Set number of FPCs to 7.
- Generate report.
- Extract FPC values as matrix.
Example 41
Summary: Analyzes and creates reports for fit statistics for a functional data explorer model, utilizing P Splines method.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Y ), X( :Days ), ID( :Patient ), P Splines );
rpt = obj << report;
stats = rpt[Outline Box( "Fit Statistics" )][Number Col Box( 1 )] << get as matrix;
Code Explanation:
- Open data_table data
- Launch Functional Data Explorer.
- Set response variable.
- Set time variable.
- Set subject identifier.
- Use P Splines method.
- Generate report.
- Extract fit statistics outline.
- Access first number column box.
- Retrieve statistics as matrix.
Example 42
Summary: Fits a B-spline curve to data and extracting fit statistics, utilizing the Functional Data Explorer platform in JMP.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :weight ), X( :weight ), B Splines( Knots( [10] ), Degree( [1] ) ) );
rpt = obj << report;
stats = rpt[Outline Box( "Fit Statistics" )][Number Col Box( 1 )] << get as matrix;
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Set predictor variable.
- Use B Splines method.
- Specify knot locations.
- Set spline degree.
- Generate report object.
- Extract fit statistics outline.
- Retrieve number column box content.
Example 43
Summary: Generates a B-spline regression report with fit statistics, using the Functional Data Explorer platform in JMP.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :weight ), X( :weight ), B Splines( Knots( [10] ), Degree( [2] ) ) );
rpt = obj << report;
stats = rpt[Outline Box( "Fit Statistics" )][Number Col Box( 1 )] << get as matrix;
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set Y variable to weight.
- Set X variable to weight.
- Use B Splines method.
- Specify 10 knots.
- Set degree to 2.
- Generate report.
- Extract Fit Statistics outline box.
- Retrieve first number column as matrix.
Example 44
Summary: Creates a Functional Data Explorer object to model and report on weight data, utilizing B Splines with 4 knots and degree 3.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :weight ), X( :weight ), B Splines( Knots( [4] ), Degree( [3] ) ) );
rpt = obj << report;
stats = rpt[Outline Box( "Fit Statistics" )][Number Col Box( 1 )] << get as matrix;
Code Explanation:
- Open data table.
- Create Functional Data Explorer object.
- Set Y variable to weight.
- Set X variable to weight.
- Use B Splines method.
- Define 4 knots.
- Set spline degree to 3.
- Generate report from object.
- Extract "Fit Statistics" outline box.
- Retrieve first number column box as matrix.
Example 45
Summary: Launches Functional Data Explorer to generate a report with B Splines model, sets number of splines to 42, and interacts with buttons and list box.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :TAVG ), X( :Week of Year ), ID( :STATION ), B Splines );
rpt = obj << report;
rpt[Outline Box( "Model Controls" )][Number Edit Box( 1 )] << Set( 42 );
rpt[Outline Box( "Model Controls" )][Button Box( 1 )] << Click();
rpt[Outline Box( "Model Controls" )][Button Box( 4 )] << Click();
grid = rpt[Outline Box( "Model Controls" )][List Box Box( 1 )] << get items;
Code Explanation:
- Open table.
- Launch Functional Data Explorer.
- Set Y variable.
- Set X variable.
- Set ID variable.
- Choose B Splines model.
- Generate report.
- Set number of splines to 42.
- Click on first button.
- Click on fourth button.
- Get grid items.
Example 46
Summary: Runs the exploration and reporting of functional relationships in a dataset, utilizing P Splines method with BIC criterion.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :weight ), X( :weight ), P Splines( BIC ) );
rpt = obj << report;
summ = rpt[Outline Box( "Function Summaries" )][Table Box( 1 )] << get as matrix;
Code Explanation:
- Open table.
- Launch Functional Data Explorer.
- Set Y variable.
- Set X variable.
- Use P Splines method.
- Select BIC criterion.
- Generate report.
- Extract Function Summaries.
- Access first Table Box.
- Convert to matrix.
Example 47
Summary: Runs the Functional Data Explorer to analyze and report on the relationship between weight variables, utilizing P Splines method with BIC model selection.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :weight ), X( :weight ), Data Processing( Align Range 0 to 1 ), P Splines( BIC ) );
rpt = obj << report;
summ = rpt[Outline Box( "Function Summaries" )][Table Box( 1 )] << get as matrix;
Code Explanation:
- Open data table;
- Launch Functional Data Explorer.
- Set Y variable as weight.
- Set X variable as weight.
- Apply data processing: Align Range 0 to 1.
- Use P Splines method.
- Select BIC for model selection.
- Retrieve the report object.
- Access Function Summaries outline box.
- Extract Table Box 1 as matrix.
Example 48
Summary: Analyze ethanol data by opening a data table, launching Functional Data Explorer, and generating a report with dynamic time warping.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :Ethanol ),
X( :Time ),
ID( :BatchID ),
Validation( :Validation ),
Data Processing( Dynamic Time Warping( Reference( 1 ) ) )
);
rpt = obj << report;
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Set time variable.
- Set ID variable.
- Specify validation column.
- Apply dynamic time warping.
- Generate report.
Example 49
Summary: Analyze and visualize ethanol data by opening a data table, launching Functional Data Explorer, and generating a report with dynamic time warping.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :Ethanol ),
X( :Time ),
ID( :BatchID ),
Validation( :Validation ),
Data Processing( Dynamic Time Warping( Reference( 10 ) ) ),
);
rpt = obj << report;
step = rpt[Outline Box( "Steps" )][List Box Box( 1 )] << get items;
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Set time variable.
- Set ID variable.
- Specify validation column.
- Apply dynamic time warping.
- Generate report object.
- Extract steps outline box.
- Retrieve list box items.
Example 50
Summary: Creates a report with initial data plots for each column in a table, utilizing Functional Data Explorer and report generation.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Data Format( Column ),
Y(
:Name( "1980" ), :Name( "1984" ), :Name( "1988" ), :Name( "1992" ), :Name( "1996" ), :Name( "2000" ), :Name( "2004" ),
:Name( "2008" ), :Name( "2012" )
)
);
rpt = obj << report;
For( i = 1, i <= N Cols( dt << get as matrix ), i++,
jrn = rpt[Outline Box( "Initial data Plot" )][FrameBox( i + 1 )] << get journal
);
Code Explanation:
- Open table.
- Launch Functional Data Explorer.
- Set data format to column.
- Define Y variables for each year.
- Generate report object.
- Initialize loop for columns count.
- Access initial data plot outline.
- Access frame box for current iteration.
- Get journal from frame box.
- Loop ends.
Example 51
Summary: Analyze ethanol and temperature data using Functional Data Explorer with B Splines method, generating a report with GCV option.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Ethanol ), X( :Time ), ID( :BatchID ), B Splines, );
obj = dt << Functional Data Explorer( Y( :Temp ), X( :Time ), ID( :BatchID ), B Splines, );
rpt = Current Report();
obj << GCV;
Code Explanation:
- Open table.
- Launch Functional Data Explorer.
- Set Y variable to Ethanol.
- Set X variable to Time.
- Set ID variable to BatchID.
- Use B Splines method.
- Launch Functional Data Explorer again.
- Set Y variable to Temp.
- Retrieve current report.
- Select GCV option.
Example 52
Summary: Generates function summaries for a data table using B Splines and customizable number of FPCs, then extracts the journal from the report.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :TAVG ),
X( :Week of Year ),
ID( :STATION ),
B Splines( Customize Function Summaries( Number of FPCs( 7 ) ) )
);
rpt = obj << report;
jrn = (rpt[Outline Box( "Function Summaries" )][Table Box( 1 )] << get journal);
Code Explanation:
- Open data table;
- Launch Functional Data Explorer.
- Set Y variable.
- Set X variable.
- Set ID variable.
- Use B Splines method.
- Customize function summaries.
- Set number of FPCs.
- Generate report.
- Extract journal from report.
Example 53
Summary: Analyze and visualize a functional data explorer, generating a report with FPC 1 matrix and score plot.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :Y ),
X( :Silica ),
ID( :Characteristic ),
Plot Median( 1 ),
B Splines( Select Model( Knots( 2 ) ) ),
);
rpt = obj << report;
fpc1 = rpt[Number Col Box( "FPC 1" )] << get as matrix;
xVal = ((rpt[Outline Box( "Score Plot" )][Frame Box( 1 )]) << Find Seg( Marker Seg( 1 ) )) << Get X Values;
yVal = ((rpt[Outline Box( "Score Plot" )][Frame Box( 1 )]) << Find Seg( Marker Seg( 1 ) )) << Get Y Values;
Code Explanation:
- Open table.
- Launch Functional Data Explorer.
- Set response variable.
- Set predictor variable.
- Set ID variable.
- Plot median.
- Use B-splines model.
- Generate report.
- Extract FPC 1 matrix.
- Retrieve X values from score plot.
Example 54
Summary: Generates a report from a functional data explorer, specifying Y variables and ID variable for analysis.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Data Format( Row ),
Y(
:Name( "1980" ), :Name( "1984" ), :Name( "1988" ), :Name( "1992" ), :Name( "1996" ), :Name( "2000" ), :Name( "2004" ),
:Name( "2008" ), :Name( "2012" )
),
ID( :State ),
);
rpt = obj << report;
jrn = rpt[Scroll Box( 1 )][FrameBox( 1 )] << get journal;
Code Explanation:
- Open table.
- Launch Functional Data Explorer.
- Set data format to row.
- Specify Y variables.
- Set ID variable.
- Generate report.
- Access first scroll box.
- Access first frame box.
- Get journal.
Example 55
Summary: Analyze and visualize data in a Functional Data Explorer, generating reports with mean, standard deviation, and median functions for selected variables.
Code:
dt1 = Open("data_table.jmp");
obj1 = dt1 << Functional Data Explorer(
Data Format( Column ),
Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ),
X( :SILICA ),
Plot Median( 1 )
);
rpt1 = obj1 << report;
x_Mean1 = (rpt1[Outline Box( "Mean Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get X Values;
y_Mean1 = (rpt1[Outline Box( "Mean Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get Y Values;
x_StdDev1 = (rpt1[Outline Box( "Standard Deviation Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get X Values;
y_StdDev1 = (rpt1[Outline Box( "Standard Deviation Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get Y Values;
x_Median1 = (rpt1[Outline Box( "Median Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get X Values;
y_Median1 = (rpt1[Outline Box( "Median Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get Y Values;
Code Explanation:
- Open data table;
- Launch Functional Data Explorer.
- Set data format to column.
- Define Y variables: ABRASION, MODULUS, ELONG, HARDNESS.
- Set X variable: SILICA.
- Plot median function.
- Generate report object.
- Extract mean function X values.
- Extract mean function Y values.
- Extract standard deviation function X values.
- Extract standard deviation function Y values.
- Extract median function X values.
- Extract median function Y values.
Example 56
Summary: Analyze and visualize data in JMP's Functional Data Explorer, generating reports with mean, standard deviation, and median functions.
Code:
dt2 = Open("data_table.jmp");
obj2 = dt2 << Functional Data Explorer( Y( :Y ), X( :Silica ), ID( :Characteristic ), Plot Median( 1 ) );
rpt2 = obj2 << report;
x_Mean2 = (rpt2[Outline Box( "Mean Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get X Values;
y_Mean2 = (rpt2[Outline Box( "Mean Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get Y Values;
x_StdDev2 = (rpt2[Outline Box( "Standard Deviation Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get X Values;
y_StdDev2 = (rpt2[Outline Box( "Standard Deviation Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get Y Values;
x_Median2 = (rpt2[Outline Box( "Median Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get X Values;
y_Median2 = (rpt2[Outline Box( "Median Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get Y Values;
Code Explanation:
- Open data_table data
- Launch Functional Data Explorer.
- Set Y variable.
- Set X variable.
- Set ID variable.
- Plot median function.
- Retrieve report object.
- Extract mean function X values.
- Extract mean function Y values.
- Extract standard deviation function X values.
- Extract standard deviation function Y values.
- Extract median function X values.
- Extract median function Y values.
Example 57
Summary: Analyze ethanol data by opening a table, launching Functional Data Explorer, and applying Dynamic Time Warping with reference value 4.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Ethanol ), X( :Time ), ID( :BatchID ), Validation( :Validation ), );
lc = Words( Trim( Log Capture( obj << Data Processing( Dynamic Time Warping( Reference( 4 ) ) ) ) ), "\!N" );
Code Explanation:
- Open table.
- Launch Functional Data Explorer.
- Set response variable.
- Set time variable.
- Set ID variable.
- Set validation variable.
- Access Data Processing.
- Apply Dynamic Time Warping.
- Set reference value.
- Capture log output.
Example 58
Summary: Analyze and visualize data in a Functional Data Explorer, generating reports for mean, standard deviation, and median functions.
Code:
dt1 = Open("data_table.jmp");
obj1 = dt1 << Functional Data Explorer(
Data Format( Column ),
Y( :ABRASION, :MODULUS, :ELONG, :HARDNESS ),
X( :SILICA ),
Plot Median( 1 )
);
rpt1 = obj1 << report;
x_Mean1 = (rpt1[Outline Box( "Mean Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get X Values;
y_Mean1 = (rpt1[Outline Box( "Mean Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get Y Values;
x_StdDev1 = (rpt1[Outline Box( "Standard Deviation Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get X Values;
y_StdDev1 = (rpt1[Outline Box( "Standard Deviation Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get Y Values;
x_Median1 = (rpt1[Outline Box( "Median Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get X Values;
y_Median1 = (rpt1[Outline Box( "Median Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get Y Values;
dt2 = Open("data_table.jmp");
obj2 = dt2 << Functional Data Explorer( Y( :Y ), X( :Silica ), ID( :Characteristic ), Plot Median( 1 ) );
rpt2 = obj2 << report;
x_Mean2 = (rpt2[Outline Box( "Mean Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get X Values;
y_Mean2 = (rpt2[Outline Box( "Mean Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get Y Values;
x_StdDev2 = (rpt2[Outline Box( "Standard Deviation Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get X Values;
y_StdDev2 = (rpt2[Outline Box( "Standard Deviation Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get Y Values;
x_Median2 = (rpt2[Outline Box( "Median Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get X Values;
y_Median2 = (rpt2[Outline Box( "Median Function" )][Frame Box( 1 )] << Find Seg( Line Seg( 1 ) )) << Get Y Values;
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set data format to column.
- Specify Y variables: ABRASION, MODULUS, ELONG, HARDNESS.
- Set X variable: SILICA.
- Plot median function.
- Retrieve mean function report.
- Extract x and y values for mean function.
- Extract x and y values for standard deviation function.
- Extract x and y values for median function.
Example 59
Summary: Analyze a data table using Functional Data Explorer and B Splines, capturing log output for further review.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Y ), ID( :ID ), );
lc = Log Capture( obj << B Splines );
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set Y variable.
- Set ID variable.
- Perform B Splines analysis.
- Capture log output.
Example 60
Summary: Launches Functional Data Explorer to analyze data table relationships, setting response and time variables, defining ID variable, and including control variables.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Homogeneity Grade ), X( :T ), ID( :Formulation ), Z( :Solvent, :Active, :Water ), );
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Specify time variable.
- Define ID variable.
- Include control variables.
Example 61
Summary: Analyze functional data by launching the Functional Data Explorer, setting response and time variables, defining an ID variable, adding covariates, and choosing B Splines for modeling.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :Homogeneity Grade ),
X( :T ),
ID( :Formulation ),
Z( :Solvent, :Active, :Water ),
B Splines( Functional DOE Analysis )
);
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Define time variable.
- Specify ID variable.
- Add covariates.
- Choose B Splines method.
Example 62
Summary: Creates a Functional Data Explorer with Direct Functional PCA and Local Data Filter for data analysis.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :TAVG ), X( :Week of Year ), ID( :STATION ), Direct Functional PCA );
obj << Local Data Filter;
Code Explanation:
- Open table.
- Create Functional Data Explorer.
- Set Y variable.
- Set X variable.
- Set ID variable.
- Perform Direct Functional PCA.
- Add local data filter.
Example 63
Summary: Analyze functional data by performing Direct Functional PCA and configuring FPC Profiler settings, utilizing Functional Data Explorer in JMP.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :Homogeneity Grade ),
X( :T ),
ID( :Formulation ),
Z( :Solvent, :Active, :Water ),
Direct Functional PCA(
Functional PCA(
1,
AICc( 0 ),
BIC( 0 ),
GCV( 0 ),
FPC Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
T( 45, Min( 10 ), Lock( 1 ), Show( 1 ) ),
FPC 1( 0, Lock( 0 ), Show( 1 ) ),
FPC 2( 0, Max( 1.95534262255575 ), Lock( 0 ), Show( 1 ) )
)
)
),
Functional DOE Analysis(
FDOE Profiler(
1,
Confidence Intervals( 1 ),
Profile at Boundary( "Stop at Boundaries" ),
Term Value(
T( 45, Min( 10 ), Lock( 1 ), Show( 1 ) ),
Solvent( 0.5375, Lock( 0 ), Show( 1 ) ),
Active( 0.25, Lock( 0 ), Show( 1 ) ),
Water( 0.2125, Lock( 0 ), Show( 1 ) )
)
),
Generalized Regression FPC Model(
FPC Number( 1 ),
Estimation Method( Best Subset ),
Validation Method( AICc ),
Enforce Heredity,
Force( [1 1 1 0 0 0 0 0 0 0] ),
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
),
Generalized Regression FPC Model(
FPC Number( 2 ),
Estimation Method( Best Subset ),
Validation Method( AICc ),
Enforce Heredity,
Force( [1 1 1 0 0 0 0 0 0 0] ),
Model Summary( 0 ),
Parameter Estimates for Original Predictors( 0 ),
Effect Tests( 0 )
)
)
)
);
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Set time variable.
- Set ID variable.
- Set covariate variables.
- Perform Direct Functional PCA.
- Configure Functional PCA settings.
- Enable AICc, BIC, GCV.
- Configure FPC Profiler.
Example 64
Summary: Analyze functional data by opening a data table, launching Functional Data Explorer, and performing Direct Functional PCA.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :kHours ),
ID( :System ID ),
Z( :Unit, :Cost, :orig time, :event time, :end time ),
Direct Functional PCA
);
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Specify response variable.
- Define ID variable.
- Set covariates.
- Perform Direct Functional PCA.
Example 65
Summary: Analyze a functional data explorer with Fourier basis, generating a report and extracting fit statistics.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :TMAX ), X( :Week of Year ), ID( :NAME ), Fourier Basis );
rpt = obj << report;
fStat1 = rpt[Outline Box( "Fit Statistics" )][Number Col Box( 1 )] << get as matrix;
rpt[Outline Box( "Model Controls" )][Number Edit Box( 2 )] << Set( 50 );
rpt[Outline Box( "Model Controls" )][Button Box( 4 )] << Click();
fStat2 = rpt[Outline Box( "Fit Statistics" )][Number Col Box( 1 )] << get as matrix;
Code Explanation:
- Open table.
- Launch Functional Data Explorer.
- Specify response variable.
- Specify predictor variable.
- Specify ID variable.
- Use Fourier basis.
- Generate report.
- Extract first fit statistics.
- Set basis function count.
- Recalculate model.
- Extract second fit statistics.
Example 66
Summary: Explores a dataset using Functional Data Explorer, specifying response and predictor variables, identification by BatchID, and applying P Splines model.
Code:
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer( Y( :Temp ), X( :Time ), ID( :BatchID ), P Splines );
Code Explanation:
- Open data table;
- Assign dataset to variable
dt. - Launch Functional Data Explorer.
- Set response variable
Temp. - Set predictor variable
Time. - Use
BatchIDfor identification. - Apply P Splines model.
Example 67
Summary: Configures a stacked Functional Data Explorer in JMP, defining Y and Z variables for analysis and capturing log output.
Code:
dt = Open("data_table.jmp");
fde = dt << Functional Data Explorer(
Data Format( Stacked ),
Y( :Birth Year, :Age in Years ),
Z( :Toothpaste Cost, :Floss Cost ),
B Splines
);
Log Capture( dt << Delete Columns( {"Birth Year", "Age in Years", "Toothpaste Cost", "Floss Cost"} ) );
Code Explanation:
- Open data table;
- Launch Functional Data Explorer.
- Set data format to stacked.
- Define Y variables: Birth Year, Age in Years.
- Define Z variables: Toothpaste Cost, Floss Cost.
- Use B Splines method.
- Capture log output.
- Delete specified columns from dt.
Functional Data Explorer using Fit Group
Example 1
Summary: Fits functional data explorer models to a data table, and saves model summaries for all Y variables.
Code:
dt = Open("data_table.jmp");
obj = dt << Fit Group(
Functional Data Explorer( Y( :Name( "1980" ) ), ID( :State ), B Splines ),
Functional Data Explorer( Y( :Name( "1984" ) ), ID( :State ), B Splines )
);
Try(
scptObj = Report( obj )[Outline Box( 2 )] << get scriptable object;
scptObj << Save Model Summaries for All Y;
);
Code Explanation:
- Open data table.
- Fit functional data explorer models.
- Try to access report object.
- Get scriptable object from outline box.
- Save model summaries for all Y.
Example 2
Summary: Creates and creates a report for functional data explorations for TMIN, TMAX, and TAVG variables using Fit Group
Code:
dt = Open("data_table.jmp");
obj = dt << Fit Group(
Functional Data Explorer( Y( :TMIN ), X( :Week of Year ), ID( :NAME ), B Splines ),
Functional Data Explorer( Y( :TMAX ), X( :Week of Year ), ID( :NAME ), B Splines ),
Functional Data Explorer( Y( :TAVG ), X( :Week of Year ), ID( :NAME ), B Splines )
);
rpt = obj << report;
Code Explanation:
- Open data table.
- Create Fit Group object.
- Add TMIN analysis.
- Add TMAX analysis.
- Add TAVG analysis.
- Generate report.
Example 3
Summary: Creates a fit group object with three functional data explorers for TMIN, TMAX, and TAVG responses, using B Splines method and Week of Year predictor.
Code:
dt = Open("data_table.jmp");
obj = dt << Fit Group(
Functional Data Explorer( Y( :TMIN ), X( :Week of Year ), ID( :NAME ), B Splines ),
Functional Data Explorer( Y( :TMAX ), X( :Week of Year ), ID( :NAME ), B Splines ),
Functional Data Explorer( Y( :TAVG ), X( :Week of Year ), ID( :NAME ), B Splines )
);
Code Explanation:
- Open data table.
- Create fit group object.
- Add TMIN analysis.
- Specify TMIN response.
- Define Week of Year predictor.
- Set NAME as identifier.
- Use B Splines method.
- Add TMAX analysis.
- Specify TMAX response.
- Add TAVG analysis.
Example 4
Summary: Analyze multiple variables over time, using Functional Data Explorer to fit group models with P Splines for each batch ID.
Code:
dt = Open("data_table.jmp");
obj = dt << Fit Group(
Functional Data Explorer( Y( :Temp ), X( :Time ), ID( :BatchID ), P Splines ),
Functional Data Explorer( Y( :Molasses Feed ), X( :Time ), ID( :BatchID ), P Splines ),
Functional Data Explorer( Y( :NH3 Feed ), X( :Time ), ID( :BatchID ), P Splines ),
Functional Data Explorer( Y( :Tank Level ), X( :Time ), ID( :BatchID ), P Splines )
);
Code Explanation:
- Open data table.
- Fit group of models.
- Use Functional Data Explorer.
- Analyze Temp over Time.
- Identify by BatchID.
- Apply P Splines method.
- Analyze Molasses Feed over Time.
- Identify by BatchID.
- Apply P Splines method.
- Analyze NH3 Feed over Time.
- Identify by BatchID.
- Apply P Splines method.
- Analyze Tank Level over Time.
- Identify by BatchID.
- Apply P Splines method.
Functional Data Explorer using Log Capture
Example 1
Summary: Analyze a data table by launching Functional Data Explorer, setting the response variable to weight, and filtering height between 68.5 and 70 using a local data filter.
Code:
Open("data_table.jmp");
Log Capture(
obj = dt << Functional Data Explorer(
Y( :weight ),
P Splines,
Local Data Filter( Add Filter( columns( :height ), Where( :height >= 68.5 & :height <= 70 ) ) )
)
);
Code Explanation:
- Open data table;
- Start log capture.
- Launch Functional Data Explorer.
- Set response variable to weight.
- Use P Splines method.
- Add local data filter.
- Filter height between 68.5 and 70.
Example 2
Summary: Runs the exploration and processing of a data table, utilizing Functional Data Explorer to set response variables, apply data processing techniques, and capture log output.
Code:
dt = Open("data_table.jmp");
Log Capture(
obj = dt << Functional Data Explorer(
Y( :"#Oversize"n ),
X( :Time ),
ID( :Batch ),
Z( :"%Beads"n, :"%Strength"n, :"Flow(g/min)"n, :"T(ºC)"n ),
Validation( :Run Type ),
Data Processing( Log, "Savitzky-Golay Filter"n )
)
);
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Set time variable.
- Set ID variable.
- Add Z variables.
- Specify validation method.
- Apply data processing techniques.
- Capture log output.
- Store result object.
Example 3
Summary: Runs the opening and processing of a data table, utilizing Functional Data Explorer to define Y and Z variables, apply B Splines, and save the results.
Code:
dt = Open("data_table.jmp");
Log Capture(
fde = dt << Functional Data Explorer(
Data Format( Row ),
Y( :Birth Year, :Age in Years ),
Z( :Toothpaste Cost, :Floss Cost ),
B Splines
)
);
dt << Delete Columns( {"Birth Year", "Age in Years", "Toothpaste Cost", "Floss Cost"} );
newdt = fde << Save Data;
fde << close window;
Code Explanation:
- Open data table.
- Log capture starts.
- Launch Functional Data Explorer.
- Set data format to row.
- Define Y variables.
- Define Z variables.
- Use B Splines method.
- Log capture ends.
- Delete specified columns.
- Save data from FDE.
- Close FDE window.
Functional Data Explorer using Words
Example 1
Summary: Creates and analyzes a functional data explorer with B-spline modeling, utilizing a random seed for reproducibility.
Code:
dt = Open("data_table.jmp");
lc = Words(
Log Capture(
obj = dt << Functional Data Explorer(
Y( :Homogeneity Grade ),
X( :T ),
ID( :Formulation ),
Z( :Solvent, :Active, :Water ),
Data Processing( Reduce( Bin( 10 ) ), Reduce( Thin( 2 ) ), Reduce( Grid( 500 ) ) )
)
),
"\!N"
);
Close( dt, No Save );
nrow = 30;
myseed = 123456789;
xx = (0 :: nrow)`;
Random Reset( myseed );
yy = J( nrow + 1, 1, Random Normal() );
dt = As Table( xx || yy );
Column( dt, 1 ) << Set Name( "x" );
Column( dt, 2 ) << Set Name( "y" );
obj = dt << Functional Data Explorer( Y( :y ), X( :x ), B Splines( Degree( 0 ), Select Model( Knots( 1 ) ) ) );
Code Explanation:
- Open data table.
- Launch Functional Data Explorer.
- Set response variable.
- Set time variable.
- Set ID variable.
- Set factor variables.
- Apply data processing.
- Close data table without saving.
- Define number of rows.
- Set random seed.
- Create x values.
- Generate y values.
- Create new data table.
- Rename columns.
- Launch Functional Data Explorer again.
- Set response variable.
- Set time variable.
- Fit B-spline model.
Example 2
Summary: Explores and analyzes a data table by launching a Functional Data Explorer, applying data reduction methods, and capturing log information.
Code:
dt = Open("data_table.jmp");
lc = Words(
Log Capture(
obj = dt << Functional Data Explorer(
Y( :Homogeneity Grade ),
X( :T ),
ID( :Formulation ),
Z( :Solvent, :Active, :Water ),
Data Processing( Reduce( Bin( 10 ) ), Reduce( Thin( 2 ) ), Reduce( Grid( 500 ) ) )
)
),
"\!N"
);
Code Explanation:
- Open data table.
- Log capture starts.
- Launch Functional Data Explorer.
- Set response variable.
- Define time variable.
- Specify ID variable.
- Identify Z variables.
- Apply data reduction methods.
- Log capture ends.
- Extract log content.
Functional Data Explorer using Select Rows
Summary: Selects and processes data for Functional Data Explorer, utilizing random indices to filter by BatchID.
Code:
dt = Open("data_table.jmp");
r = dt << Select Rows( 2501 :: 10000 );
r << Hide and Exclude;
obj = dt << Functional Data Explorer( Y( :Air ), X( :Time ), ID( :BatchID ) );
idIndex = Random Index( 25, 10 );
For( i = 1, i <= N Rows( idIndex ), i++,
(dt << Select Where( :BatchID == idIndex[i] ));
obj << Data Processing( Remove Selected );
);
obj << Local Data Filter;
Code Explanation:
- Open data table.
- Select rows 2501 to 10000.
- Hide and exclude selected rows.
- Launch Functional Data Explorer.
- Set response variable to Air.
- Set predictor variable to Time.
- Set ID variable to BatchID.
- Generate random indices for BatchID.
- Loop through each random index.
- Select rows with matching BatchID.
- Remove selected rows from FDE.
- Add local data filter to FDE.
Functional Data Explorer using Select Where
Summary: Analyze data for a specific system ID, generating a report with fit statistics using Functional Data Explorer and P Splines.
Code:
dt = Open("data_table.jmp");
dt << Select Where( :Name( "System ID" ) == "Grampus4" );
dt << Exclude;
obj = dt << Functional Data Explorer( Y( :kHours ), X( :event time ), ID( :System ID ), P Splines );
rpt = obj << report;
stats = rpt[Outline Box( "Fit Statistics" )][Number Col Box( 1 )] << get as matrix;
Code Explanation:
- Open data table.
- Select specific rows.
- Exclude selected rows.
- Launch Functional Data Explorer.
- Specify Y variable.
- Specify X variable.
- Specify ID variable.
- Use P Splines method.
- Generate report object.
- Extract fit statistics.
Functional Data Explorer using New Column
Summary: Fits a standard least squares model with multiple effects and generating profiler plots using JMP's Functional Data Explorer.
Code:
dt = Open("data_table.jmp");
dt << New Column( "Week minus 1", Formula( :Name( "Week of Year" ) - 1 ) );
obj = dt << Functional Data Explorer( Y( :TMAX ), X( :Week minus 1 ), ID( :NAME ), Data Processing( Center ), Fourier Basis, );
rpt = obj << report;
ranCoeffFun = rpt[Outline Box( "Random Coefficients by Function" )][Table Box( 1 )] << get as matrix;
dt1 = Data Table("data_table") << Split(
Split By( :Week minus 1 ),
Split( :TMAX ),
Group( :NAME ),
Remaining Columns( Drop All ),
Sort by Column Property
);
obj1 = dt1 << Functional Data Explorer( Data Format( Row ), Y( 2 :: 54 ), ID( :NAME ), Data Processing( Center ), Fourier Basis );
rpt1 = obj1 << report;
ranCoeffFun1 = rpt1[Outline Box( "Random Coefficients by Function" )][Table Box( 1 )] << get as matrix;
Code Explanation:
- Open data table.
- Create "Week minus 1" column.
- Launch Functional Data Explorer.
- Generate report.
- Extract random coefficients matrix.
- Split data table.
- Launch Functional Data Explorer again.
- Generate another report.
- Extract second random coefficients matrix.
Functional Data Explorer using If
Example 1
Summary: Analyze data in JMP Pro by launching Functional Data Explorer to visualize and model relationships between variables.
Code:
If( JMP Product Name() == "Pro",
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :Homogeneity Grade ),
X( :T ),
ID( :Formulation ),
Z( :Solvent, :Active, :Water ),
B Splines,
P Splines,
Fourier Basis
);
Close( dt, No Save );
);
Code Explanation:
- Check if JMP Product Name is "Pro".
- Open data table;
- Launch Functional Data Explorer.
- Set response variable.
- Define time variable.
- Specify ID variable.
- Assign covariates.
- Select B Splines.
- Select P Splines.
- Choose Fourier Basis.
- Close dataset without saving.
Example 2
Summary: Analyzes and creates reports for functional data explorer summaries for a given data table in JMP Pro, utilizing B Splines with custom summaries.
Code:
If( JMP Product Name() == "Pro",
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :Ethanol ),
X( :Time ),
ID( :BatchID ),
Validation( :Validation ),
B Splines(
Customize Function Summaries( Mean( 0 ), Std Dev( 0 ), Integrated Difference( 0 ), Median( 0 ), Minimum( 0 ), Maximum( 0 ) )
)
);
rpt = obj << report;
scptObj = rpt[Outline Box( "Function Summaries" )] << get scriptable object;
scptObj << Save Summaries;
dt1 = Current Data Table();
Close( dt1, No Save );
Close( dt, No Save );
);
Code Explanation:
- Check if JMP version is Pro.
- Open data table.
- Launch Functional Data Explorer.
- Set response variable to Ethanol.
- Set time variable to Time.
- Set ID variable to BatchID.
- Set validation variable to Validation.
- Configure B Splines with custom summaries.
- Retrieve report from Functional Data Explorer.
- Access Function Summaries outline box.
- Save summaries from scriptable object.
- Get current data table.
- Close current data table without saving.
- Close original data table without saving.
Example 3
Summary: Analyze and visualize data using Functional Data Explorer, generating reports with standardized and aligned ranges.
Code:
If( JMP Product Name() == "Pro",
dt = Open("data_table.jmp");
obj = dt << Functional Data Explorer(
Y( :Flow ),
X( :Order ),
ID( :Wafer Id ),
Z( :Condition ),
Validation( :Validation ),
Data Processing( Standardize, Align Range 0 to 1 ),
);
rpt = obj << report;
Close( dt, No Save );
dt = Open("data_table.jmp");
obj = dt << Run Script( "Functional Data Explorer" );
obj << "B-Splines"n;
objProfiler = Profiler[1];
objProfiler << Data Points;
rpt = obj << report;
Close( dt, No Save );
);
Code Explanation:
- Check if JMP Product Name is Pro.
- Open data table;
- Launch Functional Data Explorer.
- Set Y variable to Flow.
- Set X variable to Order.
- Set ID variable to Wafer Id.
- Set Z variable to Condition.
- Set Validation variable.
- Apply Standardize and Align Range.
- Generate report.
- Close data_table.jmp without saving.
- Open data table;
- Run "Functional Data Explorer" script.
- Select B-Splines option.
- Enable Data Points in Profiler.
- Generate report.
- Close data_table.jmp without saving.