BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ilikesas
Barite | Level 11

Hi,

 

I need to make a regression:

 

stock return = market_cap  + debt + CEO + CEO*market_cap

 

This is a study of how a stock return is affected by its market capitalization, its level of debt and who is the CEO.

 

The fixed effect here is the CEO, and it also interacts with market_cap. I looked at SAS examples on the internet but am still not sure which proc to use for my case, so will be grateful if you could give me some direction.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ
proc glm data=sashelp.heart;
   class sex BP_Status;
  model Cholesterol = Sex BP_Status weight smoking / ss3 solution;
  ods exclude ParameterEstimates;
  ods output ParameterEstimates=PE;
quit;

proc print data=PE;
where Parameter in ('Intercept' 'Weight' 'Smoking');
run;

View solution in original post

10 REPLIES 10
Rick_SAS
SAS Super FREQ

If you want to treat CEO as a fixed effect, you would use PROC GLM (or PROC GENMOD, if the distribution of errors is not normal).

 

However, you might ask yourself whether CEO is a fixed effect. A random effect is usually used when the levels in the sample represents  a random sample of all possible levels, which seems to be a better model for CEO, although it depends how you chose your companies. If you want to model CEO as a random effect, you could use PROC MIXED. 

ilikesas
Barite | Level 11

I am still fairly new to the concepts of fixed, random, mixed effects (and the SAS applications of), but I know that in my regression each CEO is a dummy variable because each CEO as an individual is different and therefore each CEO's effect is different when controlled for other variables.

 

Could I use the code that you gave me before:

 

/* same analysis by using the CLASS statement */
proc glm data=have;
   class CEO;              /* generates dummy variables internally */
   model return = CEO market_cap debt CEO*market_cap / solution;
   ods select ParameterEstimates;
quit;

Thanks!

 

 

PS: do you have any articles about fixed,random, mixed?

Rick_SAS
SAS Super FREQ

Yes, the PROC GLM code you wrote will fit the fixed-effect model that you specified. It assumes that CEO is a categorical variable that indicates the CEO's, such as having the values {"Jones", "Smith", "Williams", ...}.

 

I recommend Dave Dickey's 2008 article for a gentle introduction to mixed models:

http://www2.sas.com/proceedings/forum2008/374-2008.pdf

 

ilikesas
Barite | Level 11

Hi Rick,

 

I tried to run the following code:

 

proc glm data=sashelp.heart;
   class sex BP_Status;
  model Cholesterol = Sex BP_Status weight smoking / solution ;
   quit;

Is it possible to get the overall significance of each class variable (i.e, Type III SS) without outputting the actual statistics of each category of each class variable, because I have hundreds of CEOs (and of other categorical variables which I might add to the model).

 

Thanks!  

Rick_SAS
SAS Super FREQ

model Cholesterol = Sex BP_Status weight smoking / ss3;

ilikesas
Barite | Level 11

I hope that I am not becoming too annoying...

 

when I do model Cholesterol = Sex BP_Status weight smoking / ss3; I do get only the SS3, but now I don't have the coefficients of the independent variables and their t values. Is it possible to get them without the coefficients of the categories of the CLASS variables? My concern is that if I have too many variables due to the fixed effects SAS will get overloaded.

 

 

 

Rick_SAS
SAS Super FREQ
proc glm data=sashelp.heart;
   class sex BP_Status;
  model Cholesterol = Sex BP_Status weight smoking / ss3 solution;
  ods exclude ParameterEstimates;
  ods output ParameterEstimates=PE;
quit;

proc print data=PE;
where Parameter in ('Intercept' 'Weight' 'Smoking');
run;
StatsMan
SAS Super FREQ

Sorry Rick!  I did not see your reply from yesterday!

StatsMan
SAS Super FREQ

The SOLUTION option outputs all of the parameter estimates for your model.  There are no sub-options that will output only a subset of the parameter estimates.

 

You can output the parameter estimates to a SAS data set, however, using the ODS OUTPUT statement.  You can then post process that data set and do a PROC PRINT against it, printing only the parameters you desire.  You would need to examine the structure of that data set, perhaps printing the entire data set or a subset, and figure out how to conditionally select the rows you want to print .. or exclude the rows you do not want to print.  

 

You can use the ODS EXCLUDE statement to keep PROC GLM from printing the results of the SOLUTION option.

ilikesas
Barite | Level 11

The paper upon which we base our research indeed treats the variables as fixed effects and even mentions that he used SAS proc glm, so the project supervisor wants to use fixed effects as well. But indeed the variables somewhat look like random effects, so she said that we will also do a mixed model! 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 10 replies
  • 3130 views
  • 5 likes
  • 3 in conversation