<?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: insert Spearman Coefficient and P value into a graph by using proc template in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/insert-Spearman-Coefficient-and-P-value-into-a-graph-by-using/m-p/355323#M12334</link>
    <description>&lt;P&gt;Hi C,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would use into: with proc sql to obtain the pvalues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then use the nmvar or mvar statement to plot those p-values. So it's quite similar to what you've done already, but instead of manually entereing the numbers, the numbers are already in a macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also you don't have to use the nmvar or mvar statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could also just use something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;entry "Toddler S = 0.518 p = &amp;amp;pvalue1; Young S = 0.383 p = &amp;amp;pvalue2" / textattrs = (weight = bold);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After creating the pvalue1 and pvalue2 macro variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code in this paper shows how I've created macro variables with the into clause and then displayed those values on the plot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings13/243-2013.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings13/243-2013.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kriss &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2017 17:18:04 GMT</pubDate>
    <dc:creator>djrisks</dc:creator>
    <dc:date>2017-05-02T17:18:04Z</dc:date>
    <item>
      <title>insert Spearman Coefficient and P value into a graph by using proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/insert-Spearman-Coefficient-and-P-value-into-a-graph-by-using/m-p/354606#M12319</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote a dynamic template to draw scatter plots, but I want to add coefficient and p value into the figure. The coefficient and p value can be anywhere in the figure. Like what I did now, it's above the figure, but I insert the values manually one by one. Any idea to input then quickly? my goal is just show the values in the figure, I don't care the type, the location or some other things. I&amp;nbsp;just don't want input manually. Below is my template.Code with bold are what I want to change.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc template;&lt;BR /&gt;/* Create the plot template. */&lt;BR /&gt;define statgraph testPattern;&lt;BR /&gt;begingraph / designheight = 8in;&lt;BR /&gt;dynamic var1 var2 var3;&lt;BR /&gt;layout lattice / columns = 1 rows = 2 rowgutter = 20 columngutter = 20;&lt;BR /&gt;/* */&lt;BR /&gt;cell;&lt;BR /&gt;cellheader;&lt;BR /&gt;layout gridded / border = true;&lt;BR /&gt;&lt;STRONG&gt;entry "Toddler S = 0.518 p = &amp;lt;.001; Young S = 0.383 p = &amp;lt;.001" / textattrs = (weight = bold);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;entry "Child S = 0.428 p = &amp;lt;.001; Teen S = 0.383 p = &amp;lt;.001" / textattrs = (weight = bold);&lt;/STRONG&gt;&lt;BR /&gt;endlayout;&lt;BR /&gt;endcellheader;&lt;BR /&gt;layout overlay / yaxisopts = (label = var1 labelattrs = (weight = bold size = 8pt) tickvalueattrs = (weight = bold))&lt;BR /&gt;xaxisopts = (label = var3 labelattrs = (weight = bold) tickvalueattrs = (weight = bold));&lt;BR /&gt;scatterplot y=var1 x=var3 / group=group;&lt;BR /&gt;regressionplot y=var1 x=var3 / group = group name="lines";&lt;BR /&gt;discretelegend "lines";&lt;BR /&gt;endlayout;&lt;BR /&gt;endcell;&lt;BR /&gt;cell;&lt;BR /&gt;cellheader;&lt;BR /&gt;layout gridded / border = true;&lt;BR /&gt;&lt;STRONG&gt;entry "Toddler S = 0.517 p = &amp;lt;.001; Young S = 0.383 p = &amp;lt;.001" / textattrs = (weight = bold);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;entry "Toddler S = 0.377 p = &amp;lt;.001; Young S = 0.318 p = 0.002" / textattrs = (weight = bold);&lt;/STRONG&gt;&lt;BR /&gt;endlayout;&lt;BR /&gt;endcellheader;&lt;BR /&gt;layout overlay / yaxisopts = (label = var2 labelattrs = (weight = bold size = 8pt) tickvalueattrs = (weight = bold))&lt;BR /&gt;xaxisopts = (label = var3 labelattrs = (weight = bold) tickvalueattrs = (weight = bold));;&lt;BR /&gt;scatterplot y=var2 x=var3 / group=group;&lt;BR /&gt;regressionplot y=var2 x=var3 / group=group name="lines";&lt;BR /&gt;discretelegend "lines";&lt;BR /&gt;endlayout;&lt;BR /&gt;endcell;&lt;BR /&gt;endlayout;&lt;BR /&gt;endgraph;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;/* Generate the plot. */&lt;BR /&gt;options orientation=landscape;&lt;BR /&gt;ods rtf file="scattertest1.rtf";&lt;/P&gt;&lt;P&gt;proc sgrender data=combine template='testPattern';&lt;BR /&gt;dynamic var1 = 'P_SCD_SCORE_PH' var2 = 'P_SCD_SCORE_PI' var3 = 'P_SCD_SCORE_PMC';&lt;BR /&gt;run;&lt;BR /&gt;ods rtf close;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/8627i8B3F1E9E3CA2FF6D/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="scatter plot.png" title="scatter plot.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2017 20:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/insert-Spearman-Coefficient-and-P-value-into-a-graph-by-using/m-p/354606#M12319</guid>
      <dc:creator>echoli</dc:creator>
      <dc:date>2017-04-28T20:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: insert Spearman Coefficient and P value into a graph by using proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/insert-Spearman-Coefficient-and-P-value-into-a-graph-by-using/m-p/354960#M12327</link>
      <description>&lt;P&gt;Looks like you may want more dynamic variables&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2017 15:03:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/insert-Spearman-Coefficient-and-P-value-into-a-graph-by-using/m-p/354960#M12327</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-01T15:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: insert Spearman Coefficient and P value into a graph by using proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/insert-Spearman-Coefficient-and-P-value-into-a-graph-by-using/m-p/354962#M12328</link>
      <description>&lt;P&gt;Yes, that a method. But as you can see, in the two entrys statement, I need 8 dymanic variables, and these variables are in another dataset which I run out. I thought there maybe have simpler way to add coefficient and p value in the graph.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;C&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2017 15:16:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/insert-Spearman-Coefficient-and-P-value-into-a-graph-by-using/m-p/354962#M12328</guid>
      <dc:creator>echoli</dc:creator>
      <dc:date>2017-05-01T15:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: insert Spearman Coefficient and P value into a graph by using proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/insert-Spearman-Coefficient-and-P-value-into-a-graph-by-using/m-p/355321#M12333</link>
      <description>&lt;P&gt;Hi C,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would use into: with proc sql to obtain the pvalues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then use the nmvar or mvar statement to plot those p-values. So it's quite similar to what you've done already, but instead of manually entereing the numbers, the numbers are already in a macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also you don't have to use the nmvar or mvar statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could also just use something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;entry "Toddler S = 0.518 p = &amp;amp;pvalue1; Young S = 0.383 p = &amp;amp;pvalue2" / textattrs = (weight = bold);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After creating the pvalue1 and pvalue2 macro variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code in this paper shows how I've created macro variables with the into clause and then displayed those values on the plot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings13/243-2013.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings13/243-2013.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kriss &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 17:15:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/insert-Spearman-Coefficient-and-P-value-into-a-graph-by-using/m-p/355321#M12333</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2017-05-02T17:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: insert Spearman Coefficient and P value into a graph by using proc template</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/insert-Spearman-Coefficient-and-P-value-into-a-graph-by-using/m-p/355323#M12334</link>
      <description>&lt;P&gt;Hi C,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would use into: with proc sql to obtain the pvalues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then use the nmvar or mvar statement to plot those p-values. So it's quite similar to what you've done already, but instead of manually entereing the numbers, the numbers are already in a macro variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also you don't have to use the nmvar or mvar statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could also just use something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;entry "Toddler S = 0.518 p = &amp;amp;pvalue1; Young S = 0.383 p = &amp;amp;pvalue2" / textattrs = (weight = bold);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After creating the pvalue1 and pvalue2 macro variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code in this paper shows how I've created macro variables with the into clause and then displayed those values on the plot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/resources/papers/proceedings13/243-2013.pdf" target="_blank"&gt;http://support.sas.com/resources/papers/proceedings13/243-2013.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kriss &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 17:18:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/insert-Spearman-Coefficient-and-P-value-into-a-graph-by-using/m-p/355323#M12334</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2017-05-02T17:18:04Z</dc:date>
    </item>
  </channel>
</rss>

