Hello,
so am running a univariate analyses by putting each variable alone in the model.
the outcome is acet;
the dependent variable is sex (coded Men=1 and Women=2)
the independent variables are; csa (coded as 1 or 0) and age (coded which is numeric i.e. 18, 32, 56, 89, etc)
For example below; i tried putting only sex in the model but i keep getting error from the SAS log. please any help?
proc genmod data=avia88 desc;
class sex;
model acet=csa sex*csa/link=logit dist=binomial type3;
estimate "M:" csa csa*sex 1 -1 0 0/exp;
estimate "W:" oral_cs csa*sex 0 0 -1 1/exp;
run;
made a mistake in the first one.
This is it below:
proc genmod data=avia88 desc;
class sex;
model acet=sex csa sex*csa/link=logit dist=binomial type3;
estimate "M:" csa csa*sex 1 -1 0 0/exp;
estimate "W:" csa csa*sex 0 0 -1 1/exp;
run
Thank you. here is it.
proc genmod data=avia88 desc;
class sex;
model acet=sex csa sex*csa/link=logit dist=binomial type3;
estimate "M:" sex csa csa*sex 1 -1 0 0/exp;
estimate "W:" sex csa csa*sex 0 0 -1 1/exp;
run;
the independent variable is sex.
adjusting for csa (1,0), age(18, 23, 89 etc) etc...
but for now i want to do a univariable analyses with each variable one by one in the form of OR 95CI
Univariate means one variable in the model statement.
You still have multiple variables.
@Mystik wrote:
Thank you. here is it.
proc genmod data=avia88 desc;
class sex;
model acet=sex csa sex*csa/link=logit dist=binomial type3;
estimate "M:" sex csa csa*sex 1 -1 0 0/exp;
estimate "W:" sex csa csa*sex 0 0 -1 1/exp;
run;
the independent variable is sex.
adjusting for csa (1,0), age(18, 23, 89 etc) etc...
but for now i want to do a univariable analyses with each variable one by one in the form of OR 95CI
Yes i agreed univariate is one variable in the model but remember there is sex in there bcos i wanted to stratify by sex (male vs female) to create a table stratified by sex. As i said earlier, the dependent variable is sex and In this case you have to include sex.
Eventually, i got it all figured out as the problem was coming from the "estimate" side; e.g. -1 1 and -1 1 0 0 for males.
So the sas code below worked perfectly for me now.
proc genmod data=avia88 desc;
class sex csa;
model acet=sex csa sex*csa/link=logit dist=binomial type3;
estimate "M:" csa -1 1 csa*sex -1 1 0 0/exp;
estimate "W:" csa -1 1 csa*sex 0 0 -1 1/exp;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.