[Gretl-users] Help - estimation of Profile likelihood function for TVECM

Riccardo (Jack) Lucchetti r.lucchetti at univpm.it
Mon May 18 06:06:25 EDT 2015

On Mon, 18 May 2015, Miranda Svanidze wrote:

> Hello,
> I am new here.
> My problem is following: I want to calculate entire profile likelihood
> function (and then find maximum value) in order to find threshold estimate
> and run TVECM model. Therefore I want to build script (with loop
> programming) which will calculate just entire profile likelihood function
> in Gretl. The other estimations I can perform myself.
> Here is my request formulated below:
> # Model: TVECM (Threshold Vector Error Correction Model)
> # Name of my variables: dependent variable - Y (Price on market
> 1); independent variables - X (Price on market 2) and ECT (Error correction
> term)
> # My data sample runs from 2006:10 to 2014:08
> # First, I need to generate variables "difference of Y", "difference of X",
> "Lagged value of ECT", "lagged value of diff_Y", and "lagged value of
> diff_X"
> # "Lagged value of ECT" is my threshold variable - Threshold value must
> come from it.
> # My final target is to *calculate the entire profile likelihood function
> of ols regression and save results in a separate file* (let's say "LF.gdt")
> # Below is my guess how the process must be solved. Could you adjust it to
> my data and help me to complete?
> ------------script----------------
> loop i=2006:10..2014:08 --progressive --quiet
>    genr
>    ols
>    genr LF = $lnl
>    store "C:\.....\.....\......\LF.gdt" LF
> endloop
> Thank you!
> Kind regards,
> Miranda

I'm sorry, you'll have to be more explicit that this. Posting your 
complete script would be much better; from what you posted I don't 
understand what you're trying to do, let alone what the problem is.

   Riccardo (Jack) Lucchetti
   Dipartimento di Scienze Economiche e Sociali (DiSES)

   Università Politecnica delle Marche
   (formerly known as Università di Ancona)

   r.lucchetti at univpm.it

More information about the Gretl-users mailing list