<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Script for saving residuals: Informative Names for Residuals Columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Script-for-saving-residuals-Informative-Names-for-Residuals/m-p/471292#M71564</link>
    <description>&lt;P&gt;I am using JMP Pro 15.2.1 to generate a series of progressively&amp;nbsp;simpler split-plot models (specified as Mixed Models in the Fit Model window).&lt;/P&gt;&lt;P&gt;I have many response variables. For each of these I am generating 5 nested models .&amp;nbsp;For a given response variable (for example "FinalYr5", in the attached JSL):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Random effects include randomized block (:Blk#) and whole plot randomized within block (&lt;CODE class=" language-jsl"&gt;:Name( "Whole plot" )&lt;/CODE&gt;[:Blk#]&lt;/LI&gt;&lt;LI&gt;Fixed effects include Insolation (Insoln), Moisture addition (Moist), and their interaction.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The 5 nested models include the following terms.&amp;nbsp; The first two are shown in the attached JSL&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Insoln + Moist +Insoln * Moist [+Random effects]&lt;/LI&gt;&lt;LI&gt;Insoln + Moist [+Random effects]&lt;/LI&gt;&lt;LI&gt;Insoln&amp;nbsp;[+Random effects]&lt;/LI&gt;&lt;LI&gt;Moist [+Random effects]&lt;/LI&gt;&lt;LI&gt;Null [Random effects]&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;To save Residuals (and the Prediction Formula) in the data table, I inserted those terms in the Run() statement. So far, so good. However, the columns automatically named in the data table, below, are not informative.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Residuals FinalYr5&amp;nbsp;&amp;nbsp; [Insoln + Moist +Insoln * Moist]&lt;/LI&gt;&lt;LI&gt;Residuals FinalYr5 2 [Insoln + Moist]&lt;/LI&gt;&lt;LI&gt;Residuals FinalYr5 3 [Insoln]&lt;/LI&gt;&lt;LI&gt;Residuals FinalYr5 4 [Moist]&lt;/LI&gt;&lt;LI&gt;Residuals FinalYr5 5 [Null]&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Question&lt;/U&gt;:&lt;/STRONG&gt; Is there a scripting method to assign more meaningful names to the columns saved in the data table? For example, is there script that would allow me to assign names to columns to better reflect the model terms in brackets, above? (e.g., I+M+IxM, I+M,...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	Fit Group(&lt;BR /&gt;Fit Model(&lt;BR /&gt;Y( :FinalYr5 ),&lt;BR /&gt;Effects( :Insoln, :Moist, :Insoln * :Moist ),&lt;BR /&gt;Random Effects( :Blk#, :Name( "Whole plot]" )[:Blk#] ),&lt;BR /&gt;NoBounds( 1 ),&lt;BR /&gt;Personality( "Mixed Model" ),&lt;BR /&gt;Run( Repeated Effects Covariance Parameter Estimates( 0 ), Residuals(1), Prediction Formula(1) ),&lt;BR /&gt;SendToReport(&lt;BR /&gt;Dispatch(&lt;BR /&gt;{},&lt;BR /&gt;"Actual by Conditional Predicted Plot",&lt;BR /&gt;OutlineBox,&lt;BR /&gt;{Close( 1 )}&lt;BR /&gt;),&lt;BR /&gt;Dispatch(&lt;BR /&gt;{},&lt;BR /&gt;"Fixed Effects Parameter Estimates",&lt;BR /&gt;OutlineBox,&lt;BR /&gt;{Close( 1 )}&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;Fit Model(&lt;BR /&gt;Y( :FinalYr5 ),&lt;BR /&gt;Effects( :Insoln, :Moist ),&lt;BR /&gt;Random Effects( :Blk#, :Name( "Whole plot" )[:Blk#] ),&lt;BR /&gt;NoBounds( 1 ),&lt;BR /&gt;Personality( "Mixed Model" ),&lt;BR /&gt;Run( Repeated Effects Covariance Parameter Estimates( 0 ), Residuals(1), Prediction Formula(1) ),&lt;BR /&gt;SendToReport(&lt;BR /&gt;Dispatch(&lt;BR /&gt;{},&lt;BR /&gt;"Actual by Conditional Predicted Plot",&lt;BR /&gt;OutlineBox,&lt;BR /&gt;{Close( 1 )}&lt;BR /&gt;),&lt;BR /&gt;Dispatch(&lt;BR /&gt;{},&lt;BR /&gt;"Fixed Effects Parameter Estimates",&lt;BR /&gt;OutlineBox,&lt;BR /&gt;{Close( 1 )}&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;),&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:46:07 GMT</pubDate>
    <dc:creator>cbhalpern</dc:creator>
    <dc:date>2023-06-10T23:46:07Z</dc:date>
    <item>
      <title>Script for saving residuals: Informative Names for Residuals Columns</title>
      <link>https://community.jmp.com/t5/Discussions/Script-for-saving-residuals-Informative-Names-for-Residuals/m-p/471292#M71564</link>
      <description>&lt;P&gt;I am using JMP Pro 15.2.1 to generate a series of progressively&amp;nbsp;simpler split-plot models (specified as Mixed Models in the Fit Model window).&lt;/P&gt;&lt;P&gt;I have many response variables. For each of these I am generating 5 nested models .&amp;nbsp;For a given response variable (for example "FinalYr5", in the attached JSL):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Random effects include randomized block (:Blk#) and whole plot randomized within block (&lt;CODE class=" language-jsl"&gt;:Name( "Whole plot" )&lt;/CODE&gt;[:Blk#]&lt;/LI&gt;&lt;LI&gt;Fixed effects include Insolation (Insoln), Moisture addition (Moist), and their interaction.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The 5 nested models include the following terms.&amp;nbsp; The first two are shown in the attached JSL&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Insoln + Moist +Insoln * Moist [+Random effects]&lt;/LI&gt;&lt;LI&gt;Insoln + Moist [+Random effects]&lt;/LI&gt;&lt;LI&gt;Insoln&amp;nbsp;[+Random effects]&lt;/LI&gt;&lt;LI&gt;Moist [+Random effects]&lt;/LI&gt;&lt;LI&gt;Null [Random effects]&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;To save Residuals (and the Prediction Formula) in the data table, I inserted those terms in the Run() statement. So far, so good. However, the columns automatically named in the data table, below, are not informative.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Residuals FinalYr5&amp;nbsp;&amp;nbsp; [Insoln + Moist +Insoln * Moist]&lt;/LI&gt;&lt;LI&gt;Residuals FinalYr5 2 [Insoln + Moist]&lt;/LI&gt;&lt;LI&gt;Residuals FinalYr5 3 [Insoln]&lt;/LI&gt;&lt;LI&gt;Residuals FinalYr5 4 [Moist]&lt;/LI&gt;&lt;LI&gt;Residuals FinalYr5 5 [Null]&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Question&lt;/U&gt;:&lt;/STRONG&gt; Is there a scripting method to assign more meaningful names to the columns saved in the data table? For example, is there script that would allow me to assign names to columns to better reflect the model terms in brackets, above? (e.g., I+M+IxM, I+M,...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	Fit Group(&lt;BR /&gt;Fit Model(&lt;BR /&gt;Y( :FinalYr5 ),&lt;BR /&gt;Effects( :Insoln, :Moist, :Insoln * :Moist ),&lt;BR /&gt;Random Effects( :Blk#, :Name( "Whole plot]" )[:Blk#] ),&lt;BR /&gt;NoBounds( 1 ),&lt;BR /&gt;Personality( "Mixed Model" ),&lt;BR /&gt;Run( Repeated Effects Covariance Parameter Estimates( 0 ), Residuals(1), Prediction Formula(1) ),&lt;BR /&gt;SendToReport(&lt;BR /&gt;Dispatch(&lt;BR /&gt;{},&lt;BR /&gt;"Actual by Conditional Predicted Plot",&lt;BR /&gt;OutlineBox,&lt;BR /&gt;{Close( 1 )}&lt;BR /&gt;),&lt;BR /&gt;Dispatch(&lt;BR /&gt;{},&lt;BR /&gt;"Fixed Effects Parameter Estimates",&lt;BR /&gt;OutlineBox,&lt;BR /&gt;{Close( 1 )}&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;Fit Model(&lt;BR /&gt;Y( :FinalYr5 ),&lt;BR /&gt;Effects( :Insoln, :Moist ),&lt;BR /&gt;Random Effects( :Blk#, :Name( "Whole plot" )[:Blk#] ),&lt;BR /&gt;NoBounds( 1 ),&lt;BR /&gt;Personality( "Mixed Model" ),&lt;BR /&gt;Run( Repeated Effects Covariance Parameter Estimates( 0 ), Residuals(1), Prediction Formula(1) ),&lt;BR /&gt;SendToReport(&lt;BR /&gt;Dispatch(&lt;BR /&gt;{},&lt;BR /&gt;"Actual by Conditional Predicted Plot",&lt;BR /&gt;OutlineBox,&lt;BR /&gt;{Close( 1 )}&lt;BR /&gt;),&lt;BR /&gt;Dispatch(&lt;BR /&gt;{},&lt;BR /&gt;"Fixed Effects Parameter Estimates",&lt;BR /&gt;OutlineBox,&lt;BR /&gt;{Close( 1 )}&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;),&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:46:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-for-saving-residuals-Informative-Names-for-Residuals/m-p/471292#M71564</guid>
      <dc:creator>cbhalpern</dc:creator>
      <dc:date>2023-06-10T23:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Script for saving residuals: Informative Names for Residuals Columns</title>
      <link>https://community.jmp.com/t5/Discussions/Script-for-saving-residuals-Informative-Names-for-Residuals/m-p/472048#M71661</link>
      <description>&lt;P&gt;go to Help&amp;gt;Scripting Index, and search for Set Name.&lt;/P&gt;
&lt;P&gt;there is this simple example of how to change a column name via JSL&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
:Age &amp;lt;&amp;lt; Set Name( "Time" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Mar 2022 16:53:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-for-saving-residuals-Informative-Names-for-Residuals/m-p/472048#M71661</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2022-03-22T16:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Script for saving residuals: Informative Names for Residuals Columns</title>
      <link>https://community.jmp.com/t5/Discussions/Script-for-saving-residuals-Informative-Names-for-Residuals/m-p/472056#M71666</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 18:08:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-for-saving-residuals-Informative-Names-for-Residuals/m-p/472056#M71666</guid>
      <dc:creator>cbhalpern</dc:creator>
      <dc:date>2022-03-22T18:08:19Z</dc:date>
    </item>
  </channel>
</rss>

