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




Reply via email to