Recently in the SAS Community Library: SAS' @BethEbersole reveals 4 steps to stop money laundering, solve law-enforcement cases, find missing children and more with SAS Visual Investigator.
Hi, I have a dataset where the year goes from [2000,2015] where I have these countries: Spain, France, Denmark and European Union and let's say two colomns; company='A' and 'B' and value='dollar' Q1: if Spain for company A have average vaule 0.288 Denmark also France also for aaaalll of the 15 years. BUT! We have EU (recall, France, Spain, Denmark are all in European Union (EU)) and for one (1) year EU have the avarage for the same company A, have tha average vaule at 1,000 Q2: For company B;, France, Spain, Denmark and European Union (EU)) have data from [2000,2015] and have ~the same avarage all the four, how to solve that issue besT?
... View more
I need to add a horizontal reference line at 90% to represent my target in the p-chart. When I put href=0.9 in my code I got the following warning "WARNING: Numeric href= values are incompatible with a character subgroup variable; HREF= lines are not displayed." The warning indicates that the href value is not compatible because the subgroup variable, quarter, is treated as a character data type. How to include the target line? Here is my code: proc shewhart data=tmp2; pchart yes_answer1*quarter/ markers subgroupn = total_count1 nohlabel Href=0.9; run;
... View more
with the following code, the chart displays a label " p-chart for yes_answer1" at the top, under the main chart title. I have two questions about that: How to remove that, i.e "p-chart for yes_answer1" ? How can I modify the chart so that the main title " P-chart of Patient Counseling by Quarter" appears at the top of the chart instead of "p-chart for yes_answer1" title "P-chart of Patient Counseling by Quarter"; proc shewhart data=tmp2; pchart yes_answer1*quarter/ markers subgroupn = total_count1 nohlabel ; LABEL yes_answer1 ="Proportion of pts counselled"; /*this would be for y axis and no issue with this*/ run; title;
... View more
Dear Community, I am a new SAS Studio user (9.4) and am struggling with the following task. I need to merge two files. One is located in SAS WRDS Cloud (let's name it File 1), and another one is located on my local drive (let's name it File 2). File 1 is approximately 300 GB, so all manipulations must be performed in the Cloud, and then the final version of the merged file would be stored locally. I need to merge File 1 and File 2 based on CompanyID and Year. When I try to sort File 1 by CompanyId and Year prior to merging, the system rightfully says that I do not have permission to manipulate that file (as it is a WRDS raw data file, the message is "ERROR: User does not have appropriate authorization level for library RBDX). However, I cannot download the file locally as it is too large. What is the best way to merge the two files, and what would be the appropriate code? Many thanks for any help! Best, Ana.
... View more
Hi all, This one is quite frustrating. I want to return the Nth word of a string which matches (NOT case-sensitive) my 'search term'. Illustrated with example code using sashelp dataset. My code : *Create string which will be searched;
%let allowedTeams=montreal Cleveland ATLANTA houston Pittsburgh;
*Test dataset;
data work.baseballTest (drop=allowedT);
set sashelp.baseball(keep=team );
if _n_ < 20;
allowedT='montreal Cleveland ATLANTA houston Pittsburgh';
*Various styles of findw None of which appear to work;
findwRes1 = findw("&allowedTeams",team,' ','ei');
findwRes2= findw(allowedT,team,' ','e i');
findwRes3= findw("montreal Cleveland ATLANTA houston Pittsburgh",team,' ','e i');
findwRes4= findw(upcase("&allowedTeams"),upcase(team),' ','E');
findwRes5= findw("&allowedTeams",team,' ','i');
findwRes6= findw("&allowedTeams",team);
*Indexw locates the string. But extra work is needed to get the ;
*number of the word in the string;
indexwRes= indexw(upcase("&allowedTeams"), upcase(team));
if indexwres > 0 then do;
indexwRes1= countw(substr("&allowedTeams", 1, indexwRes), ' ', 'i');
end;
run; On running this code I attempt several different ways to get the FINDW to work for me (findwRres1-6) . Looking in the resultant dataset none of them do as they are all =0. I am able to use a workaround using indexw and countw (as shown) which does work correctly but is not as slick as the FINDW solution would be. Can anyone suggest what is going wrong with my findw attempts?
... View more