<?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: Proc Univariate HREF macro in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588290#M14784</link>
    <description>&lt;P&gt;Thank you for the replies! I'll use SGPLOT.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Sep 2019 15:28:14 GMT</pubDate>
    <dc:creator>melgotts</dc:creator>
    <dc:date>2019-09-12T15:28:14Z</dc:date>
    <item>
      <title>Proc Univariate HREF macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588037#M14759</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to use a macro variable in the HREF= statement for Proc Univariate? I am running multiple histograms and would like to use multiple rows of means from a previous Proc Means to superimpose a reference line on each the histograms. I need the means specific to a prior run and not what I'd get from the Proc Univariate. If I use the refline statement in Proc SGPLOT, I'm able to use the macro variable, but I'm struggling with this for HREF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm essentially following this example (&lt;A href="https://blogs.sas.com/content/iml/2016/08/10/bootstrap-confidence-interval-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2016/08/10/bootstrap-confidence-interval-sas.html&lt;/A&gt;), but instead of running the Proc SGPLOT after the bootstrapping, I'd like to use Univariate to create the histograms. Does HREF allow you to use a macro variable? Or will I have to either run say 10 different Univariates or instead figure out how I can do what I want with SGPLOT?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Melissa&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 21:48:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588037#M14759</guid>
      <dc:creator>melgotts</dc:creator>
      <dc:date>2019-09-11T21:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate HREF macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588055#M14761</link>
      <description>Show your work please.</description>
      <pubDate>Wed, 11 Sep 2019 22:41:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588055#M14761</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-09-11T22:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate HREF macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588056#M14762</link>
      <description>&lt;P&gt;Is there a reason not to use the SGPLOT Histogram?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This places two references at the given values in the plot. The values need to be space delimited.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%let refs =  80000 600000;

proc univariate data=sashelp.shoes ;
   histogram sales /href= &amp;amp;refs. ;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Sep 2019 22:47:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588056#M14762</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-11T22:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate HREF macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588248#M14776</link>
      <description>&lt;P&gt;Thank you for the responses. I could certainly use SGPLOT, but I'd like to figure this out in Univariate if possible. I only want 1 refline per histogram, so the code with the 2 reflines won't work. From my Proc Means, I have a column of means (not my data, just an example):&lt;/P&gt;&lt;P&gt;Var&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mean&lt;/P&gt;&lt;P&gt;&amp;nbsp;Red&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;&lt;P&gt;&amp;nbsp;White&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12&lt;/P&gt;&lt;P&gt;&amp;nbsp; Rose&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;33&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I want to run the histograms in univariate after I've bootstrapped. So I would run the univariate by group (my variable, wine in my example) and get a histogram for each wine. Then I want to bring the means from above and put them into the HREF. When I try to write a macro, I get an error (ERROR 22-322: Syntax error, expecting one of the following: a numeric constant, a datetime constant. ERROR 202-322: The option or parameter is not recognized and will be ignored.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I'm wondering if what I'm trying to do is not possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 14:06:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588248#M14776</guid>
      <dc:creator>melgotts</dc:creator>
      <dc:date>2019-09-12T14:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate HREF macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588250#M14777</link>
      <description>&lt;P&gt;Show the code. Show the log.&lt;/P&gt;
&lt;P&gt;Get an example of code that works WITHOUT any macros or macro variables first.&amp;nbsp; Then you can work on how to generate the code.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 14:11:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588250#M14777</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-09-12T14:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate HREF macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588262#M14778</link>
      <description>I think it's possible via template modifications but I'm not sure it's worth it. I would personally use SGPLOT.</description>
      <pubDate>Thu, 12 Sep 2019 14:21:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588262#M14778</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-09-12T14:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate HREF macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588290#M14784</link>
      <description>&lt;P&gt;Thank you for the replies! I'll use SGPLOT.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 15:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588290#M14784</guid>
      <dc:creator>melgotts</dc:creator>
      <dc:date>2019-09-12T15:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Univariate HREF macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588367#M14792</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32417"&gt;@melgotts&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you for the responses. I could certainly use SGPLOT, but I'd like to figure this out in Univariate if possible. I only want 1 refline per histogram, so the code with the 2 reflines won't work. From my Proc Means, I have a column of means (not my data, just an example):&lt;/P&gt;
&lt;P&gt;Var&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Mean&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Red&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;White&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 12&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Rose&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;33&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I want to run the histograms in univariate after I've bootstrapped. So I would run the univariate by group (my variable, wine in my example) and get a histogram for each wine. Then I want to bring the means from above and put them into the HREF. When I try to write a macro, I get an error (ERROR 22-322: Syntax error, expecting one of the following: a numeric constant, a datetime constant. ERROR 202-322: The option or parameter is not recognized and will be ignored.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I'm wondering if what I'm trying to do is not possible?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The example I posted would work with one reference line as well.&lt;/P&gt;
&lt;P&gt;Your original post of "I am running multiple histograms and would like to use multiple rows of means from a previous Proc Means to superimpose a reference line on each the histograms." isn't exactly clear as to how many items you want where.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And again we would ask: Post log with the code that you ran including any messages and errors. Post such into a code box opened with the forum's {I} icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Showing code and data&amp;nbsp;describes what you attempted much better than "I followed the example in SOMELINK.HTML" because we cannot tell exactly how you implemented the code or&amp;nbsp;whether your data matched the same structure as the link used.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 20:13:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Proc-Univariate-HREF-macro/m-p/588367#M14792</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-09-12T20:13:55Z</dc:date>
    </item>
  </channel>
</rss>

