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

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- Estimated means

- 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-04-2010 10:36 AM

I am quiet new to SAS and I apologize in advance if it is a silly question. I am trying to obtain estimated proportions for a categorical variable, but it seems that I can only get confidence interval if a specify a grouping variable. Suppose I have catVAR1 whose proportion is 0.20, I want to adjust the proportion for age and gender. I have to put gender into the CLASS statement and in the LSMEANS statement of the GLM procedure, like this:

PROC GLM;

CLASS gender;

MODEL catVAR1 = gender age;

LSMEANS gender / CL;

RUN;

This way i get the proportions of catVAR1 for males and females. What if I want the overall proportion in the population, only adjusted for age and gender? if I remove gender from the LSMEANS statement, I get the adjusted proportion but not the CI.

Thanks in advance.

Iron.

PROC GLM;

CLASS gender;

MODEL catVAR1 = gender age;

LSMEANS gender / CL;

RUN;

This way i get the proportions of catVAR1 for males and females. What if I want the overall proportion in the population, only adjusted for age and gender? if I remove gender from the LSMEANS statement, I get the adjusted proportion but not the CI.

Thanks in advance.

Iron.

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

Posted in reply to Iron_grief

09-05-2010 01:33 PM

You are using the wrong statistical procedure; GLM assumes normal distribution on the residuals. You need to be using PROC LOGISTIC.

Doc Muhlbaier

Duke

Doc Muhlbaier

Duke

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

Posted in reply to Doc_Duke

09-06-2010 11:05 AM

Thanks for your reply, but what about this?

http://www2.sas.com/proceedings/sugi31/140-31.pdf

Example 6 page 5, they use SURVEYREG to obtain adjusted proportion.

Also, does the SURVEYLOGISTIC procedure have a ESTIMATE statement?

Best regards. Message was edited by: Iron_grief

http://www2.sas.com/proceedings/sugi31/140-31.pdf

Example 6 page 5, they use SURVEYREG to obtain adjusted proportion.

Also, does the SURVEYLOGISTIC procedure have a ESTIMATE statement?

Best regards. Message was edited by: Iron_grief

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

Posted in reply to Iron_grief

09-07-2010 10:54 AM

I've never used SURVEYREG. I did look at the example and saw that the sample size was nearly 8000. When your sample size is that large, the Central Limit Theorem allows you to use a linear regression procedure when a categorical regression procedure might be more appropriate.