Ignacio,
thanks,  I did it.

Importing data (set on 1,2,3 instead of 13/06/2011, 14/06/2011 etc. on file Excel)
importing them as cross section instead of series and then  not adding the time trend
I have the same result.

Do you think was I right?


Simari



 


On Wed, Oct 26, 2011 at 11:45 AM, Ignacio Diaz-Emparanza <ignacio.diaz-emparanza@ehu.es> wrote:
El 25/10/11 17:59, Allin Cottrell escribió:
> On Mon, 24 Oct 2011, Simari wrote:
>
>> 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.
>
> Unless you have special requirements not mentioned here, the
> place to start is with the "ols" command (/Help/Command
> reference) or the Ordinary Least Squares item under the /Model
> menu.

Simari:

I do not understand your data. In an econometric sense, 13/06/2011,
14/06/2011, 15/06/2011 .... are not numerical real values, they are
secuences of characters. I guess that probably you may want to use
a daily temporal index (or time trend) as regressor:

date            time
13/06/2011      1
14/06/2011      2
15/06/2011      3
... and so on

In this case you firstly have to setup your dataset correctly: importing
Y(price data) and setting up the dates with the gretl importer or by
means of the menu /Data/dataset structure

And secondly, you need to generate the trend using /Add/Time trend
then you can estimate an OLS regression of Y on time


--
Ignacio Diaz-Emparanza
DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA)
UPV/EHU Avda. Lehendakari Aguirre, 83 | 48015 BILBAO
T.: +34 946013732 | F.: +34 946013754
www.ea3.ehu.es




_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users