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){
3434 return (p )
3535}
3636
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+
3754# ----------------------------------------------------------------------------#
3855# ### Function to check if transition probability array/matrix is valid ####
3956# ----------------------------------------------------------------------------#
You can’t perform that action at this time.
0 commit comments