The critical point to predict is to calculate series autocorrelation. This is how past values influence the determination of future values. Then you have to analyze whether this relationship is linear, in this case you have many options of time series modeling using regression models.
Various other information and links can be found in this issue similar
An Example with simulated data is shown below
%# Gerar uma variável aleatória autocorrelacionada em 3 períodos.
T = 1000;
%
RV = zeros(T, 1); RV(1)=10+randn(1); RV(2)=1.5+.8*RV(1)+randn(1);
RV(3)=1.5+.8*RV(1)-.3*RV(1)+randn(1);
for c = 4:T ; RV(c)=1.5+.8*RV(c-1)-.3*RV(c-2)+.25*RV(c-3)+randn(1); end
% Pode iniciar aqui fazendo RV = SuaVariavel
plot(RV)
%# Construindo as variaveis com 3 defasagens
yout = RV(4:end); %# dependente
X1 = RV(3:end-1); %# defasagens da dependente (1er regressor)
X2 = RV(2:end-2);
X3 = RV(1:end-3);
%# matriz de regressores incluindo constante
X_train = [ones(length(X1), 1), X1, X2, X3];
%# MQO
mdl = regress(yout, X_train);
mdl
# Prever
X_test = [1, RV(T-1), RV(T-2), RV(T-3)];
%pred = predict(mdl,X_test);
sum(mdl'.*X_test) ; % Y em T+1
I have knowledge at the level of machine Learning but for classification problems. @Jjoao, do you know any documents that explain well the time series? I’ve been reading things related to this subject but it’s a little hard to understand :(
– Ins
I’m not the one... I would suggest that you look at Khan.Academy for a little bit of statistics and "time series", for example http://ocw.metu.edu.tr/course/view.php?id=145. Maybe an old-fashioned book!
– JJoao
One of the best "old-fashioned" books: http://www.amazon.com/Pattern-Classification-2nd-Computer-Manual/dp/0471703508/ref=sr_1_1? s=books&ie=UTF8&qid=1439468395&sr=1-1&Keywords=Pattern+Classification+Duda :)
– Luiz Vieira
Other option more focused: http://www.amazon.com/Time-Analysis-James-Douglas-Hamilton/dp/0691042896/ref=sr_1_2? s=books&ie=UTF8&qid=1439468528&sr=1-2&Keywords=time+series
– Luiz Vieira