12-01-2020
Feksan
Fluorite | Level 6
Member since
10-03-2020
- 14 Posts
- 7 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by Feksan
Subject Views Posted 807 12-01-2020 10:05 PM 1932 12-01-2020 07:46 PM 1092 12-01-2020 07:34 AM 1980 12-01-2020 07:30 AM 1993 12-01-2020 07:22 AM 701 11-29-2020 06:39 PM 2119 11-29-2020 06:10 PM 1548 11-27-2020 07:02 AM 658 10-08-2020 09:33 AM 666 10-04-2020 07:30 PM -
Activity Feed for Feksan
- Posted Errors in a macro on SAS Enterprise Guide. 12-01-2020 10:05 PM
- Posted Re: Min and max functions in SAS on SAS Enterprise Guide. 12-01-2020 07:46 PM
- Liked Re: Count the number of days for mkeintz. 12-01-2020 07:13 PM
- Liked Re: Count the number of days for utrocketeng. 12-01-2020 07:10 PM
- Liked Re: Count the number of days for utrocketeng. 12-01-2020 07:10 PM
- Liked Re: Count the number of days for PaigeMiller. 12-01-2020 07:09 PM
- Posted Count the number of days on SAS Enterprise Guide. 12-01-2020 07:34 AM
- Posted Re: Min and max functions in SAS on SAS Enterprise Guide. 12-01-2020 07:30 AM
- Posted Re: Min and max functions in SAS on SAS Enterprise Guide. 12-01-2020 07:22 AM
- Posted Count function in SAS on SAS Enterprise Guide. 11-29-2020 06:39 PM
- Posted Min and max functions in SAS on SAS Enterprise Guide. 11-29-2020 06:10 PM
- Liked Re: Can't import the numbers with decimals in the right format for Tom. 11-27-2020 01:58 PM
- Liked Re: Can't import the numbers with decimals in the right format for yabwon. 11-27-2020 01:57 PM
- Posted Can't import the numbers with decimals in the right format on SAS Programming. 11-27-2020 07:02 AM
- Posted Can't see my code on SAS Enterprise Guide. 10-08-2020 09:33 AM
- Posted Delete rows on SAS Enterprise Guide. 10-04-2020 07:30 PM
- Posted Error in my sql code on SAS Enterprise Guide. 10-04-2020 12:13 PM
- Liked Re: Error 22:232 and error 76:232 for Kurt_Bremser. 10-04-2020 12:01 PM
- Posted What mistakes am I making in the sql code with sas because I get the Errors 22 and 76? on SAS Programming. 10-04-2020 11:28 AM
- Posted Re: Error 22:232 and error 76:232 on SAS Programming. 10-04-2020 11:07 AM
-
Posts I Liked
Subject Likes Author Latest Post 1 1 1 1 1
12-01-2020
10:05 PM
I am looking to create a macro that could show me statistics for new cases when I enter in the month and the country but it doesn't work. data mylib_d3.covid_data; run; %MACRO proc_univariate_means_print(data,var1); title ---Résumé statistiques_1---; PROC UNIVARIATE data=&data; CLASS &mois &pays VAR &var1 ; RUN; title ---Résumé statistiques_2---; PROC MEANS data=&data mean min max; VAR &var1; BY &mois &pays RUN; title --- Afficher les observations ---; PROC PRINT data=&data; VAR &var1; RUN; %MEND; %LET mylist=nouveaux_cas mois pays %proc_univariate_means_print(mylib_d3.covid_data, &mylist);
... View more
12-01-2020
07:46 PM
This is from my log: 1 ;*';*";*/;quit;run; 2 OPTIONS PAGENO=MIN; 3 %LET _CLIENTTASKLABEL='MATH30602.A2020_Devoir3_11286690.sas'; 4 %LET _CLIENTPROCESSFLOWNAME='Standalone Not In Project'; 5 %LET _CLIENTPROJECTPATH=''; 6 %LET _CLIENTPROJECTPATHHOST=''; 7 %LET _CLIENTPROJECTNAME=''; 8 %LET _SASPROGRAMFILE='C:\Users\admin\Desktop\Logiciels statistiques\Devoir individuel 8 ! 3\MATH30602.A2020_Devoir3_11286690.sas'; 9 %LET _SASPROGRAMFILEHOST='WILLY-CLAUDE-KA'; 10 11 ODS _ALL_ CLOSE; 12 OPTIONS DEV=SVG; 13 GOPTIONS XPIXELS=0 YPIXELS=0; 14 %macro HTML5AccessibleGraphSupported; 15 %if %_SAS_VERCOMP_FV(9,4,4, 0,0,0) >= 0 %then ACCESSIBLE_GRAPH; 16 %mend; 17 FILENAME EGHTML TEMP; 18 ODS HTML5(ID=EGHTML) FILE=EGHTML 19 OPTIONS(BITMAP_MODE='INLINE') 20 %HTML5AccessibleGraphSupported 21 ENCODING='utf-8' 22 STYLE=HtmlBlue 23 NOGTITLE 24 NOGFOOTNOTE 25 GPATH=&sasworklocation 26 ; NOTE: Writing HTML5(EGHTML) Body file: EGHTML 27 28 PROC SORT data=mylib_d3.covid_data; 29 BY continent date; 30 RUN; NOTE: Input data set is already sorted, no sorting done. NOTE: PROCEDURE SORT used (Total process time): real time 0.01 seconds cpu time 0.01 seconds 31 PROC SUMMARY data=mylib_d3.covid_data mean print; 32 VAR nouveaux_cas nouveaux_deces; 33 BY continent date; 34 output out=mylib_d3.moyenne_cas_deces mean=moyenne_nouveaux_cas moyenne_nouveaux_deces; 35 RUN; NOTE: There were 38358 observations read from the data set MYLIB_D3.COVID_DATA. NOTE: The data set MYLIB_D3.MOYENNE_CAS_DECES has 1416 observations and 6 variables. NOTE: PROCEDURE SUMMARY used (Total process time): real time 22.74 seconds cpu time 22.68 seconds 36 PROC SUMMARY data=mylib_d3.MOYENNE_CAS_DECES min max print; 37 VAR moyenne_nouveaux_cas moyenne_nouveaux_deces date; 38 BY continent date; 39 output out=mylib_d3.min_max_cas_deces min=min_nouveaux_cas min_nouveaux_deces 40 max=max_nouveaux_cas max_nouveaux_deces; 41 RUN; 2 The SAS System 19:13 Tuesday, December 1, 2020 NOTE: There were 1416 observations read from the data set MYLIB_D3.MOYENNE_CAS_DECES. NOTE: The data set MYLIB_D3.MIN_MAX_CAS_DECES has 1416 observations and 8 variables. NOTE: PROCEDURE SUMMARY used (Total process time): real time 43.90 seconds cpu time 37.34 seconds 42 43 %LET _CLIENTTASKLABEL=; 44 %LET _CLIENTPROCESSFLOWNAME=; 45 %LET _CLIENTPROJECTPATH=; 46 %LET _CLIENTPROJECTPATHHOST=; 47 %LET _CLIENTPROJECTNAME=; 48 %LET _SASPROGRAMFILE=; 49 %LET _SASPROGRAMFILEHOST=; 50 51 ;*';*";*/;quit;run; 52 ODS _ALL_ CLOSE; 53 54 55 QUIT; RUN; 56
... View more
12-01-2020
07:34 AM
I have this data set and I want to get the number of days with a number of deaths equal or higher to 1 by iso_code: DATA MYLIB_D3.NB_DECES; SET MYLIB_D3.COVID_DATA; BY date iso_code; WHERE new_deaths>=1; RUN; PROC FREQ data= mylib_d3.nb_deces ; TABLE date*pays; RUN;
... View more
12-01-2020
07:30 AM
I have tried this: PROC SORT data=mylib_d3.covid_data; BY continent date; RUN; PROC SUMMARY data=mylib_d3.covid_data mean print; VAR new_cases new_deaths; BY continent date; output out=mylib_d3.moyenne_cases_deaths mean=moyenne_new_cas moyenne_new_deces; RUN; PROC SUMMARY data=mylib_d3.MOYENNE_CAS_DECES min max print; VAR moyenne_new_cas moyenne_new_deaths; BY continent; output out=mylib_d3.min_max_cas_deces min=min_new_cases min_new_deaths max=max_new_cas max_new_deces; RUN;
... View more
12-01-2020
07:22 AM
Let's say I have this data set and I want to get the minimum and maximum average of new cases and new deaths by continent and by date. What could be the code?
... View more
11-29-2020
06:39 PM
Hi, I am trying to count the deaths by country at every day. I am doing this but it's not working. DATA MYLIB_D3.NB_DECES; SET MYLIB_D3.COVID_DATA; BY date country; WHERE new_deaths>=1; RUN;
... View more
11-29-2020
06:10 PM
Hi, I have created a table that gives me two variables as you can see: PROC SUMMARY data=mylib_d3.covid_data mean print; VAR new_cases new_deaths; BY continent date; output out=mylib_d3.mean_cas_deces mean=mean_nouveaux_cas mean_nouveaux_deces; RUN; Then, I want to get for each of the columns just created the minimum and the maximum with this code but it's giving me the same number for both minimums and boths maximums: PROC SUMMARY data=mylib_d3.MOYENNE_CAS_DECES min max print; VAR moyenne_nouveaux_cas moyenne_nouveaux_deces; BY continent date; output out=mylib_d3.min_max_cas_deces min=min_nouveaux_cas min_nouveaux_deces max=max_nouveaux_cas max_nouveaux_deces; RUN; What could be wrong?
... View more
11-27-2020
07:02 AM
I have this file attached that I want to import in SAS but the female smokers and the male smokers columns only show me the first number for each row. Could you help. This is my code: PROC IMPORT DATAFILE="C:\Users\admin\Desktop\Logiciels statistiques\Devoir individuel 3\OWID_COVID_DATA_2020.csv" OUT=mylib_d3.owid_covid_data_2020 DBMS=csv REPLACE; FORMAT iso_code $CHAR8. date YYMMDD10. new_cases BEST2. new_deaths BEST3. new_tests BEST12. total_tests BEST12. population BEST10. median_age BEST6. aged_65_older BEST6. aged_70_older BEST6. cardiovasc_death_rate BEST6. diabetes_prevalence BEST6. female_smokers COMMA32. male_smokers COMMA32.; GETNAMES=yes; RUN;
... View more
10-08-2020
09:33 AM
Hello, I have been working on this program and saved it last time I opened it. But now nothing appears anymore, I only have this screen. Has anyone encountered the issue please?
... View more
10-04-2020
07:30 PM
Hello. I would like to delete the rows where the location is "World". This is my code and it doesn't delete it. DELETE FROM d1.COVID_DATA WHERE location="world";
... View more
10-04-2020
12:13 PM
Please I understand the error. SELECT *, 70 CASE WHEN nouveaux_cas>moyenne_globale THEN 1 71 ELSE 0 end as comparaison_moyenne_globale 72 FROM d1.COVID_DATA; ERROR: Expression using greater than (>) has components that are of different data types. ERROR: The following columns were not found in the contributing tables: moyenne_globale.
... View more
10-04-2020
11:28 AM
proc sql; CREATE TABLE d1.COVID AS SELECT*, FROM d1.owid_covid_data_2019 UNION ALL SELECT*, FROM d1.owid_covid_data_2020 ; quit; proc sql; CREATE TABLE d1.COVID_DATA AS SELECT A.iso_code, A.continent, A.location AS pays, B.date, B.new_cases AS nouveaux_cas, B.new_deaths AS nouveaux_deces, B.new_tests AS nouveaux_tests, B.total_tests AS nb_total_tests, B.population, B.female_smokers AS femmes_fumeuses, B.male_smokers AS hommes_fumeurs FROM d1.iso_code_table AS A INNER JOIN d1.COVID AS B ON A.iso_code = B.iso_code; SELECT*, date format yymmn6. as month, put(date,yyq6.) as quarter FROM d1.COVID_DATA; SELECT*, sum(nouveaux_tests) AS test_par_population, FROM d1.COVID_DATA GROUP BY population; DELETE FROM d1.COVID_DATA WHERE iso_code="owid_wrl"; SELECT sum(nouveaux_cas)/count(nouveaux_cas) AS moyenne_globale, FROM d1.COVID_DATA; SELECT moyenne_globale, CASE WHEN nouveaux_cas>moyenne_globale THEN 1 ELSE 0 end as comparaison_moyenne_globale FROM d1.COVID_DATA; SELECT*, CASE WHEN hommes_fumeurs>femmes_fumeuses THEN "Hommes_plus_Femmes" WHEN hommes_fumeurs<femmes_fumeuses THEN "Hommes_moins_Femmes" WHEN hommes_fumeurs=femmes_fumeuses THEN "Hommes_egale_Femmes" ELSE "NA" end as comparaison_sex FROM d1.COVID_DATA; quit;` `ERROR 22-322: Syntax error, expecting one of the following: a quoted string, !, !!, &, *, **, +, ',', -, /, <, <=, <>, =, >, >=, ?, AND, AS, BETWEEN, CONTAINS, EQ, EQT, FORMAT, FROM, GE, GET, GT, GTT, IN, INFORMAT, INTO, IS, LABEL, LE, LEN, LENGTH, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, TRANSCODE, ^, ^=, |, ||, ~, ~=. ERROR 76-322: Syntax error, statement will be ignored.`
... View more
10-04-2020
11:07 AM
Actually this is the whole code and when I run I always have those errors. Do you see a mistake? proc sql; CREATE TABLE d1.COVID AS SELECT*, FROM d1.owid_covid_data_2019 UNION ALL SELECT*, FROM d1.owid_covid_data_2020 ; quit; proc sql; CREATE TABLE d1.COVID_DATA AS SELECT A.iso_code, A.continent, A.location AS pays, B.date, B.new_cases AS nouveaux_cas, B.new_deaths AS nouveaux_deces, B.new_tests AS nouveaux_tests, B.total_tests AS nb_total_tests, B.population, B.female_smokers AS femmes_fumeuses, B.male_smokers AS hommes_fumeurs FROM d1.iso_code_table AS A INNER JOIN d1.COVID AS B ON A.iso_code = B.iso_code; SELECT*, date format yymmn6. as month, put(date,yyq6.) as quarter FROM d1.COVID_DATA; SELECT*, sum(nouveaux_tests) AS test_par_population, FROM d1.COVID_DATA GROUP BY population; DELETE FROM d1.COVID_DATA WHERE iso_code="owid_wrl"; SELECT sum(nouveaux_cas)/count(nouveaux_cas) AS moyenne_globale, FROM d1.COVID_DATA; SELECT moyenne_globale, CASE WHEN nouveaux_cas>moyenne_globale THEN 1 ELSE 0 end as comparaison_moyenne_globale FROM d1.COVID_DATA; SELECT*, CASE WHEN hommes_fumeurs>femmes_fumeuses THEN "Hommes_plus_Femmes" WHEN hommes_fumeurs<femmes_fumeuses THEN "Hommes_moins_Femmes" WHEN hommes_fumeurs=femmes_fumeuses THEN "Hommes_egale_Femmes" ELSE "NA" end as comparaison_sex FROM d1.COVID_DATA; quit;
... View more
10-03-2020
11:29 PM
I have run this code and get an error. What could be the mistake? SELECT moyenne_globale CASE WHEN nouveaux_cas>moyenne_globale THEN 1 ELSE 0 end as comparaison_moyenne_globale FROM d1.COVID_DATA; but I am getting this error: SELECT moyenne_globale 70 CASE WHEN nouveaux_cas>moyenne_globale THEN 1 ____ 22 76 ERROR 22-322: Syntax error, expecting one of the following: a quoted string, !, !!, &, (, *, **, +, ',', -, '.', /, <, <=, <>, =, >, >=, ?, AND, AS, BETWEEN, CONTAINS, EQ, EQT, FORMAT, FROM, GE, GET, GT, GTT, IN, INFORMAT, INTO, IS, LABEL, LE, LEN, LENGTH, LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, TRANSCODE, ^, ^=, |, ||, ~, ~=. ERROR 76-322: Syntax error, statement will be ignored. 71 ELSE 0 end as comparaison_moyenne_globale 72 FROM d1.COVID_DATA;
... View more