<?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: Fitting Johnson curves in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/609100#M29503</link>
    <description>&lt;P&gt;I suspect the JOHNSYS macro was written before SU and SB were added to UNIVARIATE. I think it uses traditional SAS/GRAPH graphics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many times we know in advance whether the distribution reflects a bounded process or not. However, you can let the data themselves suggest whether they are best fit by SU or SB. The macro makes that determination by using PROC IML, then&amp;nbsp;creates a macro variable, &amp;amp;TYPE, which has the value '1', '2', or '3' for SU, SB, or lognormal, respectively.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The bulk of the macro is creating an annotation data set to overlay the curve on the histogram. You don't need that annotation overlay any more. If you know what type you are trying to fit, you can use the SU, SB, or LOGNORMAL options on the HISTOGRAM statement. The PROC will automatically overlay the curve. You can also use the CDFPLOT statement to get an ECDF of the data and the overlaid fit.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2019 15:59:09 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2019-12-03T15:59:09Z</dc:date>
    <item>
      <title>Fitting Johnson curves</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/608981#M29496</link>
      <description>&lt;P&gt;For a given dataset, I need to be able to determine the best-fitting Johnson curve (whether that be a Johnson Su, Sb or Sl distribution). Having determined the parameters for this "best" model, I then need to evaluate the inverse distribution function. Does anyone know how to do this? I am relatively new to SAS.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 08:47:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/608981#M29496</guid>
      <dc:creator>Tramp</dc:creator>
      <dc:date>2019-12-03T08:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting Johnson curves</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/609044#M29497</link>
      <description>&lt;P&gt;&lt;A href="https://support.sas.com/documentation/onlinedoc/qc/ex_code/132/johnsys4.html" target="_blank"&gt;https://support.sas.com/documentation/onlinedoc/qc/ex_code/132/johnsys4.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 13:54:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/609044#M29497</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-12-03T13:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting Johnson curves</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/609063#M29498</link>
      <description>Hi&lt;BR /&gt;Many thanks. When I run the macro I only get the histograms of sbdata, sudata and sldata as output: I don't seem to get the parameter estimates. What am I doing wrong?&lt;BR /&gt;Neil&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Dec 2019 14:43:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/609063#M29498</guid>
      <dc:creator>Tramp</dc:creator>
      <dc:date>2019-12-03T14:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting Johnson curves</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/609070#M29499</link>
      <description>&lt;P&gt;&lt;A href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.2&amp;amp;docsetId=procstat&amp;amp;docsetTarget=procstat_univariate_syntax09.htm&amp;amp;locale=en" target="_self"&gt;Use PROC UNIVARIATE&lt;/A&gt; to fit Sb and Su curves. For example,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc univariate data=Have;
   histogram x / Su;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The output includes parameter estimates.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 14:51:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/609070#M29499</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-12-03T14:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting Johnson curves</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/609079#M29500</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand though. The boiler plate in the JOHNSYS macro says:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTES: */&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* MISC: Macro JOHNSYS takes as input the data set (stored */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* as macro variable DATA). The proper Johnson system */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* is selected using the ratio given in Slifker and */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* Shenton (1980). The parameter estimates for the */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* appropriate system are then computed and displayed */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* along with the johnson curve on a histogram. */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run it, all I get is histograms. I thought it was supposed to choose which curve fits best (Su, Sb or Sl) and output the parameters for this model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 15:13:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/609079#M29500</guid>
      <dc:creator>Tramp</dc:creator>
      <dc:date>2019-12-03T15:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting Johnson curves</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/609100#M29503</link>
      <description>&lt;P&gt;I suspect the JOHNSYS macro was written before SU and SB were added to UNIVARIATE. I think it uses traditional SAS/GRAPH graphics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many times we know in advance whether the distribution reflects a bounded process or not. However, you can let the data themselves suggest whether they are best fit by SU or SB. The macro makes that determination by using PROC IML, then&amp;nbsp;creates a macro variable, &amp;amp;TYPE, which has the value '1', '2', or '3' for SU, SB, or lognormal, respectively.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The bulk of the macro is creating an annotation data set to overlay the curve on the histogram. You don't need that annotation overlay any more. If you know what type you are trying to fit, you can use the SU, SB, or LOGNORMAL options on the HISTOGRAM statement. The PROC will automatically overlay the curve. You can also use the CDFPLOT statement to get an ECDF of the data and the overlaid fit.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 15:59:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/609100#M29503</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2019-12-03T15:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Fitting Johnson curves</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/609328#M29509</link>
      <description>&lt;P&gt;Thank you so much. However, my SAS knowledge is not good enough to implement this. In the code below. I want to return the value of Type (or DistType) to the main macro and then use this to determine whether to perform the Su, Sb or lognormal CDFPLOT. I don't have the skills to do this. I presume I need to use symput.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;johnsys&lt;/I&gt;&lt;/STRONG&gt;(dataset);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;proc&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;univariate&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=dataset;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;histogram&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; x / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;lognormal&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;univariate&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=dataset;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000" face="Courier New" size="2"&gt;if&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;"&amp;amp;DistType"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; then cdfplot x / su;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000" face="Courier New" size="2"&gt;else&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; if &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"&amp;amp;DistType"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; then cdfplot x / sb;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#ff0000" face="Courier New" size="2"&gt;else&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; cdfplot x / lognormal;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; johnsys(data);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;sort &amp;amp;data out=sorted by x;&lt;/P&gt;&lt;P&gt;use sorted;&lt;/P&gt;&lt;P&gt;read all var {x} into x;&lt;/P&gt;&lt;P&gt;nobs=nrow(x);&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/*--- Choose z-value for percentile fit ---*/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;zval = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.524&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;p3 = probnorm(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;*zval);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;p1 = probnorm(zval);&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;pm1 = probnorm(-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;*zval);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;pm3 = probnorm(-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;*zval);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;i4 = p3*nobs + &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;i3 = p1*nobs + &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;i2 = pm1*nobs + &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;i1 = pm3*nobs + &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;x3z = x[int(i4)] + mod(i4,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)*(x[int(i4)+&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;] - x[int(i4)]);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;x1z = x[int(i3)] + mod(i3,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)*(x[int(i3)+&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;] - x[int(i3)]);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;xm1z = x[int(i2)] + mod(i2,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)*(x[int(i2)+&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;] - x[int(i2)]);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;xm3z = x[int(i1)] + mod(i1,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)*(x[int(i1)+&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;] - x[int(i1)]);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;m = x3z - x1z;&lt;/P&gt;&lt;P&gt;n = xm1z - xm3z;&lt;/P&gt;&lt;P&gt;p = x1z - xm1z;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/*--- Ratio used to choose proper Johnson system ---*/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;ratio = m*n/p**&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;tol = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.05&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/*---Select appropriate Johnson Family &amp;amp; Estimate Parameters---*/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;if (ratio &amp;gt; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1.0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; + tol) then do;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/*--- Johnson Su Parameter Estimates ---*/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;temp = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;*(m/p + n/p);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;eta = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;*zval/(log(temp + sqrt(temp*temp -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; )));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;temp = (n/p - m/p) / ( &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;*(sqrt(m*n/(p*p) - &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)) );&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;gamma = eta*log(temp + sqrt(temp*temp + &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;lambda = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;*p*sqrt(m*n/(p*p)-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)/((m/p+n/p- &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)*sqrt(m/p+n/p+&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;epsilon = (x1z + xm1z)/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; + p*(n/p - m/p) / ( &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;*(m/p+n/p-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create parms var{eta gamma lambda epsilon};&lt;/P&gt;&lt;P&gt;append;&lt;/P&gt;&lt;P&gt;close parms;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;type = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'1'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;else if (ratio &amp;lt; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1.0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; - tol ) then do;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/*--- Johnson Sb Parameter Estimates ---*/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;temp = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;* sqrt( (&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; + p/m)*(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; + p/n) );&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;eta = zval / log( temp + sqrt(temp*temp - &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;) );&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;temp = (p/n-p/m)*sqrt((&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;+p/m)*(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;+p/n)- &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)/(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;*(p*p/(m*n)-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;gamma = eta*log(temp + sqrt(temp*temp + &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;) );&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;lambda = p*sqrt(( (&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; + p/m)*(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;+p/n)-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)**&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; - &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;4&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)/(p*p/(m*n)-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;epsilon = (x1z + xm1z)/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;-lambda/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;+p*(p/n-p/m)/(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;*(p*p/(m*n)-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create parms var{eta gamma lambda epsilon};&lt;/P&gt;&lt;P&gt;append;&lt;/P&gt;&lt;P&gt;close parms;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;type = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'2'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;else do;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* Johnson Sl Parameter Estimates */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;eta = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;*zval / log(m/p);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;gamma = eta*log( (m/p - &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;) / (p*sqrt(m/p)) );&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;epsilon = (x1z + xm1z)/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; - (p/&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;)* (m/p + &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;) / (m/p - &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000" face="Courier New" size="2"&gt;/* create dataset containing parameters */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create parms var{gamma eta epsilon};&lt;/P&gt;&lt;P&gt;append;&lt;/P&gt;&lt;P&gt;close parms;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;type = &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'3'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;call symput(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"DistType"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;,type);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*quit;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 10:26:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Fitting-Johnson-curves/m-p/609328#M29509</guid>
      <dc:creator>Tramp</dc:creator>
      <dc:date>2019-12-04T10:26:55Z</dc:date>
    </item>
  </channel>
</rss>

