Kick-start Your Data Exploration Journey with SAS Information Catalog
Recent Library Articles
Recently in the SAS Community Library: @smanoj introduces you to the SAS Information Catalog, which provides a powerful search engine to find needed data assets.
Hi, I am using this code for pulling the birthdate >17years FLOOR(intck('MONTH',datepart(pt.BIRTH_DATE), date())/12)> 17 But the person who has DOB of 06/29/2006 is considered as 18years and pulling that person. i tried not to use FLOOR and it still gives me the same 18years. Can I fix this.
... View more
Hello, With this syntax: proc sgplot data=plot ;
vbox value / category=DV group=genre ;
run; SGPLOT produces a VBOX with different colors for the two groups defined in GROUP= See graphs below. Instead, I would like the two levels of groups (liteary and popular) to have different patterns (for instance, small dots for one and small x for the other). I have been looking into various options with ATTRMAP, but I do not seem to be able to get it. Suggestions?
... View more
How can I change this macro to create all the variables in one data set? I want to do this for multiple varibles using the macro but it keeps overwriting itself and keeping the last flag that was created by the macro. Thank you!
%MACRO FLAG(VAR1,VAR2,FLAGNAME); DATA FLAG; SET RULE1; &FLAGNAME=0; DO _N_=1 to countw(&VAR1,',') while(&FLAGNAME=0); word=scan(&VAR1,_N_,','); if word=' ' then continue; if indexw(trim(&VAR2),trim(word),',') then &FLAGNAME=1; end; drop word; run; %MEND FLAG;
%FLAG(Addresses1,Addresses2,First_ADD); %FLAG(Addresses1,Addresses3,Second_ADD);
... View more
I want to find the relative risk and risk difference and their corresponding 95% CIs to compare adverse events in a treatment group compared to a placebo group.
What 95% CI can handle zero counts using PROC FREQ (or a different procedure)? I was going to use Wald and Agresti-Caffo, respectively, but it looks like Wald can't handle zero counts and since we have a small sample size (n<10), perhaps that's not the best option in general...
... View more
I have data which has already been aggregated like this:
Category
Groups
People
A
23
235
B
45
754
C
12
89
And I want something like this (prefer Proc Report for the bells and whistles)
Category
Groups
Groups Percent
People
People Percent
A
23
28.8%
235
21.8%
B
45
56.3%
754
69.9%
C
12
15.0%
89
8.3%
Total
80
100.0%
1078
100.0%
All the examples I can find online seem to use dis-aggregated data.
... View more