[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: No Convegence in Likelihood Estimation

From   Maarten buis <>
To   stata list <>
Subject   st: Re: No Convegence in Likelihood Estimation
Date   Fri, 2 May 2008 19:33:53 +0100 (BST)

--- Michael Stobernack <> wrote:
> on 16 Jan 2008 you gave the following answer to a question about `No
> convergence in Lekelihood Estimation`.
> I do have similar problems. I would like to run different ARCH models
> with a while loop in a do-File:
>          local l = 1
>            while `l'<=3 {
>            capture:arch `ywahr',arima(`i',`j',`k') arch(1/`l')
> iterate(400)
>            local l = `l' + 1
>           }
> I many cases it works fine but in some cases I get the error message
> `flat log likelihood encountered, cannot find uphill direction`.
> Well as you mention above there might be some problems with the 
> parameters. Since I would like to continue the while loop I use
> capture:arch y, arch(1/1) arima(2,0,2).
> But the computer cancels the operation and terminates.
> Do you have any ideas how to continue the while loop in spite of an 
> error message?

First of all take a look at point 5 of the statalist FAQ

The code you sent should work, I guess that your loop also contains
some other commands after -arch-, and that these cause you trouble. You
can avoid that using the code below:

forvalues l = 1/3 {
    capture:arch `ywahr',arima(`i',`j',`k') arch(1/`l') iterate(400)
    if _rc==0 {
        do stuff

-- Maarten

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

Sent from Yahoo! Mail.
A Smarter Email
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index