<?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 Re: how to determine the meal criterion point in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-determine-the-meal-criterion-point/m-p/98708#M4950</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Rick:&lt;BR /&gt;Thanks so much for your reply, and it must give me good suggestion to solve my question.&lt;/P&gt;&lt;P&gt;Given the accurate data which I want to obtain, the function and method referring to &lt;A class="jive-link-external-small" href="http://support.sas.com/documentation/cdl/en/imlug/65547/HTML/default/viewer.htm#imlug_langref_sect128.htm"&gt;FROOT function&lt;/A&gt; is preferred. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="def"&gt;In strict accordance with your statement in SAS/IML 12.1, I try to fix these statements in your example illustrating &lt;/SPAN&gt;the distribution of Scrabble® scores which is characterized by&lt;SPAN style="text-indent: 0px; color: #333333;"&gt; a mixture of two normal distributions upon your score.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;start func(x);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; f1 = pdf("Normal", x, 21.7, 6.7); /* density of N(21.7,6.7), where 2 is std dev in your example*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; f2 = pdf("Normal", x, 37.3, 3); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; return( f1 - f2 );&lt;BR /&gt;finish;&lt;/P&gt;&lt;P&gt;x = froot("Func", {27 37});&lt;BR /&gt;print x;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, after performing, the error terms occur : "Matrix x has not been set to a value".&lt;/P&gt;&lt;P&gt;What does it mean? And any errors in my statements?? If have, could you please tell me??&lt;/P&gt;&lt;P&gt;Thank you for your helpful assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Dec 2012 07:54:35 GMT</pubDate>
    <dc:creator>JamesXu</dc:creator>
    <dc:date>2012-12-14T07:54:35Z</dc:date>
    <item>
      <title>how to determine the meal criterion point</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-determine-the-meal-criterion-point/m-p/98706#M4948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 14pt;"&gt;Hello everyone:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 14pt;"&gt;I'm a PhD candidate majoring in animal science in China.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 14pt;"&gt;As in your book which titled "SAS/STAT 9.3 User's Guide - The FMM Procudure (Chapter)", example 37.2 from page 2533-2541 illustrates when do cows eat.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 14pt;"&gt;I'm so interested in the content of one sentence "The point at which the second and third components cross over is used to separate feeding events into meals." which appears at page 2533.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt; font-family: Times New Roman;"&gt;However, the point's information mentioned above can not be found throughout this chapter. A small issue I wish to concern about is, which data or process in the FMM procedure offer hints to represent the value of this point at which the pdf of the two populations cross? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 14pt;"&gt;Thanks you allowing me for sharing my problem. Your reply may be highly appreciated &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Times New Roman; font-size: 14pt;"&gt;Best regards!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="font-family: Times New Roman;"&gt;&lt;STRONG&gt;&lt;EM style="color: #800080;"&gt;James Xu&lt;/EM&gt; &lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM style="color: #800080; font-family: Times New Roman;"&gt;&lt;STRONG&gt;college of&amp;nbsp; animal science,SCAU&amp;nbsp; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 04:14:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-determine-the-meal-criterion-point/m-p/98706#M4948</guid>
      <dc:creator>JamesXu</dc:creator>
      <dc:date>2012-12-13T04:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to determine the meal criterion point</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-determine-the-meal-criterion-point/m-p/98707#M4949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My first comment is that if you want to separate the events into meals, it probably suffices to simply look at the picture and estimate the crossing visually. It doesn't make much difference to the cows whether the time is 9:00am or 9:07am.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you want a rigorous solution, let f1 and f2 be the two densities for which you wish to find the crossing point. (Use the estimated parameters from PROC FMM.)&amp;nbsp; Then the function f(x) - f1(x)-f2(x) is zero at the crossing point, and you can find the zero by using any numerical root-finding method.&amp;nbsp; For example, in the SAS/IML 12.1 language you can use the &lt;A href="http://support.sas.com/documentation/cdl/en/imlug/65547/HTML/default/viewer.htm#imlug_langref_sect128.htm"&gt;FROOT function&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;start func(x);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; f1 = pdf("Normal", x, 0, 1); /* density of N(0,1) */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; f2 = pdf("Normal", x, 1, 2); /* density of N(1,2), where 2 is std dev */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; return( f1 - f2 );&lt;BR /&gt;finish;&lt;/P&gt;&lt;P&gt;x = froot("Func", {0 3});&lt;BR /&gt;print x;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are running a version of SAS/IML prior to 12.1, you can use the bisection module to find the root. See &lt;A href="http://blogs.sas.com/content/iml/2011/08/03/finding-the-root-of-a-univariate-function/" title="http://blogs.sas.com/content/iml/2011/08/03/finding-the-root-of-a-univariate-function/"&gt;Finding the root (zero) of a function in SAS&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 14:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-determine-the-meal-criterion-point/m-p/98707#M4949</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-12-13T14:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to determine the meal criterion point</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-determine-the-meal-criterion-point/m-p/98708#M4950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Rick:&lt;BR /&gt;Thanks so much for your reply, and it must give me good suggestion to solve my question.&lt;/P&gt;&lt;P&gt;Given the accurate data which I want to obtain, the function and method referring to &lt;A class="jive-link-external-small" href="http://support.sas.com/documentation/cdl/en/imlug/65547/HTML/default/viewer.htm#imlug_langref_sect128.htm"&gt;FROOT function&lt;/A&gt; is preferred. &lt;/P&gt;&lt;P&gt;&lt;SPAN class="def"&gt;In strict accordance with your statement in SAS/IML 12.1, I try to fix these statements in your example illustrating &lt;/SPAN&gt;the distribution of Scrabble® scores which is characterized by&lt;SPAN style="text-indent: 0px; color: #333333;"&gt; a mixture of two normal distributions upon your score.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;start func(x);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; f1 = pdf("Normal", x, 21.7, 6.7); /* density of N(21.7,6.7), where 2 is std dev in your example*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; f2 = pdf("Normal", x, 37.3, 3); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; return( f1 - f2 );&lt;BR /&gt;finish;&lt;/P&gt;&lt;P&gt;x = froot("Func", {27 37});&lt;BR /&gt;print x;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, after performing, the error terms occur : "Matrix x has not been set to a value".&lt;/P&gt;&lt;P&gt;What does it mean? And any errors in my statements?? If have, could you please tell me??&lt;/P&gt;&lt;P&gt;Thank you for your helpful assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2012 07:54:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-determine-the-meal-criterion-point/m-p/98708#M4950</guid>
      <dc:creator>JamesXu</dc:creator>
      <dc:date>2012-12-14T07:54:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to determine the meal criterion point</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-determine-the-meal-criterion-point/m-p/98709#M4951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your code is correct. My guess is you don't have SAS/IML 12.1. Check the LOG to see If you are getting an error such as "ERROR: the FROOT function is not found."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Dec 2012 11:29:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-determine-the-meal-criterion-point/m-p/98709#M4951</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-12-14T11:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to determine the meal criterion point</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/how-to-determine-the-meal-criterion-point/m-p/98710#M4952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for reminding, my SAS sofeware actually have a little problems when installing, FROOT function is not available in my computer, but the bisection method is OK. Then I change the statement as below:&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;start func(x);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; f1 = pdf("Normal", x, 12.7, 6.7); /* density of N(12.7,6.7), where 6.7 is std dev in your example*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; f2 = pdf("Normal", x, 37.3, 3); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; return( f1 - f2 );&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;P&gt;start bisection(a, b);&lt;/P&gt;&lt;P&gt;dx = 1e-6; dy = 1e-4;&lt;/P&gt;&lt;P&gt;do i = 1 to 100;&lt;/P&gt;&lt;P&gt;&amp;nbsp; c = (a+b)/2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if abs(func(c)) &amp;lt; dy | (b-a)/2 &amp;lt; dx then &lt;/P&gt;&lt;P&gt;&amp;nbsp; return(c);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if func(a)#func(c) &amp;gt; 0 then a = c;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else b = c;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;return (.);&lt;/P&gt;&lt;P&gt;finish;&lt;/P&gt;&lt;P&gt;z = bisection(27, 37);&lt;/P&gt;&lt;P&gt;print z;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the SAS procedure determines the solution is "Z=29.03".&lt;/P&gt;&lt;P&gt;Is the statement mentioned above right or wrong?&lt;/P&gt;&lt;P&gt;By the way, you said that the function f(x) - f1(x)-f2(x) is zero at the crossing point,but why return(f1-f2) in the func(x), is that meaning f1(x)-f2(x)=0???&lt;/P&gt;&lt;P&gt;Looking forward your friendly answer!&lt;/P&gt;&lt;P&gt;Many thanks and best regards! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Dec 2012 05:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/how-to-determine-the-meal-criterion-point/m-p/98710#M4952</guid>
      <dc:creator>JamesXu</dc:creator>
      <dc:date>2012-12-15T05:08:02Z</dc:date>
    </item>
  </channel>
</rss>

