BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
marica14
Calcite | Level 5

hello,

i am doing a glm procedure to determine the factors exposure on fetal growth. ( pesticides, season )

i have to adjust it with sex and diabetes (for example). ( i have make dummy variables for qualitatives variables and put it on class statement)

i don't know the right procedure :

is it

proc glm data = work;

class diabetes;

model weightnewborn = pesticides * sex*diabetes  season*sex*diabetes;

run;

OR

proc glm data = work;

class diabetes;

model weightnewborn = pesticides * season*sex*diabetes 

run;

 ?

thank you for your response

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Yes, that is correct. "Adjusting for a variable" or "controlling for a variable" means that those effects are in the model, even if they are not the primary quantity that you are investigating.

View solution in original post

5 REPLIES 5
Rick_SAS
SAS Super FREQ

Both sex and diabetes are categorical, so both go on the CLASS statement:

CLASS Sex Diabetes;

 

If you want a model that uses only the main effects, use

MODEL weightnewborn = pesticides  season sex diabetes;

 

If you believe that there are interactions between the explanatory variables, then use the "*" operator to specify the interaction effects. For example,

MODEL weightnewborn = pesticides  season sex diabetes  sex*diabetes;

is a model that assumes that the birth weights depend on whether the females also have diabetes (or diabetic mothers?).

marica14
Calcite | Level 5

thank you, so we mix exposition factors and confusion factors ?

Rick_SAS
SAS Super FREQ

There is a nice section of the GLM documentation that discusses how to specify effects by using the SAS "stars and bars" notation.

 

I've told you how to specify the syntax, but deciding on the correct model is more difficult because it involves the data. Many analysts start by fitting a main-effect model and then use graphical disgnostic plots and statistical techniques to investigate whether that initial model is sufficient, or whether the data support a more complex model.

marica14
Calcite | Level 5

I read the documentation, so if i want to adjust a multiple regression on the sex, i have to put them on the model like others variables ?

Rick_SAS
SAS Super FREQ

Yes, that is correct. "Adjusting for a variable" or "controlling for a variable" means that those effects are in the model, even if they are not the primary quantity that you are investigating.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 5 replies
  • 1771 views
  • 0 likes
  • 2 in conversation