03-29-2012 05:10 PM
I cannot get my chi data on my input to input right.
input comparison who$ svrty_lvl_cd svrty_lvl_desc admission$ count;
1111 NATIONAL 0 N/A ADMIT 2995
1111 NATIONAL 0 N/A READMIT 5
1111 1111 0 N/A ADMIT 23
1111 1111 0 N/A READMIT 1
1111 NATIONAL 1 MINOR ADMIT 31697
1111 NATIONAL 1 MINOR READMIT 52
1111 1111 1 MINOR ADMIT 14
1111 1111 1 MINOR READMIT 1
1111 NATIONAL 2 MODERATE ADMIT 42018
1111 NATIONAL 2 MODERATE READMIT 154
1111 1111 2 MODERATE ADMIT 9
1111 1111 2 MODERATE READMIT 1
1111 NATIONAL 3 MAJOR ADMIT 7608
1111 NATIONAL 3 MAJOR READMIT 19
1111 1111 3 MAJOR ADMIT 3
1111 1111 3 MAJOR READMIT 1 ;
proc sort; by comparison descending admission;
proc freq data=chiin order=data; by comparison;
tables svrty_lvl_cd*svrty_lvl_desc*who*admission/chisq cmh fisher expected;
output out=final or chisq;
It will create the input table chiin but will put a . in the svrty_lvl_desc column.
Then when the rest of the code runs it gives me an error of:
invalid svrty_lvl_desc in line and names all the line numbers associated.
03-29-2012 05:12 PM
There is also no space between the first of my input and the 2nd line. It is just the inability to paste in this forum correctly and I cannot upload or attach files because the 1111 is not real. That space is actually a taxid number which is 9 digits long and I have to fake info I put on here because I work in healthcare and do not want to violate PHI or HIPPA laws. So I am never allowed to do any sort of attaching. I try and copy and paste but it does not always format right.
03-30-2012 11:27 AM
Because it does not line up correctly in the proc sql step or data steps. All the input I have received from the SAS forums has not worked. So I exported the tables to Access and manually pulled from there what I need and now manually putting stuff in Excel to paste into SAS as a datain. I have a meeting at 1pm today to show CHI results and been spinning my wheels with input from the SAS forum for about 2wks and it has gotten down to the wire and I could no longer wait for help. So I have the first 60 TINS manually done now and ran and just pasted the data without the severity items and just did it by comparison, who, admission and count and that works out perfect. I will have to come back to figuring out how to add severity stuff and doing it based on a SAS table and code later. Right now it is about presenting findings and that is the most important. Hopefully someone on here can help me figure this out. If not I will be spinning my wheels for a longer amount of time
03-30-2012 12:00 PM
If you have the data in an excel sheet, save it as CSV and then use proc import to read it in. You don't need any special license for that and don't have to
I'd highly suggest you either hire someone offline to help you get through this issue and get working with SAS though otherwise you're spinning your wheels on a lot of small problems...or take a course through SAS.