Hello,
I finding the association between agents a1,a2,a3 and a4 exposures and lung cancer. Exposed = 1,
unexposed =0. My ref. group(refA) is ids unexposed to any of the agents.
a.I am not sure whether my logistic regression model step 3b is right. I am modelling refA with lung-a1
association., then refA with lung-a2 association,etc.
b. Should the refA be considered as continuous or categorical(as I have done in step 3b of the model)?
Thanks in advance.
ak.
/* Logistic test ref group test*/
data agents_exp;
input id$ a1 a2 a3 a4 lung$ 14-21 income 23-29;
datalines;
os1 1 0 0 1 ca case 45424
os2 1 1 0 0 ca case 52877
os3 0 0 0 0 pop cont 25600
os4 1 0 0 1 pop cont 14888
os5 0 0 0 0 ca case 41036
os6 0 0 0 0 ca case 20365
os7 1 0 1 1 pop cont 16988
os8 0 0 0 0 ca case 100962
os9 1 0 1 0 pop cont 11230
os10 0 0 1 0 ca case 35850
os11 0 1 0 0 pop cont 28700
os12 0 0 0 0 pop cont 46320
os13 1 1 1 1 pop cont 24897
os14 0 0 0 0 pop cont 18966
os15 1 0 0 1 ca case 20540
os16 0 0 1 0 pop cont 150600
os17 1 1 1 1 pop cont 24897
os18 0 0 0 0 pop cont 17999
os19 0 0 0 0 pop cont 22540
os20 0 0 0 0 pop cont 158600
os21 0 0 0 0 pop cont 187365
os22 1 0 1 0 ca case 30580
;
run;
/*Step 1: Finding number of cases and controls unexposed to agents(a1,a2,a3 and a4)*/
proc freq data= agents_exp(where=(sum(a1,a2,a3,a4)=0));
tables lung;
title 'Table 1:Subjects unexposed to any of the 4 agents';
run;
/*Step 2:Using subjects unexposed to any of agents as a ref. group*/
proc sql;
create table t as
select
id, a1, a2, a3,a4,lung, income,
sum(a1,a2,a3,a4)=0 as refB
from agents_exp
;
quit;
proc print data=t;
title 'Table 2: original variables and ref group';
run;
/*proc freq data=t;
tables lung* refB lung*a1;
title 'Table 3: freq of ca case and pop cont for ref group';
run;*/
/*Step 3a: Finding odds ratio estimates for variables including ref.group*/
data logtest; set t;
if lung in ('ca case','pop cont');
run;
/* Step 3b:*/
proc logistic data=logtest;
class refb (param=ref ref ='0');
model lung(event='ca case') = a1 refb;
Title 'Table 3b: Estimates for ref. group';
run;
I finding the association between agents a1,a2,a3 and a4 exposures and lung cancer. Exposed = 1, unexposed =0. My ref. group(refA) is ids unexposed to any of the agents.
a. I am not sure whether my logistic regression model step 3b is right. I am modelling refA with lung-a1 association., then refA with lung-a2 association,etc.
b. Should the refA be considered as continuous or categorical(as I have done in step 3b of the model)?
Your code does not contain refA, so I cannot answer your questions. Can you clarify these questions and link them to the code?
It sounds like you are saying that this RefA variable is the response in the Logistic regression. What is the predictor variable(s)?
So I think you want
model lung(event='ca case') = a1 a2 a3 a4 refA;
although I have a concern that refA is correlated with a1 a2 a3 a4.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.