File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,23 @@ rate_to_prob <- function(r, t = 1){
34
34
return (p )
35
35
}
36
36
37
+ # ---------------------------------------------------------------------------------------------#
38
+ # ### Function to convert convert probabilities to probabilities with a different frequency ####
39
+ # ---------------------------------------------------------------------------------------------#
40
+ # ' Convert a probability to a probability with a different frequency
41
+ # '
42
+ # ' \code{rate_to_prob} convert a probability to a probability with a different frequency.
43
+ # '
44
+ # ' @param p probability
45
+ # ' @param t time/ frequency
46
+ # ' @return a number - converted probability
47
+ # '
48
+ # Function to convert probabilities to probabilities with a different frequency
49
+ ProbProb <- function (p , t = 1 ){
50
+ p_new <- RateProb(ProbRate(p , t ))
51
+ return (p_new )
52
+ }
53
+
37
54
# ----------------------------------------------------------------------------#
38
55
# ### Function to check if transition probability array/matrix is valid ####
39
56
# ----------------------------------------------------------------------------#
You can’t perform that action at this time.
0 commit comments