05-17-2021
Amali6
Quartz | Level 8
Member since
05-12-2020
- 47 Posts
- 25 Likes Given
- 0 Solutions
- 1 Likes Received
-
Latest posts by Amali6
Subject Views Posted 436 05-17-2021 05:07 PM 549 05-22-2020 08:52 PM 702 05-22-2020 08:48 PM 2207 05-22-2020 06:52 PM 2227 05-22-2020 06:07 PM 2252 05-22-2020 05:42 PM 2271 05-22-2020 05:23 PM 2288 05-22-2020 05:03 PM 2308 05-22-2020 04:48 PM 2356 05-22-2020 02:54 PM -
Activity Feed for Amali6
- Liked Re: Please can someone help me how to import three different csv files into sas university edition? for Reeza. 05-17-2021 05:54 PM
- Posted Please can someone help me how to import three different csv files into sas university edition? on SAS Procedures. 05-17-2021 05:07 PM
- Posted Question on proc sql on SAS Programming. 05-22-2020 08:52 PM
- Posted Re: Query on Pmenu on SAS Programming. 05-22-2020 08:48 PM
- Posted Re: Question on proc corr output on Statistical Procedures. 05-22-2020 06:52 PM
- Liked Re: Question on proc corr output for Reeza. 05-22-2020 06:52 PM
- Posted Re: Question on proc corr output on Statistical Procedures. 05-22-2020 06:07 PM
- Liked Re: Question on proc corr output for ballardw. 05-22-2020 05:55 PM
- Posted Re: Question on proc corr output on Statistical Procedures. 05-22-2020 05:42 PM
- Posted Re: Question on proc corr output on Statistical Procedures. 05-22-2020 05:23 PM
- Liked Re: Question on proc corr output for Reeza. 05-22-2020 05:18 PM
- Posted Re: Question on proc corr output on Statistical Procedures. 05-22-2020 05:03 PM
- Liked Re: Question on proc corr output for lvm. 05-22-2020 05:01 PM
- Posted Re: Question on proc corr output on Statistical Procedures. 05-22-2020 04:48 PM
- Liked Re: Question on proc corr output for Reeza. 05-22-2020 04:36 PM
- Liked Re: Question on proc corr output for PGStats. 05-22-2020 04:36 PM
- Posted Question on proc corr output on Statistical Procedures. 05-22-2020 02:54 PM
- Posted Re: Query on Proc corr on Statistical Procedures. 05-21-2020 08:18 PM
- Liked Re: Query on Proc corr for MichaelL_SAS. 05-21-2020 08:14 PM
- Posted Re: Query on Proc corr on Statistical Procedures. 05-21-2020 07:28 PM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 1 1 1 -
My Liked Posts
Subject Likes Posted 1 05-13-2020 08:21 PM
05-17-2021
05:22 PM
1 Like
Put the files in the myfolders folder you created when you installed SAS UE. Let's assume your file is called my_file.csv Then you can import it using: proc import datafile = "/folders/myfolders/my_file.csv" dbms=csv replace out=my_file; run; Do this three times, once for each file, changing the datafile= and out= portion to align with each file.
... View more
05-26-2020
08:58 PM
If you want to do it with gchart, here's a short example showing how ... Note that I use a numeric date value (which controls the order of the bars), and I apply the monname3. format (which prints the numeric date as the 3-character text month name). Also note that I use the 'discrete' option (otherwise gchart might group bars together like a histogram).
data foo; set sashelp.stocks (where=(stock='IBM' and year(date)=2004)); run;
title "IBM Stock Price in 2004"; axis1 label=none minor=none; proc gchart data=foo; format date monname3.; vbar date / discrete type=mean sumvar=close raxis=axis1 maxis=axis1; run;
... View more
05-26-2020
01:48 PM
Also try this video from SAS:
https://www.youtube.com/watch?v=oC8FM-NNQ7Q
... View more
05-22-2020
09:59 PM
If you search any SAS topic and google and don't find the answer, search again and limit the results by adding the followings: "yourTerm + Tutorial Site:Lexjansen.com"
For 99% of topics you'll get a solution such as the following:
https://support.sas.com/resources/papers/proceedings/proceedings/sugi30/257-30.pdf
... View more
05-21-2020
08:18 PM
Thank you very much, with this code now i can see the output with all plots. Could you please help for my other query that i have posted in this community regarding pmenu procedure? i associated my menu created through fsedit but the menu is not appearing so can i try another pmenu linking same dataset and procs using windows application?
... View more
05-19-2020
10:13 PM
1 Like
@Amali6 - This example from the documentation should help you: FSEDIT PMENU example
... View more
05-19-2020
08:49 PM
Thanks for the reply. I got the fsedit window but my menu is not appearing. I am confused what went wrong, so i have again posted the window i got in the community to get help.
... View more
05-17-2020
08:09 AM
These screenshots seem to present no interest. You show a libname and a proc print and proc sql.
> Even though i kept only 8 columns for my analysis, every time when i give a simple coding sas is not responding immediately taking nearly 15mins
What's taking 15 minutes? I don't see that you keep 8 columns. I don't see any analysis.
What I see is that you print a report with over 100,000 lines.
Why on earth would you do that?
How many different values for the variable HOTEL are there?
You really need to explain your problem much better.
... View more
05-17-2020
03:06 AM
1 Like
You seem to have a string of non-displayable characters following your (closing) quotes. Retype those statements by hand (no copy/pasting from other sources) and see if the NOTEs go away.
... View more
05-16-2020
10:56 AM
1 Like
A Proc REPORT variable DEFINED with feature / GROUP will cause summary statistics to be computed. The default statistic is SUM, perfect for 'counting' a 0/1 flag variable.
Example:
data have_apriori_summary(keep=hotel_id guest_id is_repeated_guest);
call streaminit (123);
do hotel_id = 1 to 10;
do index = 1 to 100;
guest_id + 1;
is_repeated_guest = rand ('uniform') < 0.40;
output;
end;
end;
run;
proc report data=have_apriori_summary;
title "Guest retention results from apriori per guest summary";
column hotel_id is_repeated_guest;
define hotel_id / group;
define is_repeated_guest / 'Repeated Guests';
where hotel_id in (1,3,4);
run;
Output
Consider a slightly different scenario:
Suppose the data set contains transactional information, such as CHECK_IN_DATE, ROOM_ID, and GUEST_ID and the REPEAT flag is a marker for some customer service action at the desk. Taking a sum of the flag values over the transactions will NOT give the number of DISTINCT guests, the SUM will be the number of repeated guest visits. You will need to reduce the transaction data to a summary in order to count the number of distinct guests.
Example:
data have_checkin_log(keep=hotel_id room_id date guest_id is_repeated_guest);
call streaminit (123);
array tracker(7500) _temporary_;
do index = 1 to dim(tracker);
tracker(index) = rand('uniform') < 0.15;
end;
do hotel_id = 1 to 10;
do room_id = 1 to 50;
do date = '01jan2020'd to '31jan2020'd;
guest_id = rand('integer',1,7500);
is_repeated_guest = tracker(guest_id);
output;
end;
end;
end;
format date yymmdd10.;
run;
proc sql;
create table repeated_guests_summary as
select
hotel_id,
guest_id,
is_repeated_guest,
count(*) as repeated_visits_count
from have_checkin_log
where is_repeated_guest
group by hotel_id, guest_id
;
quit;
proc report data=repeated_guests_summary;
title "Repeated Guests and Visits";
column hotel_id is_repeated_guest repeated_visits_count;
define hotel_id / group;
define is_repeated_guest / 'Repeated Guests';
where hotel_id in (1,3,4);
run;
Output
... View more
05-15-2020
10:21 PM
> can i ask you, whether sas accepts more than three conditions in the where statement?
Yes, there is not limit as was said above.
Can I ask you why you don't try rather than ask here? It would be much faster.
... View more
05-14-2020
11:15 AM
Thank you very much now i got all observations under main2. SO now can i create the UI using proc pmenu and connect the the UI and sql file using the name menu2. Whether am i right? Thanks for the help i really appreciate
... View more
05-13-2020
02:51 PM
1 Like
Because I don't have access to your data and you didn't provide data in a format that I could use. You can ignore the DATA step. It is for me and others who do not have access to your data.
... View more