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
- /
- means of independent variables and regression coef...

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

09-25-2011 02:17 PM

Hello,

I would like to merge the estimated coefficients of a regression with the mean of the corresponding independent variables.

I perform the regression with proc genmod and take the parameters from the parameterestimates table through ods output.

this table has one column for the variable name( called parameter), one column for the level of the variable (called level1) and one column for the estimate (estimate). The column level1 report the (possibly formatted) value of a classification variable while it is empty for a non class variable.

I imagine I can obtain the means of the classification variable through proc means and then collapse the column of the levels of the variables into one and then append to this dataset the means of the non classification variables but I was wondering if there is any simpler solution. Since I would like to generalize the program I would appreciate hints in either ways.

Thank you in advance

I

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

Posted in reply to ciro

09-25-2011 03:16 PM

Just a clarification: for mean of a level of the classification variable I intend the mean of the implicit dummy that is the share of cases with that specific level (I am using param=ref).

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

Posted in reply to ciro

09-26-2011 02:10 PM

I'm not 100% sure of your intention, but it sounds like you want to use the OUTDESIGN= option to output the design matrix, and feed that to PROC MEANS. The difficulty, I suppose, is that GENMOD doesn't support OUTDESIGN= and you want PARAM=REF, so you can't use GLMMOD. Try GLIMMIX or LOGISTIC, and read http://support.sas.com/kb/23/217.html

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

Posted in reply to Rick_SAS

09-27-2011 06:35 AM

xcen > it

Dear Rick, thank you for your suggestion that made me know the outdesign option. However it seems that proc glimmix does not support reference values for classification variables and proc logistic is not appropriate since I am using a linear regression model (link=identity dist=normal in genmod).

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

Posted in reply to ciro

09-27-2011 10:08 AM

Read the KB article I linked to. You aren't actually doing the analysis, you're just getting the design matrix. You can put anything for Y. It can be continuous, constant, whatever. All that matters is the right-hand side. For example:

proc logistic data=sashelp.class outdesign=design outdesignonly;

class sex(param=ref);

model height = age weight sex;

run;

proc print;run;

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

Posted in reply to Rick_SAS

09-29-2011 04:22 AM

xcen > it

thanks again! I didn't undenrstand before before. It seems the right direction.