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
- /
- How to dummy code different independent groups in ...

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
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-20-2016 01:04 AM - edited 09-20-2016 11:21 AM

Hello,

I have 4 independent groups of individuals that I would like to compare in terms of their mental health outcomes (a continuous depression score). I am running a linear reg, with proc surveryreg. I am controlling for a slew of covariates, and adding in a weight statement, since this is survey data. My question has to do with the dummy coding. Is it enough to just reference code using the class statement, or do I need to also include an estimate statement? I will be comparing each of my groups to group 4. What I'm essentially interested in, is getting the parameter estimates and SE for each group against the reference group.

proc surveyreg;

weight;

class groups(ref='4');

model mentalhealth=Groups /solution;

estimate 'group 1 vs 4' groups 1 0 0 -1;

estimate 'groups 2 vs 4' groups 0 1 0 -1;

.

.

.

run;

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

09-20-2016 10:59 AM - edited 09-20-2016 11:01 AM

In my opinion, I think you will find the results of the estimate statements to be more meaningful than just looking at the solution vector.

However, you have a problem, in that the variable 'groups' doesn't appear in your MODEL statement. In the current MODEL statement, the only effect variable is 'cluster', which I don't think refers to group. You will need to correct one or the other to get any results.

Steve Denham

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

09-20-2016 11:21 AM

Oops, that was just a typo.

What information does the estimate statement give you, versus the solution vector?

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

09-20-2016 01:55 PM

The ESTIMATE statement will enable you to get the difference between levels, given the other covariates. Much easier would be to use an LSMEANS statement, such as:

LSMEANS groups/diff=control('4');

Steve Denham