This actually does a fairly good job of transposing the data and formating the dates, but again, I'm missing a number of records/dates: proc transpose data=XLFileOut out=XLTrans; by TERM; var _:; run; proc sql; create table FinalOuput as select Term ,COL1 ,input(_LABEL_,best.)-21916 as DATE format=date9. FROM XLTrans;
... View more
I have an Excel file (a1:vk119) that looks like this: Term 1/1/2019 1/2/2019 1/3/2019 1/4/2019 ... 12 2.5% 2.6% 2.3% 2.5% 13 3.2% 3.4% 3.6% 3.1% ... 14 2.75% 3.2% 2.7% 3.15% ... ... ... ... ... ... ... I need to tranpose the file so that I have Term and Date with corresponding values for each Date/Term combination. I've tried two methods for importing the file. I tried Using: proc import datafile="\\filepath\excelFile.xlsx" Out=XLFile DBMS=Excel replace; SHEET="Sheet1"; Getnames=YES; This gives me some char fields with underscores that I can compress to get the dates, however I don't get all of the columns a:vx. So I used, DBMS=XLSX but I strangely end up with a 2 sets of columns names which I don't know what I can do with. Term Day_Name_1 Day_Name_2 ... _43476 _43483 ... 12 2.5% 2.6% 2.3% 2.4% 2.65% ... 13 3.2% 3.4% 3.6% 3.1% 3.35% ... ... ... ... ... ... ... ... I can transpose the table like this: proc transpose data=XLFile out=XLFileOut; by TERM; var _:; but I end up missing a large number of dates from the file. I'm in a large company and the file is updated frequently and used by other departments, so I can't change the excel file directly. Any thoughts as to why the column names are coming into SAS like this and any ideas for workarounds?
... View more
I need some help using a lookup table in SAS that looks like the following. The table comes from an Excel file that produced by someone else and I have no way to change the structure of the table. I would like to be able use the table to join where the Term and Date in the first row match another table. Any way to accomplish this in SAS? Term 6/1/2020 6/2/2020 6/3/2020 6/4/2020 1 10 11 12 13 2 9 10 11 12 3 8 9 10 11 4 7 8 9 10
... View more
That's what I'm missing. The SAS Code looks something like this, but obviously it doesn't give me any score. 'Conversion' is my target variable, but that field doesn't exist in the dataset to be scored since they are all Conversion = 0. When I try to add variables such as EM_EVENTPROBABILITY or EM_CLASSTARGET I get an error message. Not sure what variable to use to show what the high potential conversions should be. proc sort data= EMWS1.Score_SCORE out= bestlist; by descending State_Code; run; proc print data= bestlist; var TIN SalesIndicator Footprint Tenure State_Code; run; SAS Code node Dataset to be scored
... View more
I am following the example in this tutorial but using a different data set from a CSV file which contains a list of customers with several categorical input variables along with a binary target variable (1,0) of those that had converted: support.sas.com/documentation/cdl/en/emgsj/67981/HTML/default/viewer.htm#n0o0v7spwdeoqcn11vnwnuc8x91l.htm However, when I run the final SAS Code, I get an output of the entire list when what I expected from the tutorial was a list of potential customer conversions. I'm not sure settings might need to be changed because I didn't use the Wizard as indicated on this page: support.sas.com/documentation/cdl/en/emgsj/67981/HTML/default/viewer.htm#n0uuvzj5du0ohon13mr6xboyf945.htm but rather simply imported another CSV file and changed the Role to Score to take the place of the sample DONOR_SCORE_DATA with all of the customers who had not yet converted. Any ideas on what could have gone wrong? Let me know if you need any further clarification.
... View more
I'm using Enterprise Miner for the first time and am trying to create a Decision Tree that will select records that have the highest propensity to become a conversion of a prospect to a customer. If I have a binary Yes/No target variable and I want a decision tree to show me the variable values that point to a Yes decision, how do I modify the Decision Tree so that the model will ultimately select those records that are most likely to me a Yes. Since most of my training data is a No, the tree seems to favor the decisions that lead to No. Does that make sense? Let me know if you need any clarification.
... View more