<?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 row() results in missing value for 1st row in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/row-results-in-missing-value-for-1st-row/m-p/590641#M79505</link>
    <description>&lt;P&gt;JMP® Pro 17.0.0 (622753)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello, I understand that using Lag in the 1st row results in a missing value.&amp;nbsp; But I need to avoid a missing value, because my predictive algorithm is using Informative Missing elsewhere. So in this one instance, I'd like to avoid it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not much good with JSL...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Formula Result: want to force this missing value to change to a zero.&amp;nbsp; My initial forays have been trying combinations of If statements using Is Empty, Is Missing. e.g.&lt;/P&gt;&lt;P&gt;If Lag (&lt;EM&gt;the whole formula&lt;/EM&gt;) ==Is Empty&lt;/P&gt;&lt;P&gt;Then ==0&lt;/P&gt;&lt;P&gt;Else == Lag (&lt;EM&gt;the whole formula&lt;/EM&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&amp;nbsp; thanks, Paul&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lag("&lt;EM&gt;the whole formula&lt;/EM&gt;")&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paulp_1-1673988610311.png" style="width: 750px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49222i88164BC1CFCAB83E/image-dimensions/750x499?v=v2" width="750" height="499" role="button" title="paulp_1-1673988610311.png" alt="paulp_1-1673988610311.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2023 16:42:36 GMT</pubDate>
    <dc:creator>paulp</dc:creator>
    <dc:date>2023-06-08T16:42:36Z</dc:date>
    <item>
      <title>row() results in missing value for 1st row</title>
      <link>https://community.jmp.com/t5/Discussions/row-results-in-missing-value-for-1st-row/m-p/590641#M79505</link>
      <description>&lt;P&gt;JMP® Pro 17.0.0 (622753)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello, I understand that using Lag in the 1st row results in a missing value.&amp;nbsp; But I need to avoid a missing value, because my predictive algorithm is using Informative Missing elsewhere. So in this one instance, I'd like to avoid it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not much good with JSL...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Formula Result: want to force this missing value to change to a zero.&amp;nbsp; My initial forays have been trying combinations of If statements using Is Empty, Is Missing. e.g.&lt;/P&gt;&lt;P&gt;If Lag (&lt;EM&gt;the whole formula&lt;/EM&gt;) ==Is Empty&lt;/P&gt;&lt;P&gt;Then ==0&lt;/P&gt;&lt;P&gt;Else == Lag (&lt;EM&gt;the whole formula&lt;/EM&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions?&amp;nbsp; thanks, Paul&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lag("&lt;EM&gt;the whole formula&lt;/EM&gt;")&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="paulp_1-1673988610311.png" style="width: 750px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49222i88164BC1CFCAB83E/image-dimensions/750x499?v=v2" width="750" height="499" role="button" title="paulp_1-1673988610311.png" alt="paulp_1-1673988610311.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:42:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/row-results-in-missing-value-for-1st-row/m-p/590641#M79505</guid>
      <dc:creator>paulp</dc:creator>
      <dc:date>2023-06-08T16:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: row() results in missing value for 1st row</title>
      <link>https://community.jmp.com/t5/Discussions/row-results-in-missing-value-for-1st-row/m-p/590652#M79506</link>
      <description>&lt;P&gt;Try putting your if statement outside of the lag function.&amp;nbsp; So..&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;if( row() == 1, 
	hCounter = 1; // set the hCounter value so future evaluations work, but
	0;, //return 0 for the first row
	lag( ... )
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Jan 2023 21:44:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/row-results-in-missing-value-for-1st-row/m-p/590652#M79506</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2023-01-17T21:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: row() results in missing value for 1st row</title>
      <link>https://community.jmp.com/t5/Discussions/row-results-in-missing-value-for-1st-row/m-p/590718#M79508</link>
      <description>&lt;P&gt;Thank you, that did it&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 22:45:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/row-results-in-missing-value-for-1st-row/m-p/590718#M79508</guid>
      <dc:creator>paulp</dc:creator>
      <dc:date>2023-01-17T22:45:03Z</dc:date>
    </item>
  </channel>
</rss>

