turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- glm procedure

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-24-2016 09:08 AM

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

Accepted Solutions

Solution

02-24-2016
10:08 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to marica14

02-24-2016 09:58 AM

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to marica14

02-24-2016 09:30 AM

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?).

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Rick_SAS

02-24-2016 09:32 AM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to marica14

02-24-2016 09:44 AM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Rick_SAS

02-24-2016 09:55 AM

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 ?

Solution

02-24-2016
10:08 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to marica14

02-24-2016 09:58 AM