help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fminunc function


From: Ben Abbott
Subject: Re: fminunc function
Date: Wed, 10 Nov 2010 15:50:40 +0800

On Nov 10, 2010, at 2:47 PM, Ana Norman wrote:

> Hi,
>  
>  
>  I'm new to octave and I'm trying to use the matlab "fminunc" function. I 
> have the octave version 3.2.4 which is the latest one as far as I am aware.
>  
> The code I have is as follows. 
> options=optimset('LargeScale','off','Display','iter','GradObj','off',...
> 'MaxFunEvals',10000,'MaxIter',MAXITERS,'TolX',PARAMTOL,'TolFun',LLTOL,'DerivativeCheck','off');
> [paramhat,fval,exitflag,output,grad,hessian]=fminunc(@loglik,param,options);
>  
>  
> The logit model I want to run in octave then returns the following error 
> message:
> Checking the data and specifications.
> Inputs have been checked and look fine.
> Start estimation
> The negative of the log-likelihood is minimized,
> which is the same as maximizing the log-likelihood.
> warning: unrecognized option: LargeScale
> warning: unrecognized option: Display
> warning: unrecognized option: DerivativeCheck
> warning: fminunc: some elements in list of return values are undefined
> Estimation took 0.010417 minutes.
> Convergence not achieved.
> The current value of the parameters and hessian
> can be accesses as variables paramhat and hessian.
>  
> Please, could anyone help me with the code?  Is there another function I can 
> use instead of fminunc?
>  
> Cheers

You can see which options may be set by typing ... 

octave-3.2.3:1> optimset

All supported optimization options:

  ComplexEqn
  FinDiffType
  FunValCheck
  GradObj
  Jacobian
  MaxFunEvals
  MaxIter
  OutputFcn
  TolFun
  TolX
  Updating

You can avoid the warnings by not setting the options that are not supported.

If you'd like help with convergence, you'll need to provide more information. 
Can you provide the source for the loglik() function, the input "param", and 
anything else needed for someone else to debug your problem?

Ben






reply via email to

[Prev in Thread] Current Thread [Next in Thread]