declanjohn Tracker
https://communities.sas.com/kntur85557/tracker
declanjohn TrackerMon, 15 Apr 2024 23:10:23 GMT2024-04-15T23:10:23ZCoding help
https://communities.sas.com/t5/SAS-Procedures/Coding-help/m-p/524055#M73482
<P>Need a coding template to perform the below tasks in SAS. Thanks in advance.</P><P>1) Import the data from air_pollution.csv to SAS (3)</P><P><STRONG><EM>Weather in Beijing </EM></STRONG></P><OL><LI>2) Produce the frequencies of all values of combined wind direction (cbwd) (from most frequent to least frequent) (2)</LI><LI>3) What is the most frequently occurring wind direction? (1)</LI><LI>4) Calculate the correlation coefficient between temperature (TEMP) and pressure (PRES) (3)</LI><LI>5) Is the correlation positive or negative? What is its strength (very weak/weak/moderate/strong/very strong)? (2)</LI></OL><P><STRONG><EM>How does air pollution vary over months? </EM></STRONG></P><OL><LI>6) Compute the descriptive statistics of pm2_5 by month (3)</LI><LI>7) On average, in which month is the pollution level highest, and in which month is it lowest? (2)</LI></OL><P><STRONG><EM>Relationship between air pollution and weather </EM></STRONG></P><OL><LI><span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:">ðŸ˜Ž</span> Build a linear regression model where pm2_5 is a dependent variable, and month, DEWP, TEMP, PRES, cbwd, Iws, Is and Ir are independent variables (8)</LI><LI>9) What is the R-squared of this model? Based on the R-squared, does the model fit the data well? (4)</LI><LI>10) Create a new variable (high_pm2_5) that takes value 1 if pm2_5 is greater than 150 ug/m^3 and value 0 otherwise (3)</LI></OL><P>11) Develop a logistic regression model where high_pm2_5 is a dependent variable, and month, DEWP, TEMP, PRES, cbwd, Iws, Is and Ir are independent variables (8)</P><P>12) What is the AUC (c statistic) of this model? Based on the AUC, does the model separate high and low pollution levels well? (4)</P><P><STRONG><EM>The worst smog in Beijing </EM></STRONG></P><OL><LI>13) Create a new data set (avg_air_pollution) and calculate an average pollution level (avg_pm2_5) for each month of each year. Select the variables year, month and avg_pm2_5 (10)</LI><LI>14) In which of the 60 analysed months was the average pollution level (avg_pm2_5) highest? This was the worst smog Beijing has experienced for over 50 years (2)</LI><LI>15) Based on the new data set, create a pdf report (highest_avg_air_pollution.pdf) that contains the list of those months in which the average pollution level (avg_pm2_5) was greater than 100 ug/m^3. Use the Moonflower style and add a title ("Months With Highest Average Air Pollution") (5)</LI></OL>Wed, 02 Jan 2019 11:22:15 GMThttps://communities.sas.com/t5/SAS-Procedures/Coding-help/m-p/524055#M73482declanjohn2019-01-02T11:22:15ZHelp SAS coding
https://communities.sas.com/t5/New-SAS-User/Help-SAS-coding/m-p/524054#M4743
<P>I need help finding coding templates to complete the below tasks in SAS. Thanks in advance.</P><P>1) Import the data from air_pollution.csv to SAS (3)</P><P><STRONG><EM>Weather in Beijing </EM></STRONG></P><OL><LI>2) Produce the frequencies of all values of combined wind direction (cbwd) (from most frequent to least frequent) (2)</LI><LI>3) What is the most frequently occurring wind direction? (1)</LI><LI>4) Calculate the correlation coefficient between temperature (TEMP) and pressure (PRES) (3)</LI><LI>5) Is the correlation positive or negative? What is its strength (very weak/weak/moderate/strong/very strong)? (2)</LI></OL><P><STRONG><EM>How does air pollution vary over months? </EM></STRONG></P><OL><LI>6) Compute the descriptive statistics of pm2_5 by month (3)</LI><LI>7) On average, in which month is the pollution level highest, and in which month is it lowest? (2)</LI></OL><P><STRONG><EM>Relationship between air pollution and weather </EM></STRONG></P><OL><LI><span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:">ðŸ˜Ž</span> Build a linear regression model where pm2_5 is a dependent variable, and month, DEWP, TEMP, PRES, cbwd, Iws, Is and Ir are independent variables (8)</LI><LI>9) What is the R-squared of this model? Based on the R-squared, does the model fit the data well? (4)</LI><LI>10) Create a new variable (high_pm2_5) that takes value 1 if pm2_5 is greater than 150 ug/m^3 and value 0 otherwise (3)</LI></OL><P>11) Develop a logistic regression model where high_pm2_5 is a dependent variable, and month, DEWP, TEMP, PRES, cbwd, Iws, Is and Ir are independent variables (8)</P><P>12) What is the AUC (c statistic) of this model? Based on the AUC, does the model separate high and low pollution levels well? (4)</P><P><STRONG><EM>The worst smog in Beijing </EM></STRONG></P><OL><LI>13) Create a new data set (avg_air_pollution) and calculate an average pollution level (avg_pm2_5) for each month of each year. Select the variables year, month and avg_pm2_5 (10)</LI><LI>14) In which of the 60 analysed months was the average pollution level (avg_pm2_5) highest? This was the worst smog Beijing has experienced for over 50 years (2)</LI><LI>15) Based on the new data set, create a pdf report (highest_avg_air_pollution.pdf) that contains the list of those months in which the average pollution level (avg_pm2_5) was greater than 100 ug/m^3. Use the Moonflower style and add a title ("Months With Highest Average Air Pollution") (5)</LI></OL>Wed, 02 Jan 2019 11:19:33 GMThttps://communities.sas.com/t5/New-SAS-User/Help-SAS-coding/m-p/524054#M4743declanjohn2019-01-02T11:19:33ZCode help for certain tasks
https://communities.sas.com/t5/SAS-Programming/Code-help-for-certain-tasks/m-p/524053#M142467
<P>Hi there, these are the tasks I need to complete using SAS tasks. A template for the code I need to use to perform each task would be very helpful. Thanks in advance. </P><P> </P><P>1) Import the data from air_pollution.csv to SAS (3)</P><P><STRONG><EM>Weather in Beijing </EM></STRONG></P><OL><LI>2) Produce the frequencies of all values of combined wind direction (cbwd) (from most frequent to least frequent) (2)</LI><LI>3) What is the most frequently occurring wind direction? (1)</LI><LI>4) Calculate the correlation coefficient between temperature (TEMP) and pressure (PRES) (3)</LI><LI>5) Is the correlation positive or negative? What is its strength (very weak/weak/moderate/strong/very strong)? (2)</LI></OL><P><STRONG><EM>How does air pollution vary over months? </EM></STRONG></P><OL><LI>6) Compute the descriptive statistics of pm2_5 by month (3)</LI><LI>7) On average, in which month is the pollution level highest, and in which month is it lowest? (2)</LI></OL><P><STRONG><EM>Relationship between air pollution and weather </EM></STRONG></P><OL><LI><span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:">ðŸ˜Ž</span> Build a linear regression model where pm2_5 is a dependent variable, and month, DEWP, TEMP, PRES, cbwd, Iws, Is and Ir are independent variables (8)</LI><LI>9) What is the R-squared of this model? Based on the R-squared, does the model fit the data well? (4)</LI><LI>10) Create a new variable (high_pm2_5) that takes value 1 if pm2_5 is greater than 150 ug/m^3 and value 0 otherwise (3)</LI></OL><P>11) Develop a logistic regression model where high_pm2_5 is a dependent variable, and month, DEWP, TEMP, PRES, cbwd, Iws, Is and Ir are independent variables (8)</P><P>12) What is the AUC (c statistic) of this model? Based on the AUC, does the model separate high and low pollution levels well? (4)</P><P><STRONG><EM>The worst smog in Beijing </EM></STRONG></P><OL><LI>13) Create a new data set (avg_air_pollution) and calculate an average pollution level (avg_pm2_5) for each month of each year. Select the variables year, month and avg_pm2_5 (10)</LI><LI>14) In which of the 60 analysed months was the average pollution level (avg_pm2_5) highest? This was the worst smog Beijing has experienced for over 50 years (2)</LI><LI>15) Based on the new data set, create a pdf report (highest_avg_air_pollution.pdf) that contains the list of those months in which the average pollution level (avg_pm2_5) was greater than 100 ug/m^3. Use the Moonflower style and add a title ("Months With Highest Average Air Pollution") (5)</LI></OL>Wed, 02 Jan 2019 11:18:11 GMThttps://communities.sas.com/t5/SAS-Programming/Code-help-for-certain-tasks/m-p/524053#M142467declanjohn2019-01-02T11:18:11Z