Hello, My name is Brandon and this is my first time posting on here. I am currently trying to overall determine if increased temperatures are leading to increased hospital admissions. I am running my code using SAS software version 9.4 (TS1M4). Attached will be the file I am working with, but a little more about what my objective is and my background. I am trying to create a logistic model which will show the equation for modeling temperatures (the predictor variable) to the number of total hospital admissions (the response variable). Because I have daily counts in my data, years 2009-2015 for every day of the year with such a large sample size, I am assuming that my distribution is poisson (large n, small p). I don't have much background in coding, and this is my first time using SAS, but I know that I am trying to run this using the categorical variable, county (which I believe means it will be reported as a class variable), and using different months. I would love assistance in getting the correct output and code so that I can determine if increased temperatures, using average temperatures and max temperatures, are leading to increased hospital admissions in total. Then from there I believe I can investigate if the effect modification from each age and two particular diseases if I have the code for one model. (I believe it is just a matter of changing what the predictor and response variables). Anyways, here is some of the code I have used thus far, but I get really large scaling estimates so I am not sure if I am running this procedure correctly or not. In addition, I get extremely large Wald Chi-Square values (ranging from 0.11 to 5,000,000). ======================================================================================================== proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = churchill; sheet = "Churchill"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = clark; sheet = "Clark"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = douglas; sheet = "Douglas"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = elko; sheet = "Elko"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = esmeralda; sheet = "Esmeralda"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = eureka; sheet = "Eureka"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = humboldt; sheet = "Humboldt"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = lander; sheet = "Lander"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = lincoln; sheet = "Lincoln"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = lyon; sheet = "Lyon"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = mineral; sheet = "Mineral"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = nye; sheet = "Nye"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = pershing; sheet = "Pershing"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = storey; sheet = "Storey"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = washoe; sheet = "Washoe"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = white_pine; sheet = "White_Pine"; run; proc import datafile = '\\files\users\bwoudhuysen\Desktop\EDdata.XLSX' dbms = XLSX replace out = carson; sheet = "Carson"; run; data all; set churchill clark douglas elko esmeralda eureka humboldt lander lincoln lyon mineral nye pershing storey washoe white_pine carson; run; /* Add the appropriate variable to the data set */ data all; set all; lnPop = log(PopulationSize); month=month(date); /* If you want to analyze by month . . . */ year=year(date); /* . . . or year . . . */ monyr=year*100 + month; /* . . . or month/year . . . */ if 4<=month<=8 then AprAug=1; /* . . . or something custom. */ else AprAug=0; run; /* Taking the month variable as an example, you can add it as a categorical covariate by adding it to both the CLASS and MODEL Statements */ proc genmod data=all descending; class county(param=ref ref ='Clark') month(param=ref ref = '3'); model TotalAdmissions = avgtemp county month / dist = poisson TYPE3 link = log offset=lnPop PSCALE /* Or maybe use DSCALE? */ ; run; /* You could also perform completely separate regressions for each period by putting the variable in the BY Statement. However, to do that, the data set must first be sorted. */ proc sort data=all; by month; proc genmod data=all; by month;
... View more