BookmarkSubscribeRSS Feed
alexprocmixed
Calcite | Level 5

Hello,

i want to estimate a model where around 5000 firms are nested in 30 industries and i have five observations per firm over the years 2004-2008.

I want to estimate the portion of variance in firm profits that is explained by the factor 'firm' and the portion explained by the factor 'industry'. Additionally i want to get the firm specific time effect (residual).

In the first step I dont want any covariates.

I tried the following  proc mixed procedure code:

proc mixed noclprint covtest;

class firm industry;

model profit = /solution ddfm=bw;

random intercept/sub=firm;

random intercept/sub=industry;

run;

the result i get shows me that i only have one subject instead of 5000. How can i tell sas that i have multiple observations per firm? i'm not sure how and if i have to use the 'repeated' option here? i dont find any examples with repeated observations per subject and two additional  levels (firm and industry in this case)

would be nice if you could help me!

Thanks Alex

1 REPLY 1
SteveDenham
Jade | Level 19

Alex,

Came across this in the Procedures forum, and answered there.  Here is the gist of what I said:

You might try:

proc mixed noclprint covtest;

class firm industry year;

model profit = year/solution ddfm=bw;

random intercept/sub=firm;

random intercept/sub=industry;

repeated year/sub=firm*industry type=ar(1);

run;

However, this may be too computationally intense for PROC MIXED.  If you have access to PROC HPMIXED, it may be the tool of choice.

Steve Denham

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 1224 views
  • 0 likes
  • 2 in conversation