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

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

4 weeks ago

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

Posted in reply to jessho

4 weeks ago

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

Posted in reply to jessho

4 weeks ago

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

Posted in reply to PaigeMiller

4 weeks ago

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!

Highlighted
## Re: Estimating mean dependent variable value from multivariable linear regression model

Options

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

Posted in reply to jessho

4 weeks ago

You want to use

`lsmeans gender/cl;`

--

Paige Miller

Paige Miller