[Rd] Re: calling optif0 in a C function

From: Emmanuel Paradis <paradis_at_isem.univ-montp2.fr>
Date: Wed 23 Feb 2005 - 03:21:45 EST

I have solved (apparently) my problem: instead of optif0, calling optif9 works fine. I use something like:

   optif9(*np, *np, l, (fcn_p) fcn_expo, (fcn_p) 0, (d2fcn_p) 0,

	 D, typsiz, 1, 1, 1, &msg, -1 /* = ndigit */, 1000,
	 0 /* = iagflg */, 0, -1.0, 1.e-6, 0.1, 1.e-6, xpls, fpls,
	 gpls, itrmcd, a, wrk, &itncnt);

inspired from what is in nlmefit.c from package nlme (also found in an older mail from Adrian Trapletti on R-devel).

It sounds that optif0 is not used anywhere in R.

EP

Emmanuel Paradis wrote:
> Dear All,
>
> I am trying to use the function optif0 (in main/uncmin.c) from the
> latest R distribution. The reason is that I have a quite complicated
> likelihood function which is coded in C, and I would like to optimize it
> directly.
>
> To see how this works, I have tried with a very simple example:
> optimizing the likelihood of a sample using an exponential distribution.
> I have tried several solutions but none worked. I paste below the
> functions that come the closest to what should work. The compilation is
> fine and the call from R too. It seems that the call to optif0 does not
> do anything whereas everything else works.



R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Feb 23 02:26:20 2005

This archive was generated by hypermail 2.1.8 : Wed 23 Feb 2005 - 02:39:54 EST