<?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 produce an interval plot? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507207#M17277</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240544"&gt;@aczech2001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I worked that out. it is just an example copied from the PDF offered by SAS.&lt;BR /&gt;&lt;BR /&gt;The thing is that we have tried to fiddle with colleagues the variables around. Nothing constructive comes up with it, apart from very extreme graphs that do not depict any whiskers, medians etc.&lt;BR /&gt;&lt;BR /&gt;Thus, please would you mind running the data I provided, and creating an interval plot for age x resp variables, and posting the code to the forum?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Agnieszka&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You will have to use your data to calculate the Mean and the upper and lower confidence limits with a procedure such as Proc means or summary for the combinations of the grouping variables and each of your "response variables".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cannot tell what you want for an x-axis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Oct 2018 15:48:31 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-10-24T15:48:31Z</dc:date>
    <item>
      <title>How to produce an interval plot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507149#M17270</link>
      <description>&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt;Another probably rather an easy question. How to produce an interval plot for Age x Response type (variable RESP), or for credit score (CRED)xRESP- data attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First I produced a box plot with the 'Tasks and Utilities'&amp;gt;&amp;gt;Tasks&amp;gt;&amp;gt;Graphs&amp;gt;&amp;gt;Box Plot&lt;/P&gt;&lt;P&gt;And I was trying to fiddle with the code using SAS help, infering the following advice&lt;/P&gt;&lt;PRE class="sas"&gt;&lt;SPAN&gt;proc sgplot&lt;/SPAN&gt; &lt;SPAN&gt;data&lt;/SPAN&gt;=confidence;
  scatter y=&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;x&lt;/SPAN&gt;=&lt;SPAN&gt;mean&lt;/SPAN&gt; / xerrorlower=lowerci xerrorupper=upperci
          markerattrs=&lt;SPAN&gt;(&lt;/SPAN&gt;symbol=circlefilled size=&lt;SPAN&gt;9&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;;
  &lt;SPAN&gt;run&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the final result is only an error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please, could you advice how should I create the interval plot using the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again for everyone's help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Agnieszka&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 14:02:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507149#M17270</guid>
      <dc:creator>aczech2001</dc:creator>
      <dc:date>2018-10-24T14:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce an interval plot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507154#M17271</link>
      <description>What error are you getting? Include the full log. From a quick glance I don't see any issues with your code.</description>
      <pubDate>Wed, 24 Oct 2018 14:06:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507154#M17271</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-24T14:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce an interval plot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507166#M17273</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240544"&gt;@aczech2001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi to all,&lt;/P&gt;
&lt;P&gt;Another probably rather an easy question. How to produce an interval plot for Age x Response type (variable RESP), or for credit score (CRED)xRESP- data attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First I produced a box plot with the 'Tasks and Utilities'&amp;gt;&amp;gt;Tasks&amp;gt;&amp;gt;Graphs&amp;gt;&amp;gt;Box Plot&lt;/P&gt;
&lt;P&gt;And I was trying to fiddle with the code using SAS help, infering the following advice&lt;/P&gt;
&lt;PRE class="sas"&gt;&lt;SPAN&gt;proc sgplot&lt;/SPAN&gt; &lt;SPAN&gt;data&lt;/SPAN&gt;=confidence;
  scatter y=&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;x&lt;/SPAN&gt;=&lt;SPAN&gt;mean&lt;/SPAN&gt; / xerrorlower=lowerci xerrorupper=upperci
          markerattrs=&lt;SPAN&gt;(&lt;/SPAN&gt;symbol=circlefilled size=&lt;SPAN&gt;9&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;;
  &lt;SPAN&gt;run&lt;/SPAN&gt;;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the final result is only an error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please, could you advice how should I create the interval plot using the code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you again for everyone's help,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Agnieszka&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;1) An Excel spreadsheet is not actually SAS data as choices have to be made as to type of variable (numeric or character) which are not obvious in Excel. Provide data step code that actually creates a SAS data set to provide an example such as:&lt;/P&gt;
&lt;PRE&gt;data have;
input AGE	CRED 	MS $	INCOME	MOB $	MILEAGE	RESTYPE $	GENDER $	Kids	MRTGI $	resp	cuscode;
datalines;
20	543	U	20	Y	14.42	HOME	M	0	N	0	1
18	445	U	20	Y	0.31	HOME	M	2	Y	0	2
19	423	U	20	N	17.88	HOME	M	1	Y	0	3
18	416	X	20	Y	17.08	HOME	F	0	Y	0	4
18	522	U	20	Y	16.51	HOME	F	1	Y	0	5
19	467	U	20	N	16.24	HOME	F	0	Y	0	6
;
run;&lt;/PRE&gt;
&lt;P&gt;That will provide something we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your example data should only include variables needed for the actual question. I copied the first few rows of you example data&lt;/P&gt;
&lt;P&gt;because:&lt;/P&gt;
&lt;P&gt;2) You show code using variables named VAR MEAN LOWERCI and UPPERCI.&amp;nbsp; There is nothing in the attached file with those column headings or names. So we can not determine from your "code" what you attempted with the example "data".&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 14:26:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507166#M17273</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-24T14:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce an interval plot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507186#M17275</link>
      <description>I worked that out. it is just an example copied from the PDF offered by SAS.&lt;BR /&gt;&lt;BR /&gt;The thing is that we have tried to fiddle with colleagues the variables around. Nothing constructive comes up with it, apart from very extreme graphs that do not depict any whiskers, medians etc.&lt;BR /&gt;&lt;BR /&gt;Thus, please would you mind running the data I provided, and creating an interval plot for age x resp variables, and posting the code to the forum?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Agnieszka&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Oct 2018 15:05:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507186#M17275</guid>
      <dc:creator>aczech2001</dc:creator>
      <dc:date>2018-10-24T15:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce an interval plot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507207#M17277</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240544"&gt;@aczech2001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I worked that out. it is just an example copied from the PDF offered by SAS.&lt;BR /&gt;&lt;BR /&gt;The thing is that we have tried to fiddle with colleagues the variables around. Nothing constructive comes up with it, apart from very extreme graphs that do not depict any whiskers, medians etc.&lt;BR /&gt;&lt;BR /&gt;Thus, please would you mind running the data I provided, and creating an interval plot for age x resp variables, and posting the code to the forum?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Agnieszka&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You will have to use your data to calculate the Mean and the upper and lower confidence limits with a procedure such as Proc means or summary for the combinations of the grouping variables and each of your "response variables".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cannot tell what you want for an x-axis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 15:48:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507207#M17277</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-24T15:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce an interval plot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507236#M17278</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/240544"&gt;@aczech2001&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Thus, please would you mind running the data I provided, and creating an interval plot for age x resp variables, and posting the code to the forum?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Agnieszka&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need someone to do work for you, it is better to hire a contractor. This forum is for support and help, not to do work on demand. You haven't shown the errors your code is generating, which was asked for in my previous response. Or provided an example of what you want. You've referred to box plots and medians/whiskers but an interval plot is usually mean and 95% CI unless I'm mistaken. It's also possible to do a similar styled plot with Median and 5/95% percentiles as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Use proc means (or any summary procedure) and calculate the upper and lower CI -&amp;gt; create an output data set with these values&lt;/P&gt;
&lt;P&gt;2. Use SGPLOT and the output data set from #1 to create your graph&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All of this can easily be done from the GUI interface or via code. If you've attempted this many times with colleagues already, please post your closest version with the errors from the log. Please show the full code you've tried so far.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're trying to show this for a whole bunch of variables that have different scales that won't make sense because the scales are so far off that only the biggest one will likely show up and the remaining will show up with just the lines or dots.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 16:58:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507236#M17278</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-24T16:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce an interval plot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507325#M17279</link>
      <description>&lt;P&gt;It's not clear whether you are asking how to GET the data to plot or whether you are asking a pure graphics question. If you have the data and want to plot it, see the following examples. Maybe one will be similar to your application.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2015/07/29/or-plots-log-scale.html" target="_self"&gt;Odds ratio plots&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2015/08/05/coefficient-plots.html" target="_self"&gt;Regression coefficient plots&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings10/195-2010.pdf" target="_self"&gt;Forest plots&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 20:27:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507325#M17279</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2018-10-24T20:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce an interval plot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507343#M17280</link>
      <description>&lt;P&gt;Thanks for your reply, but that's rather rude. yes, on the other hand, thanks for your efforts in giving a hint.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have posted the errors above: there should be somewhere in the link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am asking in this way because I have never had an experience with writing any codes, and I still don't know a single command. and reading the 'advice' available online is really confusing because each case if different. So I am trying to work out whats going on, I am not being paid for any job, as I am a student.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe if you feel like being rude to someone who tries to learn, maybe it is better not to answer at all? And leave it to someone who wants to give some idea. Thanks for cooperation!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it is a simple task and no one is loosing any intellectual rights pasting a code for a very simple operation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BW&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Agnieszka&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2018 22:16:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507343#M17280</guid>
      <dc:creator>aczech2001</dc:creator>
      <dc:date>2018-10-24T22:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to produce an interval plot?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507355#M17281</link>
      <description>You stated you tried with colleagues (your words, not mine) and had various attempts. Yes, I could code up an answer but I’m confused at your hesitancy to post your log or attempts. &lt;BR /&gt;I’m very happy to help which you’ve seen with your first few questions where I literally told you what to click and where, but when you phrase your response as as ‘please just give me the answer’ (my words) isn’t particularly polite either, even with a please. I’ll remove myself from your questions if you;d like. Good Luck.</description>
      <pubDate>Wed, 24 Oct 2018 23:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-produce-an-interval-plot/m-p/507355#M17281</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-24T23:08:02Z</dc:date>
    </item>
  </channel>
</rss>

