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

Topic Options

- 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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-02-2015 06:13 AM

I have a very large system that has more than 100 parameters. I need to write a module to compute the value of the likelihood function. The first step is to define the parameter vector. Usually parameter is defined as a=parm[1];b=parm[2]. But if I define each parameter like that, it would take too long. I want to follow some rule to define the parameter vector, e.g. according to the data of the company name(microsoft apple sas...). Could any body give me a hint?

Accepted Solutions

Solution

02-02-2015
09:37 AM

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

Posted in reply to Hanyu

02-02-2015 09:37 AM

The parameters to be optimized are passed in as an argument to the objective function. These values represent the parameters in the model that are to be fit to the data. Most models have fewer than a dozen parameters. You can copy these values to local variables, such as mu=param[1], but you can also use the param vector directly in the MLE equations, such as SUM(param) or SSQ(param) or MEAN(param). So no, you do not have to copy them to a local variable.

The data are fixed. The data values are not to be optimized, so the data vector is sent in as a GLOBAL variable.

All Replies

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

Posted in reply to Hanyu

02-02-2015 09:00 AM

In MLE problems, the data are not parameters in the optimization, they are fixed values. You can read them into a variable called X and then use the GLOBAL statement to enable the objective function to use those values in the MLE computation. See the article http://blogs.sas.com/content/iml/2011/10/12/maximum-likelihood-estimation-in-sasiml/

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

Posted in reply to Rick_SAS

02-02-2015 09:17 AM

Hi Dr. Wicklin,

I have read your blog. You use the following statement

mu = param[1];

to indicate that mu is a parameter.

I need to estimate many parameters. Do I need to define each of them as you define mu?

Solution

02-02-2015
09:37 AM

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

Posted in reply to Hanyu

02-02-2015 09:37 AM

The parameters to be optimized are passed in as an argument to the objective function. These values represent the parameters in the model that are to be fit to the data. Most models have fewer than a dozen parameters. You can copy these values to local variables, such as mu=param[1], but you can also use the param vector directly in the MLE equations, such as SUM(param) or SSQ(param) or MEAN(param). So no, you do not have to copy them to a local variable.

The data are fixed. The data values are not to be optimized, so the data vector is sent in as a GLOBAL variable.