Skip to content

Commit

Permalink
Merge pull request #134 from dd-harp/dev
Browse files Browse the repository at this point in the history
parse_deout_X returns pr
  • Loading branch information
smitdave authored Oct 13, 2023
2 parents ac95168 + 174084c commit b610b68
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions R/human-SIP.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
1 change: 1 addition & 0 deletions R/human-SIS.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 2 additions & 0 deletions R/human-hMoI.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
6 changes: 3 additions & 3 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit b610b68

Please sign in to comment.