<?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 get a SAS table from inset of a proc capability in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-SAS-table-from-inset-of-a-proc-capability/m-p/755779#M238561</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Can you live with below solution?&lt;/P&gt;
&lt;P&gt;The capability indices are in work.FitIndices!&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Amps;
   label Decibels = 'Amplification in Decibels (dB)';
   input Decibels @@;
   datalines;
4.54 4.87 4.66 4.90 4.68 5.22 4.43 5.14 3.07 4.22
5.09 3.41 5.75 5.16 3.96 5.37 5.70 4.11 4.83 4.51
4.57 4.16 5.73 3.64 5.48 4.95 4.57 4.46 4.75 5.38
5.19 4.35 4.98 4.87 3.53 4.46 4.57 4.69 5.27 4.67
5.03 4.50 5.35 4.55 4.05 6.63 5.32 5.24 5.73 5.08
5.07 5.42 5.05 5.70 4.79 4.34 5.06 4.64 4.82 3.24
4.79 4.46 3.84 5.05 5.46 4.64 6.13 4.31 4.81 4.98
4.95 5.57 4.11 4.15 5.95
;

*ods select histogram;
ods graphics on;
ods trace on;
title 'Boosting Power of Telephone Amplifiers';
ods output FitIndices=work.FitIndices;
proc capability data=Amps;
   specs  target = 5 lsl = 4 usl = 6;
   var Decibels;
 histogram / normal(indices) WEIBULL(indices) Gamma(indices) Lognormal(indices);
 inset mean std cv n ppk="Ppk" 
       normal(ESTPCTLSS) WEIBULL(CPK) WEIBULL(ESTPCTLSS) Gamma(CPK) Gamma(ESTPCTGTR)&lt;BR /&gt;       lognormal(CPK) lognormal(ESTPCTGTR)
       normal(ksdpval) WEIBULL(ksdpval) / cfill=white pos=nw;
run;
quit;
/* end of program */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jul 2021 23:01:00 GMT</pubDate>
    <dc:creator>sbxkoenk</dc:creator>
    <dc:date>2021-07-21T23:01:00Z</dc:date>
    <item>
      <title>How to get a SAS table from inset of a proc capability</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-SAS-table-from-inset-of-a-proc-capability/m-p/755773#M238557</link>
      <description>&lt;P&gt;I am using a macro to go through a list of parameters to do proc capability for each single parameter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In&amp;nbsp; "inset" step I am getting some statistical results, including ppk and cpk calculation. The simple version of the code is as follow:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ods trace on;&lt;BR /&gt;%if ....  %then %do;
ods select histogram;
proc capability data=have;
 specs lsl=&amp;amp;lsl;
 var result; 
 histogram / normal(indices) WEIBULL(indices)Gamma(indices) Lognormal(indices);
 by par1  par2;

 inset mean std cv n ppk="Ppk" normal(ESTPCTLSS) WEIBULL(CPK) WEIBULL(ESTPCTLSS) Gamma(CPK) Gamma(ESTPCTGTR)lognormal(CPK) lognormal(ESTPCTGTR)
  normal(ksdpval) WEIBULL(ksdpval)/ cfill=white pos=nw;
run;
quit;
%end;&lt;/PRE&gt;&lt;P&gt;Running the code I have a nice graph with a legend next to that which shows mean, std, ..., and CPK calculated based on different distributions (normal, weibull, etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;What I want to do is to get a SAS table that includes all the CPK. so as an example I want to have a table that has two columns&amp;nbsp; that these columns are coming from that inset step that I have in proc capability step&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;col1            col2&lt;BR /&gt;normal ppk      yyy
weibull cpk     xxx
gamma cpk       zzz&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I did so far was trying to use&lt;/P&gt;&lt;PRE&gt;ods trace on;&lt;/PRE&gt;&lt;P&gt;which I was not successful to get the result.&lt;/P&gt;&lt;P&gt;Any help is much appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 22:43:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-SAS-table-from-inset-of-a-proc-capability/m-p/755773#M238557</guid>
      <dc:creator>Al_senior</dc:creator>
      <dc:date>2021-07-21T22:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a SAS table from inset of a proc capability</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-SAS-table-from-inset-of-a-proc-capability/m-p/755777#M238560</link>
      <description>ODS TRACE just tells you the table/output names. You need to figure out which one it is and then capture it via ODS OUTPUT. &lt;BR /&gt;Since we don't have your data and can't run the code, posting that may be at least helpful. Since this is still using SAS/GRAPH not sure how much of this approach is possible with this procedure......</description>
      <pubDate>Wed, 21 Jul 2021 22:55:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-SAS-table-from-inset-of-a-proc-capability/m-p/755777#M238560</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-07-21T22:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a SAS table from inset of a proc capability</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-SAS-table-from-inset-of-a-proc-capability/m-p/755779#M238561</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Can you live with below solution?&lt;/P&gt;
&lt;P&gt;The capability indices are in work.FitIndices!&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Amps;
   label Decibels = 'Amplification in Decibels (dB)';
   input Decibels @@;
   datalines;
4.54 4.87 4.66 4.90 4.68 5.22 4.43 5.14 3.07 4.22
5.09 3.41 5.75 5.16 3.96 5.37 5.70 4.11 4.83 4.51
4.57 4.16 5.73 3.64 5.48 4.95 4.57 4.46 4.75 5.38
5.19 4.35 4.98 4.87 3.53 4.46 4.57 4.69 5.27 4.67
5.03 4.50 5.35 4.55 4.05 6.63 5.32 5.24 5.73 5.08
5.07 5.42 5.05 5.70 4.79 4.34 5.06 4.64 4.82 3.24
4.79 4.46 3.84 5.05 5.46 4.64 6.13 4.31 4.81 4.98
4.95 5.57 4.11 4.15 5.95
;

*ods select histogram;
ods graphics on;
ods trace on;
title 'Boosting Power of Telephone Amplifiers';
ods output FitIndices=work.FitIndices;
proc capability data=Amps;
   specs  target = 5 lsl = 4 usl = 6;
   var Decibels;
 histogram / normal(indices) WEIBULL(indices) Gamma(indices) Lognormal(indices);
 inset mean std cv n ppk="Ppk" 
       normal(ESTPCTLSS) WEIBULL(CPK) WEIBULL(ESTPCTLSS) Gamma(CPK) Gamma(ESTPCTGTR)&lt;BR /&gt;       lognormal(CPK) lognormal(ESTPCTGTR)
       normal(ksdpval) WEIBULL(ksdpval) / cfill=white pos=nw;
run;
quit;
/* end of program */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 23:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-a-SAS-table-from-inset-of-a-proc-capability/m-p/755779#M238561</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-07-21T23:01:00Z</dc:date>
    </item>
  </channel>
</rss>

