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
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.
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?).
thank you, so we mix exposition factors and confusion factors ?
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.
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 ?
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.
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.