Page 1 of 1

how to do a minimum calculation

Posted: Wed May 01, 2013 2:46 pm
by asummer
Hi,

I have a logl function for an asymmetric garch estimation. One of the variables is like this

y = ......+ x * min(p,0) + .......


How do i enter this min(p,0) in the logl function? Tried using x*(@min(p,0)) but that i guess is wrong

Re: how to do a minimum calculation

Posted: Wed May 01, 2013 2:59 pm
by EViews Gareth
What is p?

Re: how to do a minimum calculation

Posted: Wed May 01, 2013 3:03 pm
by asummer
p is the lag value of the residual from the mean equation calculated as

mgarch.append res1= (y1-cons(1) - mu(1)*y1(-1) - mu(2)*y2(-1) - mu(3)*y3(-1))

Which then feeds into a volatility equation as

var_y1=......+rho(1)*(min(res1,0)^2)

Re: how to do a minimum calculation

Posted: Wed May 01, 2013 3:27 pm
by EViews Gareth
I meant, what type of object is it? For that matter, what are X and Y?

Re: how to do a minimum calculation

Posted: Wed May 01, 2013 5:43 pm
by asummer
Sorry if I am unable to clearly say but Y and X are both time series. X is the residual error and Y is the calculated variance. this is a bivariate mgarch model and I started by using the TV_garch.prg and modified the logl function.

Re: how to do a minimum calculation

Posted: Wed May 01, 2013 6:01 pm
by EViews Gareth
I'm going to assume they're series objects.

You can use the @recode function.

Re: how to do a minimum calculation

Posted: Wed May 01, 2013 7:01 pm
by asummer
Thank you