<?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: power function in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/power-function/m-p/43535#M11399</link>
    <description>Peat,&lt;BR /&gt;
Please tell us a bit more about what you are looking for.  Are you talking about the power of a test (1-beta)?  If so:&lt;BR /&gt;
&lt;BR /&gt;
The power of a statistical test can usually be calculated.  It is not real hard to do, but you have to know the right formula and usually an inverse probability function.&lt;BR /&gt;
&lt;BR /&gt;
In SAS/STAT you also now have the POWER procedure and the Power and Sample Size application.&lt;BR /&gt;
Art</description>
    <pubDate>Sun, 04 Jul 2010 06:22:27 GMT</pubDate>
    <dc:creator>ArtC</dc:creator>
    <dc:date>2010-07-04T06:22:27Z</dc:date>
    <item>
      <title>power function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/power-function/m-p/43534#M11398</link>
      <description>Hello all, I am new to this forum.&lt;BR /&gt;
&lt;BR /&gt;
I am an ecologist who has been using sas for years to do basic statistics and data manipulations.  I am interested in calculating a power function from a set of data in the form:&lt;BR /&gt;
&lt;BR /&gt;
x       y&lt;BR /&gt;
1	28&lt;BR /&gt;
2	40&lt;BR /&gt;
3	45&lt;BR /&gt;
4	48&lt;BR /&gt;
5	52&lt;BR /&gt;
6	54&lt;BR /&gt;
&lt;BR /&gt;
Is there a way I can do this in proc reg? or is there a different procedure to calculate this?  I have spend many hours wading through online documentation.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance.&lt;BR /&gt;
peat</description>
      <pubDate>Fri, 02 Jul 2010 13:39:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/power-function/m-p/43534#M11398</guid>
      <dc:creator>peatjohnston</dc:creator>
      <dc:date>2010-07-02T13:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: power function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/power-function/m-p/43535#M11399</link>
      <description>Peat,&lt;BR /&gt;
Please tell us a bit more about what you are looking for.  Are you talking about the power of a test (1-beta)?  If so:&lt;BR /&gt;
&lt;BR /&gt;
The power of a statistical test can usually be calculated.  It is not real hard to do, but you have to know the right formula and usually an inverse probability function.&lt;BR /&gt;
&lt;BR /&gt;
In SAS/STAT you also now have the POWER procedure and the Power and Sample Size application.&lt;BR /&gt;
Art</description>
      <pubDate>Sun, 04 Jul 2010 06:22:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/power-function/m-p/43535#M11399</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-07-04T06:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: power function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/power-function/m-p/43536#M11400</link>
      <description>Thanks Art, &lt;BR /&gt;
&lt;BR /&gt;
I am not talking about the power of a test, though I am interested in sample size.  These are cumulative species richness curves for which I want to associate a power function in the form:&lt;BR /&gt;
&lt;BR /&gt;
y=a*x^b&lt;BR /&gt;
&lt;BR /&gt;
For the original set of numbers I posted, the function is:&lt;BR /&gt;
&lt;BR /&gt;
y=29.37x^0.358&lt;BR /&gt;
&lt;BR /&gt;
I want to compare a series of these curves, by looking at the variation of the coefficients with each added sample 'x'.  My question is how do I find these coefficients 'a' and 'b' from the given data.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again, &lt;BR /&gt;
&lt;BR /&gt;
peat</description>
      <pubDate>Sun, 04 Jul 2010 11:49:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/power-function/m-p/43536#M11400</guid>
      <dc:creator>peatjohnston</dc:creator>
      <dc:date>2010-07-04T11:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: power function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/power-function/m-p/43537#M11401</link>
      <description>Peat,&lt;BR /&gt;
&lt;BR /&gt;
How about PROC NLIN?  &lt;BR /&gt;
&lt;BR /&gt;
Try this:&lt;BR /&gt;
data one;&lt;BR /&gt;
input x y;&lt;BR /&gt;
cards;&lt;BR /&gt;
1 28&lt;BR /&gt;
2 40&lt;BR /&gt;
3 45&lt;BR /&gt;
4 48&lt;BR /&gt;
5 52&lt;BR /&gt;
6 54&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
proc nlin data=one method=marquardt hougaard;&lt;BR /&gt;
   parms a=3 b=2;&lt;BR /&gt;
   model y=a*x**b;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
I think the results will be straightforward.&lt;BR /&gt;
&lt;BR /&gt;
Now if variances are not gaussian, or there is clustering or hierarchical issues, you may wish to consider PROC NLMIXED.&lt;BR /&gt;
&lt;BR /&gt;
Steve Denham</description>
      <pubDate>Tue, 06 Jul 2010 11:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/power-function/m-p/43537#M11401</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2010-07-06T11:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: power function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/power-function/m-p/43538#M11402</link>
      <description>Steve, &lt;BR /&gt;
&lt;BR /&gt;
I think this might work, but how would I output the coefficients into a new data set?  I would be looking at getting the coefficients from hundreds of these measures, then plot the mean and + - 1 standard deviation for them.&lt;BR /&gt;
&lt;BR /&gt;
Thanks, &lt;BR /&gt;
&lt;BR /&gt;
peat</description>
      <pubDate>Fri, 09 Jul 2010 22:48:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/power-function/m-p/43538#M11402</guid>
      <dc:creator>peatjohnston</dc:creator>
      <dc:date>2010-07-09T22:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: power function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/power-function/m-p/43539#M11403</link>
      <description>Hi:&lt;BR /&gt;
  If you use the ODS TRACE statement, you can find out the name of the output object that contains the coefficient and the mean and the std. Then, once you have then output object name(s), you can create an output dataset that contains the data points. From there, it would be fairly easy to graph the points.&lt;BR /&gt;
