Sign In
New User? Register
Statisticians_group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
You can set the sort order of messages? Just click on the link in the date column. Your preferences will be remembered, so you don't have to do it again when you return.

Messages

  Messages Help
Advanced
Problem with Proc Gchart   Message List  
Reply | Forward Message #1377 of 4109 |

Hi,>>

>

I have the dataset `outfreq' as follows:>>

>

        nocturnal_>>

 Obs      asthma      COUNT    PERCENT    group      prop       std>>

>

  1          0          28     19.3103      1      0.19310    3.27808>>

  2          1          87     60.0000      1      0.60000    4.06838>>

  3          2          29     20.0000      1      0.20000    3.32182>>

  4          3           1      0.6897      1      0.00690    0.68727>>

  5          0         110     75.8621      2      0.75862    3.55368>>

  6          1          32     22.0690      2      0.22069    3.44399>>

  7          2           3      2.0690      2      0.02069    1.18210>>

>

I have written the following SAS code:>>

>

axis1 order=(0 to 100 by 10)  >>

      label=(angle=90 height=1.2 justify=center 'Percentage of patients') >>

      split='_' length=30 cells>>

      major=(height=3 width=2)>>

      minor=(number=6 color=red height=2 width=1);>>

>

axis2 order=(0 to 4 by 1)    >>

      label=(angle=0 height=1.5 justify=center 'Nocturnal Asthma Score')>>

      value=(h=0.5 width=3);>>

>

legend1 cborder=black>>

        label=('Quarter:')>>

        position=(middle left outside)>>

        mode=protect>>

        across=1>>

        ;>>

>

>

  pattern1 value = X3 color = BLACK ;>>

  pattern2 value = R5 color = BLACK;>>

  >>

>

>

legend1 frame>>

        position=(inside right top)>>

            label=(c=green 'Legend')>>

            mode=protect>>

            cborder=black>>

            across=1>>

            ;>>

>

proc format;>>

value base 1='Base' 2='Final';>>

value score 0='None' 1='once' 2='twice' 3='Thrice' 4='>3';>>

run;>>

>

data anno;>>

set freqout;>>

length function $ 8. text $ 45.;>>

retain xsys ysys '2' color 'red' width 2;>>

function='move'; y=percent; midpoint=nocturnal_asthma; when='a'; output;>>

function='draw'; xsys='9'; y=percent+std*2;  when='a'; output;>>

function='draw'; xsys='9'; y=percent-std*2;  when='a'; output;>>

run;>>

>

proc gchart data=freqout;>>

vbar group /sumvar=percent group=nocturnal_asthma midpoints=1 2  outside=sum inside=freq>>

                       coutline=blue cframe=white space=0 raxis=axis1 maxis=axis2 >>

                        legend=legend1 PATTERNID=MIDPOINT anno=anno;>>

format nocturnal_asthma score.;>>

format group base.;>>

run;>>

quit;>>

>

Unfortunately I am getting the output as I desire. I want to have bar diagram along with confidence intervals. If you run the pogram then you can understand what I want. I guess the problem is in the midpoint= statement in the `anno' data step. Or anywhere else...>>

>

Another problem is that in my program legend statement is not working.>>

>

Please help me.>>

>

Thanks in advance.>>

>

Regards,>>

Madan Gopal Kundu>>



Fri May 5, 2006 10:48 am

madan4331
Offline Offline
Send Email Send Email

Forward
Message #1377 of 4109 |
Expand Messages Author Sort by Date

Hi, I have the dataset `outfreq' as follows: nocturnal_ Obs asthma COUNT PERCENT group prop std 1 0 28...
Madan Gopal Kundu
madan4331
Offline Send Email
May 5, 2006
10:55 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help