<?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: Using a Macro to Create Multiple Plots of Variables (showing individual trends for each over tim in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445337#M15317</link>
    <description>&lt;P&gt;This is very frustrating, because nowhere have you actually ever stated what the problem is, other than you need help with macros. What is the problem you see when you run this code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a warning about the title statement, is that the problem? Or something else?&lt;/P&gt;</description>
    <pubDate>Tue, 13 Mar 2018 21:57:49 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-03-13T21:57:49Z</dc:date>
    <item>
      <title>Using a Macro to Create Multiple Plots of Variables (showing individual trends for each over time)</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/444875#M15303</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to create a whole series of individual&amp;nbsp;time series plots utilizing a macro (for all my independent variables, i.e.&amp;nbsp;'&amp;amp;indvar') over a series of years (C_EDDYR)? (each plot would represent each individual '&amp;amp;indvar' by year)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to get my trend test to work with the macro variable (see below):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;proc&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;SPAN style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;freq&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;=t;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;tables&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; C_EDDYR*(&amp;amp;indvar) / &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;trend&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="background: white; color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt; gastro_isol=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="background: white; color: navy; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;run&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;********************************************************&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN style="background: white; color: black; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;"&gt;&amp;nbsp;...but now, when I try various 'plotting codes' with the macro (to plot the trend I get statistics on above), I'm not able to get&amp;nbsp;what I'm looking for:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/*try to plot time trend*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;gplot&lt;/STRONG&gt; data=t;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; plot C_EDDYR*(&amp;amp;indvar);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; symbol1 v=star c=blue;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title "Time Series Plot for (&amp;amp;indvar) and Year of Estimated Delivery";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; where gastro_isol=&lt;STRONG&gt;0&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;quit&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; title;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sgpanel&lt;/STRONG&gt; data=t ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; panelby (&amp;amp;indvar);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; series x=C_EDDYR y=(&amp;amp;indvar);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; where gastro_isol=&lt;STRONG&gt;0&lt;/STRONG&gt;;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any assistance would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Taylor (using SAS V 9.4)&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 18:32:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/444875#M15303</guid>
      <dc:creator>Taylor081</dc:creator>
      <dc:date>2018-03-12T18:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Macro to Create Multiple Plots of Variables (showing individual trends for each over tim</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/444956#M15306</link>
      <description>&lt;P&gt;So, you haven't written a macro, and you haven't given the macro variable &amp;amp;indvar a value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But a macro isn't needed here. Nor is a macro variable needed here. Unless there are other complications you haven't told us about.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the search and replace option in the SAS editor to replace the string "&amp;amp;indvar" with the corresponding string of variables that you are interested in. Done. No macros. No macro variables.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2018 21:57:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/444956#M15306</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-03-12T21:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Macro to Create Multiple Plots of Variables (showing individual trends for each over tim</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445147#M15311</link>
      <description>Thanks.&lt;BR /&gt;Attaching the macro section below (I hesitated to initially include because there are so many variables involved). It would be great if the plots could incorporate the macro and create individual plots (one for each variable showing the time trend). Any other tips you may have would be greatly appreciated. Actually, is it even possible to plot the Cochran Armitage trend plots? (maybe there is no easy graphic for this)&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data t;&lt;BR /&gt;set g2;&lt;BR /&gt;if HHIncGen in:(1) then inc=0 ; /*less than 10,000*/&lt;BR /&gt;if HHIncSpec in:(1) then inc=0 ; /*10,000 to 19,000*/&lt;BR /&gt;if HHIncSpec in:(2) then inc=0 ; /*20,000 to 29,000*/&lt;BR /&gt;if HHIncSpec in:(3) then inc=0 ; /*30,000 to 39,000*/&lt;BR /&gt;if HHIncSpec in:(4) then inc=0 ; /*40,000 to 49,000*/&lt;BR /&gt;if HHIncGen in:(2) then inc=1 ; /*50,000+*/&lt;BR /&gt;&lt;BR /&gt;if HHIncSup in:(0,1,2,3) then incs=0;&lt;BR /&gt;if HHIncSup ge 4 then incs=1;&lt;BR /&gt;&lt;BR /&gt;if livebirths in:(0) then lb=0;&lt;BR /&gt;if livebirths ge 1 then lb=1;&lt;BR /&gt;&lt;BR /&gt;if Mlang in:(8) then lang=0;/*english*/&lt;BR /&gt;if Mlang in:(24) then lang=1; /*spanish*/&lt;BR /&gt;&lt;BR /&gt;if c_meduc in:(1,2) then educ_d=1;&lt;BR /&gt;if c_meduc in:(3,4,5) then educ_d=0;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;if C_bminih in:(1,2) then bmid=0;&lt;BR /&gt;if C_bminih in:(3,4) then bmid=1;&lt;BR /&gt;&lt;BR /&gt;if **bleep**e_EDDyr lt 25 then **bleep**e=0;&lt;BR /&gt;if **bleep**e_EDDyr ge 25 and **bleep**e_EDDyr lt 35 then **bleep**e=0;&lt;BR /&gt;if **bleep**e_EDDyr ge 35 and **bleep**e_EDDyr lt 45 then **bleep**e=1;&lt;BR /&gt;if **bleep**e_EDDyr ge 45 then **bleep**e=1;&lt;BR /&gt;&lt;BR /&gt;if C_mage_e lt 35 then mage=0;&lt;BR /&gt;if C_mage_e ge 35 then mage=1;&lt;BR /&gt;&lt;BR /&gt;if C_binge4 in:(0,2) then binge=0;&lt;BR /&gt;if C_binge4 in:(1) then binge=1;&lt;BR /&gt;&lt;BR /&gt;if MDS_qrtl in:(0,1) then mds2=0;&lt;BR /&gt;if MDS_qrtl in:(2,3) then mds2=1;&lt;BR /&gt;&lt;BR /&gt;if DQI_qrtl in:(0,1) then dqi2=0;&lt;BR /&gt;if DQI_qrtl in:(2,3) then dqi2=1;&lt;BR /&gt;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;%let indvar =&lt;BR /&gt;/*DQI_qrtl&lt;BR /&gt;MDS_qrtl */&lt;BR /&gt;mds2&lt;BR /&gt;/*GUI_B3P3 */&lt;BR /&gt;binge&lt;BR /&gt;tc&lt;BR /&gt;mage&lt;BR /&gt;C_mrace&lt;BR /&gt;C_frace&lt;BR /&gt;Crace&lt;BR /&gt;educ_d&lt;BR /&gt;Mborn&lt;BR /&gt;myrs&lt;BR /&gt;inc&lt;BR /&gt;incs&lt;BR /&gt;lang&lt;BR /&gt;C_smoke&lt;BR /&gt;work_or_home_B1P3&lt;BR /&gt;/*worksmk_B1P3*/&lt;BR /&gt;hsmkpg&lt;BR /&gt;homesmk_B1P3&lt;BR /&gt;lb&lt;BR /&gt;plurality&lt;BR /&gt;AnyOC&lt;BR /&gt;LocID&lt;BR /&gt;diab1_2&lt;BR /&gt;gestndiab_During2&lt;BR /&gt;HBP&lt;BR /&gt;HBPPg&lt;BR /&gt;bmid&lt;BR /&gt;hhinc&lt;BR /&gt;HH_dichot_median&lt;BR /&gt;**bleep**e&lt;BR /&gt;MMarij&lt;BR /&gt;mcocaine&lt;BR /&gt;mcrack&lt;BR /&gt;mhalluc&lt;BR /&gt;mhash&lt;BR /&gt;MHeroin&lt;BR /&gt;MMush&lt;BR /&gt;MJob&lt;BR /&gt;MAForces&lt;BR /&gt;Prenatal&lt;BR /&gt;Anyscan&lt;BR /&gt;Fertgate&lt;BR /&gt;Nausea&lt;BR /&gt;Heat_expB1P9&lt;BR /&gt;DrinkCook_1&lt;BR /&gt;seiz&lt;BR /&gt;solvent&lt;BR /&gt;/*pregnancy intention*/&lt;BR /&gt;int&lt;BR /&gt;/*residential moves B1P3*/&lt;BR /&gt;movingb1p3&lt;BR /&gt;injuryb1p3&lt;BR /&gt;GU_infectionb1p3&lt;BR /&gt;bronchodilatorb1p3&lt;BR /&gt;antiherpeticsb1p3&lt;BR /&gt;opioidb1p3&lt;BR /&gt;illicit_drugb1p3&lt;BR /&gt;short_IPI&lt;BR /&gt;/*fever from cold or flu B1P3*/&lt;BR /&gt;b1p3coldflu_fever&lt;BR /&gt;/*kidney, bladder, or UTI B3P9*/&lt;BR /&gt;KidBlUTI&lt;BR /&gt;pah_exp&lt;BR /&gt;mds2&lt;BR /&gt;dqi2&lt;BR /&gt;Inf_UTI_FevAny&lt;BR /&gt;homesmk_B1P3;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/*missings*/&lt;BR /&gt;%let missvar = if&lt;BR /&gt;(DQI_qrtl in:(.) or&lt;BR /&gt;MDS_qrtl in:(.) or&lt;BR /&gt;GUI_B3P3 in:(.) or&lt;BR /&gt;C_binge4 in:(.) or&lt;BR /&gt;tc in:(.) or&lt;BR /&gt;/*no missings for C_mage_e*/&lt;BR /&gt;C_mrace in:(.) or&lt;BR /&gt;C_frace in:(.) or&lt;BR /&gt;Crace in:(.) or&lt;BR /&gt;C_meduc in:(.) or&lt;BR /&gt;Mborn in:(.) or&lt;BR /&gt;myrs in:(.) or&lt;BR /&gt;HHIncsup in:(.) or&lt;BR /&gt;Mlang in:(.) or&lt;BR /&gt;C_smoke in:(.) or&lt;BR /&gt;work_or_home_B1P3 in:(.) or&lt;BR /&gt;hsmkpg in(.) or&lt;BR /&gt;&lt;BR /&gt;/*worksmk_B1P3*/&lt;BR /&gt;WsmkB1 in:(.) or&lt;BR /&gt;WsmkM1 in:(.) or&lt;BR /&gt;WsmkM2 in:(.) or&lt;BR /&gt;WsmkM3 in:(.) or&lt;BR /&gt;&lt;BR /&gt;/*homesmk_B1P3*/&lt;BR /&gt;HsmkB1 in:(.) or&lt;BR /&gt;HsmkM1 in:(.) or&lt;BR /&gt;HsmkM2 in:(.) or&lt;BR /&gt;HsmkM3 in:(.) or&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;livebirths in:(.) or&lt;BR /&gt;plurality in:(.) or&lt;BR /&gt;AnyOC in:(.) or&lt;BR /&gt;&lt;BR /&gt;/*no missings for LocID*/&lt;BR /&gt;&lt;BR /&gt;diab1_2 in:(.) or&lt;BR /&gt;/*no missings for gestndiab_During2*/&lt;BR /&gt;&lt;BR /&gt;HBP in:(.) or&lt;BR /&gt;HBPPg in:(.) or&lt;BR /&gt;C_bminih in:(.) or&lt;BR /&gt;hhinc in:(.) or&lt;BR /&gt;HH_dichot_median in:(.) or&lt;BR /&gt;&lt;BR /&gt;/*use **bleep**e for father's age*/&lt;BR /&gt;FBirthDD in:(.) or&lt;BR /&gt;FBirthMM in:(.) or&lt;BR /&gt;FBirthYY in:(.) or&lt;BR /&gt;&lt;BR /&gt;MMarij in:(.) or&lt;BR /&gt;mcocaine in:(.) or&lt;BR /&gt;mcrack in:(.) or&lt;BR /&gt;mhalluc in:(.) or&lt;BR /&gt;mhash in:(.) or&lt;BR /&gt;MHeroin in:(.) or&lt;BR /&gt;MMush in:(.) or&lt;BR /&gt;&lt;BR /&gt;MJob in:(.) or&lt;BR /&gt;MAForces in:(.) or&lt;BR /&gt;Prenatal in:(.) or&lt;BR /&gt;&lt;BR /&gt;Anyscan in:(.) or&lt;BR /&gt;Fertgate in:(.) or&lt;BR /&gt;Nausea in:(.) or&lt;BR /&gt;Heat_expB1P9 in(.) or&lt;BR /&gt;DrinkCook_1 in:(.) or&lt;BR /&gt;seiz in:(.) or&lt;BR /&gt;solvent in:(.) or&lt;BR /&gt;/*pregnancy intention*/&lt;BR /&gt;int in:(.) or&lt;BR /&gt;/*residential moves B1P3*/&lt;BR /&gt;movingb1p3 in:(.) or&lt;BR /&gt;injuryb1p3 in:(.) or&lt;BR /&gt;GU_infectionb1p3 in:(.) or&lt;BR /&gt;bronchodilatorb1p3 in:(.) or&lt;BR /&gt;antiherpeticsb1p3 in:(.) or&lt;BR /&gt;opioidb1p3 in:(.) or&lt;BR /&gt;illicit_drugb1p3 in:(.) or&lt;BR /&gt;short_IPI in:(.) or&lt;BR /&gt;/*fever from cold or flu B1P3*/&lt;BR /&gt;b1p3coldflu_fever in:(.) or&lt;BR /&gt;/*kidney, bladder, or UTI B3P9*/&lt;BR /&gt;KidBlUTI in:(.) or&lt;BR /&gt;pah_exp in:(.)) then delete;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data i7;&lt;BR /&gt;set g2;&lt;BR /&gt;&amp;amp;missvar;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/*Cochran Armitage Test for trend*/&lt;BR /&gt;&lt;BR /&gt;proc freq data=t;&lt;BR /&gt;tables C_EDDYR*(&amp;amp;indvar) / trend;&lt;BR /&gt;where gastro_isol=0;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;/*try to plot time trend*/&lt;BR /&gt;&lt;BR /&gt;proc gplot data=t;&lt;BR /&gt;plot C_EDDYR*(&amp;amp;indvar);&lt;BR /&gt;symbol1 v=star c=blue;&lt;BR /&gt;title "Time Series Plot for (&amp;amp;indvar) and Year of Estimated Delivery";&lt;BR /&gt;where gastro_isol=0;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;BR /&gt;title;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;proc sgpanel data=t ;&lt;BR /&gt;panelby (&amp;amp;indvar);&lt;BR /&gt;series x=C_EDDYR y=(&amp;amp;indvar);&lt;BR /&gt;where gastro_isol=0;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Mar 2018 13:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445147#M15311</guid>
      <dc:creator>Taylor081</dc:creator>
      <dc:date>2018-03-13T13:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Macro to Create Multiple Plots of Variables (showing individual trends for each over tim</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445199#M15314</link>
      <description>&lt;P&gt;Okay, I see now. Macros are usually used to create dynamic code, which can change depending on other pieces of data (for example, if the user requests the analysis for North America, you may have different variables than if the request is for Europe).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In your case, you seem to be using the macro variable to save some typing, certainly a valid use of macro variables (I do that sometimes too).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, you need to turn on some options&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint mlogic symbolgen; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then run the code. I would need to see the SASLOG to determine what is the problem here.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 15:25:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445199#M15314</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-03-13T15:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Macro to Create Multiple Plots of Variables (showing individual trends for each over tim</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445285#M15316</link>
      <description>Thanks. I included the options as suggestion.&lt;BR /&gt;Here are the errors in my log:&lt;BR /&gt;&lt;BR /&gt;35651&lt;BR /&gt;35652&lt;BR /&gt;35653 /*try to plot time trend*/&lt;BR /&gt;35654 options mprint mlogic symbolgen;&lt;BR /&gt;35655&lt;BR /&gt;35656 proc gplot data=t;&lt;BR /&gt;35657 plot C_EDDYR*(&amp;amp;indvar);&lt;BR /&gt;SYMBOLGEN: Macro variable INDVAR resolves to mds2 binge tc mage C_mrace C_frace Crace educ_d&lt;BR /&gt;Mborn myrs inc incs lang C_smoke work_or_home_B1P3 hsmkpg homesmk_B1P3 lb&lt;BR /&gt;plurality AnyOC LocID diab1_2 gestndiab_During2 HBP HBPPg bmid hhinc&lt;BR /&gt;HH_dichot_median **bleep**e MMarij mcocaine mcrack mhalluc mhash MHeroin MMush MJob&lt;BR /&gt;MAForces Prenatal Anyscan Fertgate Nausea Heat_expB1P9 DrinkCook_1 seiz solvent&lt;BR /&gt;int movingb1p3 injuryb1p3 GU_infectionb1p3 bronchodilatorb1p3&lt;BR /&gt;antiherpeticsb1p3 opioidb1p3 illicit_drugb1p3 short_IPI b1p3coldflu_fever&lt;BR /&gt;KidBlUTI pah_exp mds2 dqi2 Inf_UTI_FevAny homesmk_B1P3&lt;BR /&gt;35658 symbol1 v=star c=blue;&lt;BR /&gt;SYMBOLGEN: Macro variable INDVAR resolves to mds2 binge tc mage C_mrace C_frace Crace educ_d&lt;BR /&gt;Mborn myrs inc incs lang C_smoke work_or_home_B1P3 hsmkpg homesmk_B1P3 lb&lt;BR /&gt;plurality AnyOC LocID diab1_2 gestndiab_During2 HBP HBPPg bmid hhinc&lt;BR /&gt;HH_dichot_median **bleep**e MMarij mcocaine mcrack mhalluc mhash MHeroin MMush MJob&lt;BR /&gt;MAForces Prenatal Anyscan Fertgate Nausea Heat_expB1P9 DrinkCook_1 seiz solvent&lt;BR /&gt;int movingb1p3 injuryb1p3 GU_infectionb1p3 bronchodilatorb1p3&lt;BR /&gt;antiherpeticsb1p3 opioidb1p3 illicit_drugb1p3 short_IPI b1p3coldflu_fever&lt;BR /&gt;KidBlUTI pah_exp mds2 dqi2 Inf_UTI_FevAny homesmk_B1P3&lt;BR /&gt;35659 title "Time Series Plot for (&amp;amp;indvar) and Year of Estimated Delivery";&lt;BR /&gt;NOTE: The quoted string currently being processed has become more than 262 characters long.&lt;BR /&gt;You might have unbalanced quotation marks.&lt;BR /&gt;35660 where gastro_isol=0;&lt;BR /&gt;35661 run;&lt;BR /&gt;&lt;BR /&gt;WARNING: The text of TITLE is too long. It will be truncated.&lt;BR /&gt;WARNING: TITLE1 is too long. Height has been reduced to 34.74 pct of specified or default size.&lt;BR /&gt;NOTE: 634 observation(s) contained a MISSING value for the C_EDDYR * mds2 request.&lt;BR /&gt;NOTE: 398 observation(s) contained a MISSING value for the C_EDDYR * binge request.&lt;BR /&gt;NOTE: 325 observation(s) contained a MISSING value for the C_EDDYR * tc request.&lt;BR /&gt;NOTE: 7 observation(s) contained a MISSING value for the C_EDDYR * C_mrace request.&lt;BR /&gt;NOTE: 483 observation(s) contained a MISSING value for the C_EDDYR * C_frace request.&lt;BR /&gt;NOTE: 482 observation(s) contained a MISSING value for the C_EDDYR * crace request.&lt;BR /&gt;NOTE: 342 observation(s) contained a MISSING value for the C_EDDYR * educ_d request.&lt;BR /&gt;NOTE: 332 observation(s) contained a MISSING value for the C_EDDYR * MBorn request.&lt;BR /&gt;NOTE: 6 observation(s) contained a MISSING value for the C_EDDYR * myrs request.&lt;BR /&gt;NOTE: 1171 observation(s) contained a MISSING value for the C_EDDYR * inc request.&lt;BR /&gt;NOTE: 1108 observation(s) contained a MISSING value for the C_EDDYR * incs request.&lt;BR /&gt;NOTE: 800 observation(s) contained a MISSING value for the C_EDDYR * lang request.&lt;BR /&gt;NOTE: 298 observation(s) contained a MISSING value for the C_EDDYR * C_smoke request.&lt;BR /&gt;NOTE: 328 observation(s) contained a MISSING value for the C_EDDYR * work_or_home_B1P3 request.&lt;BR /&gt;NOTE: 296 observation(s) contained a MISSING value for the C_EDDYR * HSmkPg request.&lt;BR /&gt;NOTE: 303 observation(s) contained a MISSING value for the C_EDDYR * homesmk_B1P3 request.&lt;BR /&gt;NOTE: 51 observation(s) contained a MISSING value for the C_EDDYR * lb request.&lt;BR /&gt;NOTE: 1 observation(s) contained a MISSING value for the C_EDDYR * plurality request.&lt;BR /&gt;NOTE: 8368 observation(s) contained a MISSING value for the C_EDDYR * AnyOC request.&lt;BR /&gt;NOTE: 79 observation(s) contained a MISSING value for the C_EDDYR * diab1_2 request.&lt;BR /&gt;NOTE: 452 observation(s) contained a MISSING value for the C_EDDYR * gestndiab_During2 request.&lt;BR /&gt;NOTE: 75 observation(s) contained a MISSING value for the C_EDDYR * HBP request.&lt;BR /&gt;NOTE: 10132 observation(s) contained a MISSING value for the C_EDDYR * HBPPg request.&lt;BR /&gt;NOTE: 549 observation(s) contained a MISSING value for the C_EDDYR * bmid request.&lt;BR /&gt;NOTE: 1087 observation(s) contained a MISSING value for the C_EDDYR * hhinc request.&lt;BR /&gt;NOTE: 1404 observation(s) contained a MISSING value for the C_EDDYR * HH_dichot_median request.&lt;BR /&gt;NOTE: 310 observation(s) contained a MISSING value for the C_EDDYR * MMarij request.&lt;BR /&gt;NOTE: 308 observation(s) contained a MISSING value for the C_EDDYR * MCocaine request.&lt;BR /&gt;NOTE: 5096 observation(s) contained a MISSING value for the C_EDDYR * MCrack request.&lt;BR /&gt;NOTE: 5096 observation(s) contained a MISSING value for the C_EDDYR * MHalluc request.&lt;BR /&gt;NOTE: 5096 observation(s) contained a MISSING value for the C_EDDYR * MHash request.&lt;BR /&gt;NOTE: 5095 observation(s) contained a MISSING value for the C_EDDYR * MHeroin request.&lt;BR /&gt;NOTE: 5096 observation(s) contained a MISSING value for the C_EDDYR * MMush request.&lt;BR /&gt;NOTE: 315 observation(s) contained a MISSING value for the C_EDDYR * Mjob request.&lt;BR /&gt;NOTE: 326 observation(s) contained a MISSING value for the C_EDDYR * MAForces request.&lt;BR /&gt;NOTE: 144 observation(s) contained a MISSING value for the C_EDDYR * Prenatal request.&lt;BR /&gt;NOTE: 122 observation(s) contained a MISSING value for the C_EDDYR * AnyScan request.&lt;BR /&gt;NOTE: 265 observation(s) contained a MISSING value for the C_EDDYR * FertGate request.&lt;BR /&gt;NOTE: 72 observation(s) contained a MISSING value for the C_EDDYR * Nausea request.&lt;BR /&gt;NOTE: 5105 observation(s) contained a MISSING value for the C_EDDYR * Heat_expB1P9 request.&lt;BR /&gt;NOTE: 6248 observation(s) contained a MISSING value for the C_EDDYR * DrinkCook_1 request.&lt;BR /&gt;NOTE: 81 observation(s) contained a MISSING value for the C_EDDYR * Seiz request.&lt;BR /&gt;NOTE: 6983 observation(s) contained a MISSING value for the C_EDDYR * Solvent request.&lt;BR /&gt;NOTE: 58 observation(s) contained a MISSING value for the C_EDDYR * int request.&lt;BR /&gt;NOTE: 263 observation(s) contained a MISSING value for the C_EDDYR * movingb1p3 request.&lt;BR /&gt;NOTE: 103 observation(s) contained a MISSING value for the C_EDDYR * injuryb1p3 request.&lt;BR /&gt;NOTE: 256 observation(s) contained a MISSING value for the C_EDDYR * GU_infectionb1p3 request.&lt;BR /&gt;NOTE: 232 observation(s) contained a MISSING value for the C_EDDYR * bronchodilatorb1p3 request.&lt;BR /&gt;NOTE: 213 observation(s) contained a MISSING value for the C_EDDYR * antiherpeticsb1p3 request.&lt;BR /&gt;NOTE: 217 observation(s) contained a MISSING value for the C_EDDYR * opioidb1p3 request.&lt;BR /&gt;NOTE: 316 observation(s) contained a MISSING value for the C_EDDYR * illicit_drugb1p3 request.&lt;BR /&gt;NOTE: 3988 observation(s) contained a MISSING value for the C_EDDYR * short_IPI request.&lt;BR /&gt;NOTE: 7423 observation(s) contained a MISSING value for the C_EDDYR * b1p3coldflu_fever request.&lt;BR /&gt;NOTE: 117 observation(s) contained a MISSING value for the C_EDDYR * KidBlUTI request.&lt;BR /&gt;NOTE: 3664 observation(s) contained a MISSING value for the C_EDDYR * pah_exp request.&lt;BR /&gt;NOTE: 634 observation(s) contained a MISSING value for the C_EDDYR * mds2 request.&lt;BR /&gt;NOTE: 626 observation(s) contained a MISSING value for the C_EDDYR * dqi2 request.&lt;BR /&gt;NOTE: 9415 observation(s) contained a MISSING value for the C_EDDYR * INF_UTI_FevAny request.&lt;BR /&gt;NOTE: 303 observation(s) contained a MISSING value for the C_EDDYR * homesmk_B1P3 request.&lt;BR /&gt;35662 quit;&lt;BR /&gt;&lt;BR /&gt;NOTE: There were 11724 observations read from the data set WORK.T.&lt;BR /&gt;WHERE gastro_isol=0;&lt;BR /&gt;NOTE: PROCEDURE GPLOT used (Total process time):&lt;BR /&gt;real time 15.29 seconds&lt;BR /&gt;cpu time 13.61 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;35663 title;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Mar 2018 20:03:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445285#M15316</guid>
      <dc:creator>Taylor081</dc:creator>
      <dc:date>2018-03-13T20:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Macro to Create Multiple Plots of Variables (showing individual trends for each over tim</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445337#M15317</link>
      <description>&lt;P&gt;This is very frustrating, because nowhere have you actually ever stated what the problem is, other than you need help with macros. What is the problem you see when you run this code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a warning about the title statement, is that the problem? Or something else?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 21:57:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445337#M15317</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-03-13T21:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Macro to Create Multiple Plots of Variables (showing individual trends for each over tim</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445485#M15319</link>
      <description>Thanks. And my apologies for not being more clear. Let's reframe. Forget about the macro for now. Do you happen to know how I can graph?:&lt;BR /&gt;&lt;BR /&gt;/*Cochran Armitage Test for trend*/&lt;BR /&gt;&lt;BR /&gt;proc freq data=t;&lt;BR /&gt;tables var1*var2/ trend;&lt;BR /&gt;run;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Mar 2018 14:24:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445485#M15319</guid>
      <dc:creator>Taylor081</dc:creator>
      <dc:date>2018-03-14T14:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Macro to Create Multiple Plots of Variables (showing individual trends for each over tim</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445487#M15320</link>
      <description>&lt;P&gt;This is very vague as well. The Cochran-Armitage test is a statistic, a single number, I don't understand the concept of plotting a single number.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 14:31:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445487#M15320</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-03-14T14:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Macro to Create Multiple Plots of Variables (showing individual trends for each over tim</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445490#M15321</link>
      <description>Looks like you can do a sort of frequency plot (from: &lt;A href="https://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#procstat_freq_sect032.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#procstat_freq_sect032.htm&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;ods graphics on;&lt;BR /&gt;proc freq data=Pain;&lt;BR /&gt;tables Adverse*Dose / trend measures cl&lt;BR /&gt;plots=freqplot(twoway=stacked);&lt;BR /&gt;test smdrc;&lt;BR /&gt;exact trend / maxtime=60;&lt;BR /&gt;weight Count;&lt;BR /&gt;title 'Clinical Trial for Treatment of Pain';&lt;BR /&gt;run;&lt;BR /&gt;ods graphics off;&lt;BR /&gt;&lt;BR /&gt;I don't want the 'twoway=stacked' though (which gives split bar charts). Is there a way to modify this to show a basic line chart with frequency changes over time?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Mar 2018 14:41:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/445490#M15321</guid>
      <dc:creator>Taylor081</dc:creator>
      <dc:date>2018-03-14T14:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Macro to Create Multiple Plots of Variables (showing individual trends for each over tim</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/447663#M15385</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=Pain;
   tables Adverse*Dose / trend measures cl
          plots=freqplot(twoway=stacked) out=freq_counts;
   test smdrc;
   exact trend / maxtime=60;
   weight Count;
   title 'Clinical Trial for Treatment of Pain';
run;

proc sgplot data=freq_counts;
  title 'Adverse By Dose';
  series x=dose y=count / group=adverse 
                          markers
                          markerattrs=(symbol=circlefilled)
                          datalabel;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;produces the line chart in the screen shot below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Line plot of adverse reactions by dose" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19372iB054B662B21900F5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Adverse reactions by dose.jpg" alt="Line plot of adverse reactions by dose" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Line plot of adverse reactions by dose&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Mar 2018 03:18:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Using-a-Macro-to-Create-Multiple-Plots-of-Variables-showing/m-p/447663#M15385</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2018-03-22T03:18:43Z</dc:date>
    </item>
  </channel>
</rss>

