Markov chain transition model, data replication project

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Markov chain transition model, data replication project

Eric R. Schmidt
Hello all,

I am currently attempting to replicate data from a political science article
that utilized a Markov chain transition model to predict voter turnout
intention at time *t*; the data was separated into two different models
based on whether prior intent was to vote or not to vote.  The details don't
really matter.

Mostly I am curious how to run a Markov chain transition model in R,
estimating different coefficients for two prior conditions.  I have tried
installing and running numerous packages, including elrm and MCMC, but I
don't think this calls for Monte Carlo simulation.  (The transition matrix
in this case, after all, would be only 2 x 2, and the models are pretty
simple).  If someone could point me in the right direction I would greatly
appreciate it....

ES

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Markov chain transition model, data replication project

Giovanni Petris
On Thu, 2011-02-24 at 21:14 -0500, Eric R. Schmidt wrote:

> Hello all,
>
> I am currently attempting to replicate data from a political science article
> that utilized a Markov chain transition model to predict voter turnout
> intention at time *t*; the data was separated into two different models
> based on whether prior intent was to vote or not to vote.  The details don't
> really matter.
>
> Mostly I am curious how to run a Markov chain transition model in R,
> estimating different coefficients for two prior conditions.  I have tried
> installing and running numerous packages, including elrm and MCMC, but I
> don't think this calls for Monte Carlo simulation.  (The transition matrix
> in this case, after all, would be only 2 x 2, and the models are pretty
> simple).  If someone could point me in the right direction I would greatly
> appreciate it....
>

There may be a package that does the calculations for you, but it is a
simple matter of normalizing each row of the matrix of observed
transition counts to a probability.

Something like

> prop.table(X, margin = 1)

should do, where X is the 2x2 matrix of transition counts.

Hope this helps,
Giovanni

> ES
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

--

Giovanni Petris  <[hidden email]>
Associate Professor
Department of Mathematical Sciences
University of Arkansas - Fayetteville, AR 72701
Ph: (479) 575-6324, 575-8630 (fax)
http://definetti.uark.edu/~gpetris/

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.