Watch out SEs, the robots are coming for us.
I asked ChatGPT this morning: "Can you write a JMP script in JSL for me that will create a distribution analysis of all continuous columns in the dataset?" Here's what it returned:
// Get the current data table
dt = Current Data Table();
// Get a list of all continuous columns in the data table
continuousCols = dt << Get Column Names( Continuous );
// Loop through each continuous column
for( i = 1, i <= N Items( continuousCols ), i++,
// Get the current column name
colName = continuousCols[i];
// Create a distribution analysis for the current column
dt << Distribution(
Continuous Distribution( Column( colName ) ),
Fit Distribution( Normal )
);
);
Check it out, it runs!! Then I replied: "that was pretty good, but I want the results in a single distribution report, not multiple reports." It gave me this:
// Get the current data table
dt = Current Data Table();
// Create a new distribution report
distReport = Distribution( Continuous );
// Get a list of all continuous columns in the data table
continuousCols = dt << Get Column Names( Continuous );
// Loop through each continuous column
for( i = 1, i <= N Items( continuousCols ), i++,
// Get the current column name
colName = continuousCols[i];
// Add a distribution analysis for the current column to the report
distReport << Add Column(
Continuous Distribution( Column( colName ) ),
Fit Distribution( Normal )
);
);
// Display the distribution report
distReport << Show;
This one doesn't run for a couple of reasons: The Distribution() call is wrong, and the <
So I guess we don't have to worry about becoming redundant. Yet. But still, it freaked me out a little.