diff --git a/R/human-SIP.R b/R/human-SIP.R index b93ee6d9..f3200a96 100644 --- a/R/human-SIP.R +++ b/R/human-SIP.R @@ -138,6 +138,7 @@ make_Xinits_SIP = function(pars, Xopts = list(), parse_deout_X.SIP <- function(varslist, deout, pars) { varslist$X = deout[,pars$Xpar$X_ix+1] varslist$P = deout[,pars$Xpar$P_ix+1] + varslist$pr = varslist$X/varslist$H return(varslist) } diff --git a/R/human-SIS.R b/R/human-SIS.R index 05c213b3..ab26e29a 100644 --- a/R/human-SIS.R +++ b/R/human-SIS.R @@ -109,6 +109,7 @@ make_Xinits_SIS = function(pars, Xopts = list(), X0=1){with(Xopts,{ #' @export parse_deout_X.SIS <- function(varslist, deout, pars) { varslist$X = deout[,pars$Xpar$X_ix+1] + varslist$pr = varslist$X/varslist$H return(varslist) } diff --git a/R/human-hMoI.R b/R/human-hMoI.R index bb63e918..56846442 100644 --- a/R/human-hMoI.R +++ b/R/human-hMoI.R @@ -171,6 +171,8 @@ make_inits_X_hMoI <- function(pars, m10, m20) { parse_deout_X.hMoI <- function(varslist, deout, pars) { varslist$m1 = deout[,pars$Xpar$m1_ix+1] varslist$m2 = deout[,pars$Xpar$m2_ix+1] + varslist$pr = 1-exp(-varslist$m1) + varslist$pr_apparent = 1-exp(-varslist$m2) return(varslist) } diff --git a/R/utils.R b/R/utils.R index b5161a76..5c43f2eb 100644 --- a/R/utils.R +++ b/R/utils.R @@ -82,12 +82,12 @@ parse_deout <- function(deout, pars){ if ('MYZpar' %in% names(pars)) { varslist = parse_deout_MYZ(varslist, deout, pars) } - if ('Xpar' %in% names(pars)) { - varslist = parse_deout_X(varslist, deout, pars) - } if ('Hpar' %in% names(pars)) { varslist = parse_deout_H(varslist, deout, pars) } + if ('Xpar' %in% names(pars)) { + varslist = parse_deout_X(varslist, deout, pars) + } return(varslist) }