Please answer the questions, use SAS and give the SAS output G601 Ivenre luv¦ 23 30 '54'3 male male 65 Ica range mate

1 answer below »
Please answer the questions, use SAS and give the SAS output
G601 Ivenre luv¦
23 30 '54'3 male male 65 Ica range mate

Answered Same DayDec 26, 2021

Answer To: Please answer the questions, use SAS and give the SAS output G601 Ivenre luv¦ 23 30 '54'3 male male...

Robert answered on Dec 26 2021
128 Votes
Answer (1)
We have ‘Survival’ as our dependent variable (which is binary in nature). This is the reason why
we would run a logistic regression.
Our independent variables would be “Gender” (class/binary variable), “Age(continuous
variable), “Gender*Age” (interaction variable).
The dummy variable for the Gender is defined as
D = 1 if female, D=0 if male. Hence male is our base category.
SAS codes and output (all the codes are in blue)
To import the data, use the code below:
PROC IMPORT DATAFILE=REFFILE
DBMS=XLSX
OUT=WORK.IMPORT;
GETNAMES=YES;
RUN;
(Please note that the name of the file which is saved at work in SAS has been named as
IMPORT)
To run the logistic regression, use the code below:
proc logistic data=IMPORT desc;
class Gender;
model Survival = Gender Age Gender*Age;
run;
quit;
Comment [SNZ1]: Please mention the path
of the file, along with the file name.
The SAS output is as below:
The LOGISTIC Procedure
Model Information
Data Set WORK.IMPORT
Response Variable Survival Survival
Number of Response Levels 2
Model binary logit
Optimization...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here