NLMIXED with fixed effects?

Reply
New Contributor
Posts: 2

NLMIXED with fixed effects?

Hi,

I am trying to run an NLMIXED model with firm fixed effects. However I have thousands of firms, and there is no by class command that can be used for the NLMIXED model.

What is the best way to incorporate the fixed effects into the model? I'm not sure if dummies would work as I would have to create thousands of dummies.

Thanks,

Lucy

Respected Advisor
Posts: 2,655

Re: NLMIXED with fixed effects?

I think the best you might do is to fit for each firm separately, with a BY statement or by setting up some sort of macro loop.  But is that really meaningful?  Do you need a separate equation for each firm as a deliverable?  With thousands of firms, I would think of firm as a random effect--that there is a single underlying equation, and the firms are a source of variability for the parameters in that equation.

Steve Denham

New Contributor
Posts: 2

Re: NLMIXED with fixed effects?

Hi Steve,

Thanks for your response.

I don't need the parameters for each firm, only the ones of the main equation. If that's the case, how would I go about including the firms as a random effect using the NLMIXED command?

Thanks,

Lucy

Respected Advisor
Posts: 2,655

Re: NLMIXED with fixed effects?

There is a very good example (Example 70.1 One-Compartment Model with Pharmacokinetic Data) in the SAS/STAT13.2 documentation.  It is in previous versions as well.  In this example there is data for several subjects, and an overall equation is fit, with a random statement fitting additional components.  Simply replace subjects with firms and I think you will be good to go.

Steve Denham

Ask a Question
Discussion stats
  • 3 replies
  • 176 views
  • 0 likes
  • 2 in conversation