Re: [Gretl-users] GARCH, Forecasting
by Allin Cottrell
On Mon, 17 Jan 2011, [ISO-8859-1] Alejandro Mosi�o wrote:
> Maybe i was not too much specific last time:
>
> I have a variable "y" that follows a GARCH(1,1) process. Then, i Gretl i
> type:
>
> garch 1 1 ; y const
>
> Then i got the result and forecasting the out-of-sample values of y can
> be done in the usual way. However, i'm interested in forecasting the
> out-of-sample variance. I don't know if such a function exists in Gretl.
There is no built-in function to do this, but you can compute a
one-step ahead forecast of the variance from the model data, as
hown in the following example script.
<script>
open b-g.gdt
garch 1 1 ; Y
series e = $uhat
series h = $h
dataset addobs 10
a0 = $coeff[2]
a1 = $coeff[3]
b1 = $coeff[4]
series hfc = h
# set future errors to their expectation
e = misszero(e)
# forecast the variance
hfc = a0 + a1 * e(-1)^2 + b1 * hfc(-1)
smpl 1970 ;
print e h hfc --byobs
</script>
Allin Cottrell
12 years
Bug-hunting: Syntax highlighting
by Henrique Andrade
Dear Allin,
Please take a look into the pdf files attached. As one can see, there's
something wrong with the "colorido.pdf" file (lines between 73 and 197
weren't printed out in Windows Vista).
Best regards, Henrique
*Henrique*
<http://www.ufrgs.br/ppge>
13 years
Ralph M Rodriguez/PO/KAIPERM is out of the office.
by Ralph.M.Rodriguez@kp.org
I will be out of the office starting 10/31/2011 and will not return until
11/09/2011.
Hi All, I will be out of the office on PTO from Oct 31 to Nov 8 returning
to the office Nov 9, 2011. I will not be cheking emails during my vacation.
But, if you have an immediate concern with Cost Model, email CM-Help(a)kp.org
or contact Bradley Njus at 510 625 4595.
Thanks much,
Ralph
13 years, 1 month
panel regression result interpretation
by Neha Kalra
Hello to all Gretl users, i need help regarding to panel regression that i m running on the data of 49 companies over 5 years.. disclosure score have been assigned to each company is my dependent variable and i m seeing relation of this with diffrent variable like assets, debt to eqity ratio, working capital etc....
I have run a random effect model without dummies... following is the result of regression..
: Random-effects (GLS), using 245 observations
Included 49 cross-sectional units
Time-series length = 5
Dependent variable: Disclosurescore
Coefficient
Std. Error
t-ratio
p-value
const
54.6399
2.44263
22.3693
<0.00001
***
Income
0.000300548
0.000284884
1.0550
0.29251
Assets
2.47402e-05
0.000143089
0.1729
0.86288
ROCE
0.339813
0.136887
2.4824
0.01374
**
RONW
-0.305412
0.101727
-3.0023
0.00297
***
Debttoequityrat
-2.91992e-05
0.000943001
-0.0310
0.97532
PBITNetofP_E_Av
-0.275439
0.0929244
-2.9641
0.00335
***
Profitaftertax
0.000338873
0.00199357
0.1700
0.86517
Mean dependent var
53.76539
S.D. dependent var
14.85426
Sum squared resid
48314.62
S.E. of regression
14.24790
Log-likelihood
-994.9583
Akaike criterion
2005.917
Schwarz criterion
2033.927
Hannan-Quinn
2017.196
'Within' variance = 60.0887
'Between' variance = 146.644
theta used for quasi-demeaning = 0.713727
Breusch-Pagan test -
Null hypothesis: Variance of the unit-specific error = 0
Asymptotic test statistic: Chi-square(1) = 193.78
with p-value = 4.75747e-044
Hausman test -
Null hypothesis: GLS estimates are consistent
Asymptotic test statistic: Chi-square(7) = 11.5898
with p-value = 0.114882
now i dont knw that whether i have to use interpret these beta coefficients as any other variable or else & whether to use dummy variable or not...
I m also attaching with ths mail my data file in gretl..
Plz anyone help ..
Thanks in advance
13 years, 1 month
freq command crashes
by artur bala
Dear Allin,
gretl crashes on executing the freq command in the following script:
nulldata 100
loop i = 1..10 --quiet
series x$i = normal()
endloop
loop foreach i x1..x10
freq $i --quiet
endloop
best,
artur
13 years, 1 month
Seg fault when you open a bundle created and modified by a function
by Giuseppe Vittucci
I am running gretl 1.9.5 on Ubuntu 11.10.
Here is a simple code to replicate the issue:
nulldata 500
function bundle pippo(scalar n)
bundle pluto
matrix x = I(n)
pluto["mymat"] = x
return pluto
end function
bundle pluto = pippo(3)
bundle pluto = pippo(4)
Click on the bundle from the "session icon view".
Gretl quits with a segmentation fault error.
See you
Giuseppe
13 years, 1 month
Problem with .xlsx files
by Henrique Andrade
Dear Gretl Developers,
A colleague here at my work is trying to perform some regressions
using .xlsx files but he is getting the following error messages:
"Invalid argument for function" in the GUI
"gretl_unzip_file: 'zip error: File not found or no read permission'"
in the script output window
I tried a lot of things to help him, but unfortunately I've got no success.
The commands he is using are:
open "C:\Users\...\Desktop\Dessazonalização Crédito\Teste XLS.xls"
--rowoffset=148 --sheet="Gretl"
open "C:\Users\...\Desktop\Dessazonalização Crédito\Teste XLSX.xlsx"
--rowoffset=148 --sheet="Gretl"
Please find attached a zip file (with files in xls and xlsx format)
that can be used to reproduce the error.
Best,
Henrique Andrade
13 years, 1 month
Constrained maximization in gretl
by Giuseppe Vittucci
The following code (adapted from the manual):
mle logl = check ? - ln(pstr_cssr(y,X,q,gamma,c,m,Z) : NA
scalar check = (gamma > zeros(r,1)) && (c >= c_min) && (c <=c_max)
params gamma c
end mle
simply checks that the unconstrained maximum is in the parameter space
and returns an error if it is not so.
But is there a way to find such a constrained maximum in gretl?
If there is not, what is the best way to circumvent the problem?
Thanks
Giuseppe
13 years, 1 month
Linear Regression
by Simari
Sear,
I am a new user.
I am trying to make a linear regression between X (days, 13/06/2011,
14/06/2011, 15/06/2011 and so on) and Y (price data)
and look for the slope and R2.
Can you please help me?
Regards
Simari
13 years, 1 month