简体   繁体   中英

How to extract / use output from SAS proc

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;

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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM