Fast optimizer

3 messages Options
Embed this post
Permalink
R_help Help

Fast optimizer

Reply Threaded More More options
Print post
Permalink
Hi,

I'm using optim with box constraints to MLE on about 100 data points.
It goes quite slow even on 4GB machine. I'm wondering if R has any
faster implementation? Also, if I'd like to impose
equality/nonequality constraints on parameters, which package I should
use? Any help would be appreciated. Thank you.

rc

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Joshua Ulrich

Re: Fast optimizer

Reply Threaded More More options
Print post
Permalink
Please, please, please stop posting non-finance questions to this
list.  Also please note the instructions here:
http://www.r-project.org/mail.html

Particularly:
"Additionally, there are several specific Special Interest Group (=:
SIG) mailing lists; however do post to only one list at time ('SIG' or
general one), cross-posting is considered to be impolite."

Thanks,
Josh
--
http://www.fosstrading.com



On Thu, Oct 29, 2009 at 7:22 PM, R_help Help <[hidden email]> wrote:

> Hi,
>
> I'm using optim with box constraints to MLE on about 100 data points.
> It goes quite slow even on 4GB machine. I'm wondering if R has any
> faster implementation? Also, if I'd like to impose
> equality/nonequality constraints on parameters, which package I should
> use? Any help would be appreciated. Thank you.
>
> rc
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
R_help Help

Re: [R] Fast optimizer

Reply Threaded More More options
Print post
Permalink
In reply to this post by R_help Help
Ok. I have the following likelihood function.

L <- p*dpois(x,a)*dpois(y,b+c)+(1-p)*dpois(x,a+c)*dpois(y,b)

where I have 100 points of (x,y) and parameters c(a,b,c,p) to
estimate. Constraints are:

0 < p < 1
a,b,c > 0
c < a
c < b

I construct a loglikelihood function out of this. First ignoring the
last two constraints, it takes optim with box constraint about 1-2 min
to estimate this. I have to estimate the MLE on about 200 rolling
windows. This will take very long. Is there any faster implementation?

Secondly, I cannot incorporate the last two contraints using optim function.

Thank you,

rc



On Thu, Oct 29, 2009 at 9:02 PM, Ravi Varadhan <[hidden email]> wrote:

>
> You have hardly given us any information for us to be able to help you.  Give us more information on your problem, and, if possible, a minimal, self-contained example of what you are trying to do.
>
> Ravi.
> ____________________________________________________________________
>
> Ravi Varadhan, Ph.D.
> Assistant Professor,
> Division of Geriatric Medicine and Gerontology
> School of Medicine
> Johns Hopkins University
>
> Ph. (410) 502-2619
> email: [hidden email]
>
>
> ----- Original Message -----
> From: R_help Help <[hidden email]>
> Date: Thursday, October 29, 2009 8:24 pm
> Subject: [R] Fast optimizer
> To: [hidden email], [hidden email]
>
>
>> Hi,
>>
>> I'm using optim with box constraints to MLE on about 100 data points.
>> It goes quite slow even on 4GB machine. I'm wondering if R has any
>> faster implementation? Also, if I'd like to impose
>> equality/nonequality constraints on parameters, which package I should
>> use? Any help would be appreciated. Thank you.
>>
>> rc
>>
>> ______________________________________________
>> [hidden email] mailing list
>>
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
>

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.