&lt;BR /&gt;
  For example, if you modified the above PROC NLIN code to use ODS TRACE:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ODS TRACE ON/ LABEL;&lt;BR /&gt;
...PROC NLIN...&lt;BR /&gt;
ODS TRACE OFF;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                    &lt;BR /&gt;
Then you would see in your SAS log:&lt;BR /&gt;
[pre]&lt;BR /&gt;
Output Added:&lt;BR /&gt;
-------------&lt;BR /&gt;
Name:       IterHistory&lt;BR /&gt;
Label:      Iterative Phase&lt;BR /&gt;
Template:   stat.nlin.IterHistory&lt;BR /&gt;
Path:       Nlin.IterHistory&lt;BR /&gt;
Label Path: 'The Nlin Procedure'.'Iterative Phase'&lt;BR /&gt;
-------------&lt;BR /&gt;
NOTE: Convergence criterion met.&lt;BR /&gt;
                 &lt;BR /&gt;
Output Added:&lt;BR /&gt;
-------------&lt;BR /&gt;
Name:       ConvergenceStatus&lt;BR /&gt;
Label:      Convergence Status&lt;BR /&gt;
Template:   Stat.nlin.ConvergenceStatus&lt;BR /&gt;
Path:       Nlin.ConvergenceStatus&lt;BR /&gt;
Label Path: 'The Nlin Procedure'.'Convergence Status'&lt;BR /&gt;
-------------&lt;BR /&gt;
                      &lt;BR /&gt;
Output Added:&lt;BR /&gt;
-------------&lt;BR /&gt;
Name:       EstSummary&lt;BR /&gt;
Label:      Estimation Summary&lt;BR /&gt;
Template:   stat.nlin.EstSummary&lt;BR /&gt;
Path:       Nlin.EstSummary&lt;BR /&gt;
Label Path: 'The Nlin Procedure'.'Estimation Summary'&lt;BR /&gt;
-------------&lt;BR /&gt;
                                               &lt;BR /&gt;
Output Added:&lt;BR /&gt;
-------------&lt;BR /&gt;
Name:       ANOVA&lt;BR /&gt;
Label:      Summary Statistics : Dependent Variable y&lt;BR /&gt;
Template:   stat.nlin.ANOVA&lt;BR /&gt;
Path:       Nlin.ANOVA&lt;BR /&gt;
Label Path: 'The Nlin Procedure'.'Summary Statistics : Dependent&lt;BR /&gt;
Variable y'&lt;BR /&gt;
-------------&lt;BR /&gt;
                                   &lt;BR /&gt;
Output Added:&lt;BR /&gt;
-------------&lt;BR /&gt;
Name:       ParameterEstimates&lt;BR /&gt;
Label:      Parameter Summary&lt;BR /&gt;
Template:   stat.nlin.ParameterEstimates&lt;BR /&gt;
Path:       Nlin.ParameterEstimates&lt;BR /&gt;
Label Path: 'The Nlin Procedure'.'Parameter Summary'&lt;BR /&gt;
-------------&lt;BR /&gt;
                                              &lt;BR /&gt;
Output Added:&lt;BR /&gt;
-------------&lt;BR /&gt;
Name:       CorrB&lt;BR /&gt;
Label:      Approximate Correlation Matrix&lt;BR /&gt;
Template:   stat.nlin.CorrB&lt;BR /&gt;
Path:       Nlin.CorrB&lt;BR /&gt;
Label Path: 'The Nlin Procedure'.'Approximate Correlation Matrix'&lt;BR /&gt;
-------------&lt;BR /&gt;
                                                 &lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
Let's say that you wanted the Parameter Estimates output object, you could create it like this (now that we know the name from the TRACE output):&lt;BR /&gt;
                    &lt;BR /&gt;
[pre]&lt;BR /&gt;
ods output ParameterEstimates=work.parmest;&lt;BR /&gt;
proc nlin data=one method=marquardt hougaard;&lt;BR /&gt;
parms a=3 b=2;&lt;BR /&gt;
model y=a*x**b;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                         &lt;BR /&gt;
and the output dataset WORK.PARMEST would contain:&lt;BR /&gt;
[pre]&lt;BR /&gt;
Obs   Parameter   Estimate     StdErr    Alpha    LowerCL    UpperCL   Skewness    tValue    Probt&lt;BR /&gt;
                             &lt;BR /&gt;
 1        a        30.1779     1.2717     0.05    26.6473    33.7086     0.0359     23.73   &amp;lt;.0001&lt;BR /&gt;
 2        b         0.3366     0.0301     0.05     0.2531     0.4201     0.0559     11.19   0.0004&lt;BR /&gt;
&lt;BR /&gt;
[/pre]            &lt;BR /&gt;
                  &lt;BR /&gt;
ODS TRACE and ODS OUTPUT work with any SAS procedure that creates output objects, so if you find that PROC NLIN is not the procedure you need, then you only need to use ODS TRACE ON/OFF around your new procedure to find out the names of the output objects.&lt;BR /&gt;
 &lt;BR /&gt;
In addition, if you have SAS 9.2, you can try using the ODS GRAPHICS ON/OFF statements around your STAT procedure to see whether there are any automatic graphics associated with your procedure of choice.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Sat, 10 Jul 2010 15:24:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/power-function/m-p/43539#M11403</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-07-10T15:24:08Z</dc:date>
    </item>
  </channel>
</rss>

