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 'industry'. Additionally i want to get the firm specific time effect (residual).

I use proc mixed:

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,

Perhaps you could 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, I am going to guess that this may be somewhat intensive for proc mixed.  You may wish to consider, if you have access to it, PROC HPMIXED.

Steve Denham

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 Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 585 views
  • 0 likes
  • 2 in conversation