Skip to content

Commit

Permalink
fixed hidden dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
spedygiorgio committed May 12, 2023
1 parent 7894bc3 commit 5cfe9ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vignettes/gsoc_2017_additions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ The probabilities we get are with an error of $10^{-3}$

# Continuous time markovchain generator using frequency Matrix

The package provides `freq2Generator` function. It takes in a matrix representing relative frequency values along with time taken to provide a continuous time markovchain generator matrix. Here, frequency matrix is a 2-D matrix of dimensions equal to relative number of possible states describing the number of transitions from a state $i$ to $j$ in time $t$, which is another parameter to be provided to the function. The function also allows to chose among three methods for calculation of the generator matrix.[@freqArticle]
The package provides `freq2Generator` function. It takes in a matrix representing relative frequency values along with time taken to provide a continuous time markovchain generator matrix. Here, frequency matrix is a 2-D matrix of dimensions equal to relative number of possible states describing the number of transitions from a state $i$ to $j$ in time $t$, which is another parameter to be provided to the function. The function also allows to chose among three methods for calculation of the generator matrix [@freqArticle]. It requires the [@pkg:ctmcd] package.

Three methods are as follows:

Expand All @@ -268,9 +268,11 @@ See reference for details about the methods.

Here is an example matrix on which `freq2Generator` function is run:
``` {r}
if(requireNamespace(package='ctmcd', quietly = TRUE)) {
sample <- matrix(c(150,2,1,1,1,200,2,1,2,1,175,1,1,1,1,150),nrow = 4,byrow = TRUE)
sample_rel = rbind((sample/rowSums(sample))[1:dim(sample)[1]-1,],c(rep(0,dim(sample)[1]-1),1))
freq2Generator(sample_rel,1)
}
```


Expand Down

0 comments on commit 5cfe9ac

Please sign in to comment.