0
$\begingroup$

I have a dataset with 499 observations for a single binary variable. The objective is to predict the next observation in the series.

Here is the dataset:

1 2 1 2 1 1 2 1 2 1 1 1 1 1 1 1 1 2 2 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 2 1 1 2 1 1 1 1 1 1 1 2 1 1 2 2 2 2 1 1 2 1 1 1 1 1 1 1 2 2 1 2 1 2 2 1 2 1 1 1 1 2 1 1 2 1 1 2 2 1 2 2 2 1 1 1 1 2 1 1 2 1 1 2 1 1 1 2 1 1 1 2 2 2 2 2 2 1 1 1 2 1 1 2 1 2 1 1 2 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 2 2 2 2 1 1 1 2 1 1 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 2 1 2 1 1 2 2 2 1 1 2 2 1 1 2 1 2 1 1 1 1 1 2 1 2 2 1 2 1 1 2 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 2 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 2 2 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 2 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 2 2 1 1 2 1 1 1 1 1 1 2 2 2 2 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 1 2 1 2 2 1 1 1 1 1 1 2 1 1 1 1 1 2 1 1 2 2 1 2 1 1 1 2 2 1 1 1 1 1 1 2 1 1 1 1 1 2 1 2 1 1 2 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 2 2 1 1 1 2 1 2 2 1 2 1 1 2 1 1 1 1 2 1 2 1 1 1 2 1 1 1 1 1 1 1 2 1 2 1 1 2 2 1 1 2 1 1 1 1 1 1 1 2 2 1 2 1 2 1 2 2 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1

I am trying to use a two-state Markov chain. For that, I have calculated the transition probabilities:

> T
      [,1]      [,2]
[1,] 0.7305556 0.2694444
[2,] 0.7028986 0.2971014

I get stuck in the next step that, how to predict the next observation? Any help will be appreciated.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.