|
Say there is a stream of binary variables x(t) where t is a discrete index. Say the model is that p=p(x(t)=1) is logistic regression on past realization: log(p/1-p) = x(t-1)b1 + x(t-2)b2 + ... x(t-L)bL + b0. Now to fit the model, one can prepare the design matrix X which contains consecutive lags of order L so that X is (N-L)L in size: X = [x(1) ... x(L); x(2) ... x(L+1); ... x(N-L-1) ... x(N-1)] and the dependent variable Y is just [x(L+1), x(L+2), ... x(N)] in order to maximize likelihood, standard function such as glmfit in MATLAB assumes that the variables X and Y are independent, however the model is such that they are not. How can this be solved? Thanks. |