similar to: generating markov chain

Displaying 20 results from an estimated 5000 matches similar to: "generating markov chain"

2006 Feb 06
6
problem with simple if() statement
the following code apprantely, for some grand old reason, induces a syntax error: if (seq[i] = "A") m <- trans[1,] where seq is a vector and trans is a matrix. I cannot for the life of me see why this is wrong. Syntax error is: Error: syntax error in "if (seq[i] =" Sincerely, Norman Goodacre ---------------------------------
2006 Jan 18
4
Coercing a list to integer?
Dear group, I am nearly beside myself. After an entire night spent on a niggling little detail, I am no closer to to the truth. I loaded an Excel file in .csv form into R. It apparentely loads as a list, but not the kind of list you can use. Oh no, it converts into a list that cannot be converted into an integer, numeric, or vector, only a matrix, whihc is useless without integers.
2006 Jan 12
4
Loading Excel file into Limma
Dear mailing group, This is my first time here. Glad to have this resource! I am currently trying to load an Excel file into R (limma package loaded) using the source(*name of directory*) command, but it cannot open the file. I renamed the file as .R and .RData, to no avail. The Excel data contains one gene name per row and about 100 data points per gene (columns). I am only used to
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
2006 Jul 21
1
Q. regarding optim()
Dear R mailing group, The second parameter for the function optim()is a function whose parameters are to be optimized. The description of this function given in the help file is the following: fn: A function to be minimized (or maximized), with first argument the vector of parameters over which minimization is to take place. It should return a scalar result.
2006 Jan 20
3
Troubles with the function rmultinom.c of the R's Random Number Generator
Hi, I'm simulating a Markov chain in Fortran interfaced with R-2.2.1 in order to generate data according to a Markov Random Field called the Potts model. R Version: platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 2.1 year 2005 month 12 day 20 svn rev 36812 Each loop of my Fortran calls the function rmultinom.c
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>
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
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
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
2009 Nov 15
1
how to permute, simulate Markov chain
Hi all, I am new to R. Can someone please give me some hints in how to do the following things: 1- Get ONE permutation of a set. I have looked at the gregmisc package's permutations() method, but I just want to get one permutation at a time. 2- Simulate a Markov chain in R. For instance, I want to simulate the simple random walk problem, in which a person can walk randomly around 4 places.
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,
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]]
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 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]
2006 Jul 15
1
R installation - WINDOWS - problem
Dear R mailing group, I am having extreme - and mysterious - trouble installing R. I tried simply dl ing R-2.3.1.tar.gz, and unzipping it, but after doing so, nowhere could I find a file called R-2.3.1.exe. I did however find an R-2.3.1.exe.manifest. I therefore tried the command line installation command - given in R-admin.pdf. This command is: tar zxvf R-2.3.1.tgz This is strange
2006 Jan 17
1
Clustering function
Dear mailing group, I have loaded an Excel file into R by calling it ".csv" and using the "read.csv" function in R. However then I want to use the (limma package specific, I believe) function "hclust", which clusters data in a tree dendrogram, by similarity. However, I receive the errors msg.s: 1) "missing observations in cov/cor" 2) "In
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
2012 Jul 27
1
fitting Markov Switching Model
Dear Users, i have this time series, the tree lines means different level, i would use a Markov switching model with two states to modelling this time series. i would obtain the relative transition matrix (2X2) the first state is above the value of 23.65 (the higher line) the second state is below the value of 23.65 You can ignore the other two lines