Re: [R] Minimise a parameter of a given function f, with f > 0

From: Kevin Lu <kecactus_at_googlemail.com>
Date: Thu, 24 Apr 2008 17:40:14 +0100

The function is

f(s,t) = ( a1*t + a2*t^2 + ( a3*t + a4*t^2 )*d1*s^2*t^2 + (a5*t + a6*t^2)*d1^2*b^4*t^4 )*exp(-0.5*d1*s^2*t^2) + a8

where a1,a2,...,a8,d1 are some constants (can be positive or negative), which are computed from a given set of data.

The objective is to find the minimum value of s >0.5, which satisfies f(s,t)
>0 where t can be any value on the real line. It may be that such s does not
exist for the given dataset

If the conditions f(s,t)>0 and s>0.5 were not needed, then optim could be used to find the minimum values for both (s,t) with the range setting at -Inf and Inf.

I suppose one way to do it (I haven't tried out) is to substitute the values of (s,t) found and see if they satisfy f(s,t)>0, but it may be that s found is < 0.5, and there is another one just >0.5 There are also other potential problems and computational disadvantages.

2008/4/24 Paul Smith <phhs80_at_gmail.com>:

> On Wed, Apr 23, 2008 at 8:51 PM, Kevin Lu <kecactus@googlemail.com> wrote:
> > I need to find the minimum value of the parameter, s, such that the
> function
> > f(s,t) > 0 (where -Inf < t < Inf)
> >
> > I've looked into optim, constrOptim and others but they don't seem to do
> > this. Des anyone have some suggestions?
>
> In order to allow us to help you, please send us a minimal example.
>
> Paul
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 24 Apr 2008 - 16:49:09 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 Apr 2008 - 17:30:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive