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
- /
- Estimating mean dependent variable value from mult...

Topic Options

- 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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-25-2018 12:45 PM

I ran a multivariable linear regression model in SAS and got parameter estimates; my model uses compensation as the dependent variable and gender amongst other demographic variables as the predictors.

proc glm;

class race gender rank;

model = total_comp = age race gender rank / solution ss3;

run;

However, I was also hoping to be able to use this model to calculate the mean total compensation using the parameter (coefficient) estimates generated from the above model for men and for women (i.e.m when the independent variable gender=0 and when gender=1). I am not sure how to program this though -- as I have only been able to see multiple predicted compared to actual values instead of a mean predicted total compensation for each gender category.

Please help -- happy to provide more information if helpful.

Thanks!

Jess

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

Posted in reply to jessho

02-25-2018 01:19 PM

That's not the code you ran, is it? If not, please post the code and log. You should always have a DATA= and you shouldn't have that first = in the MODEL statement so I wonder if your code ran correctly.

I wonder if an effect plot wouldn't be more useful?

https://blogs.sas.com/content/iml/2016/06/22/sas-effectplot-statement.html

You can calculate an estimate, but you have to make assumptions regarding race gender and rank. You can assume the reference categories you set - or didn't in this case. Or you could do it for all and then if you know the N's in your population weight them accordingly? Not sure about the statistical validity of that approach.

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

Posted in reply to jessho

02-25-2018 02:57 PM

jessho wrote:

I ran a multivariable linear regression model in SAS and got parameter estimates; my model uses compensation as the dependent variable and gender amongst other demographic variables as the predictors.

However, I was also hoping to be able to use this model to calculate the mean total compensation using the parameter (coefficient) estimates generated from the above model for men and for women (i.e.m when the independent variable gender=0 and when gender=1). I am not sure how to program this though -- as I have only been able to see multiple predicted compared to actual values instead of a mean predicted total compensation for each gender category.

Certainly, you could use the LSMEANS statement to obtain the least-squares mean of total_comp for men and for women.

--

Paige Miller

Paige Miller

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

Posted in reply to PaigeMiller

02-26-2018 09:32 PM

Thanks, Paige. I tried that, but I could not get the LS Means by gender (nor could I get the 95% confidence intervals). I coded:

proc glm data=x;

class race gender rank;

model total_comp = age race gender rank / solution;

lsmeans total_comp / cl;

run;

Any sense of what I am coding incorrectly if I want the LSMean for gender=0 and LSMean for gender=1?

Thanks!

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

Posted in reply to jessho

02-27-2018 07:30 AM

You want to use

`lsmeans gender/cl;`

--

Paige Miller

Paige Miller