Very familiar with what I am trying to do in R. But I am having a hard time wrapping my head around how to manipulate the output of a SAS proc.
The R code I ran is
mylogit <-glm(tvsitcom ~ gender age,data=student,family = "binomial")
odds_ratio <-exp(coef(mylogit))
The SAS code I am attempting to do the same however I am cannot figure out how to take e^(Parameters) for each of the Parameters in the output. Do I need to use a seperate PROC for this?
proc reg data=perm.college;
model tvsitcom=age gender;
ods output ParameterEstimates;
run;
Based on the answer below I have update the question with the answer:
proc reg data=perm.college;
model tvsitcom=age gender;
ods output ParameterEstimates=param;
run;
data or;
set param;
odds_ratio=exp(Estimate);
run;
CodePudding user response:
An example for you:
proc reg data=SASHELP.CARS;
model Horsepower=EngineSize Cylinders MPG_City;
ods output ParameterEstimates=data1;
run;
data want;
set data1;
odds_ratio=exp(Estimate);
run;