Missing Data Pattern
Example 1
Summary: Opens a data table, generates a missing data pattern, and specifies columns for analysis.
Code:
// Missing Data Pattern
// Open data table
dt = Open("data_table.jmp");
// Missing Data Pattern
Current Data Table() <<
Missing Data Pattern(
Columns(
:Trial 1, :Trial 2, :Trial 3,
:Trial 4
)
);
Code Explanation:
- Open data table.
- Access current data table.
- Generate missing data pattern.
- Specify columns for analysis.
Example 2
Summary: Runs the identification and visualization of missing data patterns in a JMP data table, specifying columns for analysis and adding value colors property.
Code:
dt2 = Open("data_table.jmp");
dtMiss2 = dt2 << Missing Data Pattern(
columns( :POP, :Max deg. F Jan, :OZONE, :CO, :SO2, :NO, :PM10, :Lead, :X, :Y ),
Add Value Colors Property,
output table( "Missing Pattern for data_table2" )
);
property2 = dtMiss2:SO2 << Get property( Value Colors );
Code Explanation:
- Open data table.
- Create missing data pattern.
- Specify columns for analysis.
- Add value colors property.
- Output table with results.
- Retrieve SO2 value colors property.
Missing Data Pattern using Data Table
Summary: Analyze missing data patterns in a table, generating a report and visualizing the results using a tree map script.
Code:
dt = Open("data_table.jmp");
dt2 = Data Table( dt ) << Missing Data Pattern( columns( :OZONE, :CO, :SO2, :NO, :PM10, :Lead ), Output Table( "Missing Data Pattern" ) );
matStd = [29 0 0 0 0 0 0 0,
3 1 0 0 0 0 0 1,
5 1 0 0 0 1 0 0,
3 2 0 0 0 1 0 1,
1 1 0 0 1 0 0 0,
2 2 0 0 1 1 0 0,
2 3 0 0 1 1 0 1,
1 3 0 1 0 1 0 1,
1 3 0 1 0 1 1 0,
1 4 0 1 1 1 0 1,
1 3 1 0 0 1 0 1,
1 4 1 0 1 1 0 1,
1 4 1 1 1 1 0 0,
1 5 1 1 1 1 0 1];
matTable = dt2 << get as matrix;
tree = dt2 << Run Script( "Tree Map" );
rpt = tree << report;
tree << Close Window();
Code Explanation:
- Open data table.
- Create missing data pattern.
- Define standard matrix.
- Get matrix from table.
- Run tree map script.
- Retrieve report from tree.
- Close tree map window.