similar to: how to permute, simulate Markov chain

Displaying 20 results from an estimated 2000 matches similar to: "how to permute, simulate Markov chain"

2008 Dec 16
1
simulate binary markov chain
Hi all, I was hoping somebody may know of a function for simulating a large binary sequence (length >10 million) using a (1st order) markov model with known (2x2) transition matrix. It needs to be reasonably fast. I have tried the following; mc<-function(sq,P){ s<-c() x<-row.names(P) n<-length(sq) p1<-sum(sq)/n s[1] <- rbinom(1,1,p1); for ( i in 2:n){ s[i]
2003 Jun 25
2
Markov chain simulation
Hi, Does anybody know a function to simulate a Markov chain given a probability transition matrix and an initial state ? Thanks. Philippe -- -------------------------------------------------- Philippe Hup? Institut Curie - Equipe Bioinformatique 26, rue d'Ulm - 75005 PARIS France +33 (0)1 42 34 65 29 Philippe.Hupe at curie.fr <mailto:Philippe.Hupe at curie.fr>
2009 Mar 03
1
spatial markov chain methods
Hello, can any one point me to R-packages (if available) which include spatial Markov Chain methods? My second question is more general but hopefully not OT: Currently we are using the software TPROGS, which let people simulate property distributions in space by some Markov Chain approaches. We face some problems due to the lack of information between distances of samples along borehole path
2011 Feb 25
1
Markov chain transition model, data replication project
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,
2006 Feb 06
1
generating markov chain
Dear help group, Just fyi a markov chain is a sequence of transitions between states (say A,T,G,C - on a gene) with a given probability for each transition. In this case there'd be 16 different kinds, each with a different weight. Given a transition matrix (4x4) filled with all transition probabilities of course, how can I generate a random sequence of a given length, say 200?
2011 Mar 15
2
(R) transitions in a Markov Chain
Dear experts, I have to generate 1000 transitions of a discrete time Markov Chain and then give and estimation of the equilibrium distribution. I know the transition matrix. 0.3 0.7 0 0.2 0.5 0.3 0 0.4 0.6 Do you know how to do it with R? Thanks a lot! Estefania [[alternative HTML version deleted]]
2012 Mar 25
2
Updating a Markov Chain
Hello, my question is if anyone has any good ideas how to create a Markov Chain from ordered data. So, I have some sort of time series, and if value1 happens as time1 and value2 happens at time2 I record this as an update to the probability transition matrix. The problem is that I cannot predefine the size of the matrix (as I don't know how many states(values) I will have in the end) and
2010 Jul 14
1
Entropy of a Markov chain
Does anyone have any "R" code for computing the entropy of a simple first or second order Markov chain, given a transition matrix something like the following (or the symbol vector from which it is computed)? AGRe ARIe CSRe DIRe DSCe eos HRMe SPTe TOBe AGRe 0.0000000 0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000000 0.0000000
2008 May 09
0
Graphing Continuous Time Markov chain.
I have the following data of continuous time Markov chain. Time - [1] 0.00000000 0.01219893 0.35903929 0.69378720 0.77247183 1.56008543 [7] 1.80607724 2.59023990 2.87196272 3.05311707 3.14737319 3.20758500 [13] 3.26668915 3.42428440 3.53324567 3.83668537 3.96784473 4.17196149 [19] 4.29982361 4.46163281 4.78519834 5.20381355 5.65441135 5.78623851 [25] 6.07602075 6.10351864 6.37001057 6.62859413
2007 Jun 06
1
Metropolis-Hastings Markov Chain Monte Carlo in Spatstat
I'm testing some different formulations of pairwise interaction point processes in Spatstat (version 1.11-6) using R 2.5.0 on a Windows platform and I wish to simulate them using the Metropolis-Hastings algorithm implemented with Spatstat. Spatstat utilizes Fortran77 code with the preprocessor RatFor to do the Metropolis-Hastings MCMC, but the Makefile is more complicated than any I have
2004 Apr 29
3
Probability(Markov chain transition matrix)
Hello, My name is Maria, MBA student in Sanfransisco, USA. In my credit scoring class, I have hard time making "transition matrix", which explains probability especially in relation to "Markov chain model". It is regarding people's monthly credit payment behavior. Does R have function to caculate it? I am actually a novice in using 'R'. Please help me!!! Maria
2001 Nov 07
3
Examples for Markov Chain in Economics
Could anyone tell me where can I find some examples of the applications to economics of a Markov chain? Many thanks in advance. Luis Rivera. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not
2009 Sep 21
2
Four concurrent Markov chains
Hi, I am trying to write a simulation of the movements of four animals between six patches. The movement between patches is based on a first-order Markov chain so that the next patch they visit depends on the patch they were in before. I have written code that allows me to simulate the movement of one animal but when I add more there seems to be a problem and all chains come back as N/A. I can
2003 Oct 01
3
fitting Markov chains
I need to find a computationally simple process for the movement of interest rates. In this simplified model, an interest rate can have 3--5 possible values, and its movement is characterized by a matrix of transition probabilities (ie, it is a Markov process). I would like to estimate this process from a given set of data. For example, let the interest rate time series be: 7 3 8 2 5 9 6
2011 Mar 08
3
allocating factor levels
Dear R users, I am working on allocating the rows within a dataframe into some factor levels.Consider the following dataframe: Start.action Start.time 1 Start.setting 2010-12-30 17:58:00 2 Start.setting 2010-12-30 18:40:00 3 Start.setting 2010-12-31 22:39:00 4 Start.setting 2010-12-31 23:24:00 5
2009 Dec 11
4
extracting vectors from lists of lists
Good evening I often have as output from simulations a list of various values, vectors and matrices. Supposing that I then run said simulation several times, I often want to extract a particular result from each simulation for plotting and, ideally, put it in a matrix. A simple example v1 <- 1:5 v2 <- 6:10 other1 <- "stuff" other2 <- "stuff" set1 <-
2013 Feb 01
2
Change default order of colors & line types
Dear R users, I'd like to change the default order of colors & line types. Especially I am using ggplot2 and using color Set1. In Set1, the default color order is red, blue, green, violet,.. ect. However, I want to put red in fourth (not first). Likewise, I want to change the order of default linetype. I want to put "solid" line in fourth. How can I do thses? R code to draw the
2011 Jul 13
1
UNIX diff function
Colleagues, (R: 2.13.0; OS X) I often receive sequential datasets in which there are new rows interposed between existing rows. For example: SET1 <- data.frame(list(LETTERS=LETTERS[c(1:4, 6:10)], NUMBERS=c(1:4, 6:10))) SET2 <- data.frame(list(LETTERS=LETTERS[1:10], NUMBERS=1:10)) > SET1 LETTERS NUMBERS 1 A 1 2 B 2 3 C 3 4 D 4 5
2017 Apr 03
5
[PATCH v2 0/3] nv50/ir: Preapre for running Opts inside a loop
Slowly we are getting to the point, that we miss enough optimization opportunities as the result of our own passes. For this we need to fix AlgebraicOpt to be able to handle mods on sources without creating new issues. The last patch enables looping opts. v2: update commit author Karol Herbst (3): nv50/ir: fix AlgebraicOpt for slcts with mods nv50/ir: handle logops with NOT in AlgebraicOpt
2009 Oct 14
1
pairs
Dear all, I have two sets of data (say set1 and set2) as follow: set1 x1 x2 x3 0.30 0.43 3.88 0.38 0.59 3.53 0.30 0.42 2.12 0.33 0.53 2.12 0.30 0.47 3.76 set2 y1 y2 y3 0.32 0.47 5.18 0.23 0.26 1.06 0.42 0.65 3.88 0.28 0.38 3.76 0.35 0.47 1.41 The "pairs" function (such as pairs(~x1+x2+x3 data=set1, main="Simple Scatterplot Matrix") ) is