On 16/12/13 16:56, eva maria gualandi wrote:

) i run this simple programm

import numpy as np
import statsmodels
from statsmodels.tsa import stattools

x = np.array([1,2,3,4,3,4,2,3])
result = statsmodels.tsa.statools.adfuller(x,1)

Since you explicitly imported stattools
you only need to call

statools.adfuller(x,1)


Traceback (most recent call last):
   File "C:\Python27\esempio_adftest.py", line 3, in <module>
     from statsmodels.tsa import stattools

No idea what's going on with the traceback though...

the thing that i really don't understand is that in the shell window if
i type import statsmodels.tsa i don't get any error, also if i type the
help funcion i can see that in the package there is the function
stattools that i need

 >>> import statsmodels.tsa
 >>> help(statsmodels.tsa)

Note that here you import statsmodels.tsa
Above you only import statsmodels

I don't know if it's significant here but get the
experiments consistent and then we can maybe see where
we are.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to