I need sas code sas logs outputtables and graphs need to be generated in RTF Files using SAS Software only
SAS Macros can be created for question 1 and 2
Q1 Demographics by total colonization including table footnotes
AGE CALCULATIONS
Subjectsageiscomputedinyearselapsedfromthedateofbirth(DOB)todate sample taken.
Age = int((Date sample taken()-dob)/365.25);
consider these columns to create the table demography using SAS MACROS AND CODES.
SAS NEED TO GENERATE RTF FILE AS MENTION BELOW
COLUMNS REQUIRED CODE GENDER DATE OF BIRTH DATE SAMPLE TAKEN Colonised with S pneumoniae(J COLUMN)
FROM 0.Data.XLS
Key:Colonized= column J=NAI;Not Colonized=column J=OXI
HENCE TO GET TOTAL YOU NEED TO OUTPUT COLUMN J IN SAS
GENDER NEED TO BE CODED USING PROC FORMAT FOR MALE FEMALE
THE FOLLOWING SAS FUNCTIONS ARE USED TO GENERATE DEMOG TABLE
PROC MEAN
PROC FORMAT
PROC TRANSPOSE
PROC FREQ
PROC SQL
IF THEN ELSE
PROC REPORT
THE TABLE IS ALREADY UPLOADED IN THE ASSIGNMENT NAMED 1. Tables_demographics
USE SAS MACROS
PROVIDE SAS CODE RTF FILES OUTPUT LOGS
Q2
table of distributions of confounders and Grouping and graphs
Proc tabulate and proc gplot
TABLE 1 Distribution of confounders across the time period
OUT HERE CONSIDER THESE COLUMNS FROM THE 0.Data.XLS TO CREATE THE TABLE Distribution of confounders across the time period
CODE GROUPING Healthy orespiratory disease or otherdiseasewhensamplewastaken (COLUMN F)
BROTHER KINDERGARDEN ANTIBIOTICS
TABLE 2 Colonization overall, with and without PCV13, TYPE_3 and TYPE_19
OUT HERE CONSIDER THESE COLUMNS FROM THE 0.Data.XLS TO CREATE THE TABLE Colonization overall, with and without PCV13, TYPE_3 and TYPE_19
CODE GROUPING COLUMN J, K, L, M, N
REMAINING ARE GRAPHS THAT NEED TO BE GENERATED
KINDLY LOOK INTO DOCUMENT 2. Tables_Graphs TO VIEW THE REQUIRED TABLES AND GRAPHS NEEDED
USE SAS MACRO
PROVIDE SAS CODE RTF FILES OUTPUT LOGS
Q3 TABLE
3. Logistic_Colonised DOCUMENT USED TO VIEW THE REQUIRED TABLE
Logistic regression where Grouping is an ordinal variable (1, 2, 3, 5, 6) for column J
Rows with confounders missing are excluded
proc logistic data=XX;
class XX (param=ref);
model XX (event=' XX ')= XX / scale=none
clparm=wald
clodds=pl
rsquare;
where XX ne ' XX ';
run;