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
- /
- SAS Programming
- /
- General Programming
- /
- NLMIXED with fixed effects?

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

08-26-2014 03:31 AM

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

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

Posted in reply to lucyygao

08-27-2014 11:27 AM

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

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

Posted in reply to SteveDenham

08-27-2014 06:55 PM

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

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

Posted in reply to lucyygao

08-28-2014 10:29 AM

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