Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
elliecurnow committed Aug 5, 2024
1 parent c79f63e commit bd40789
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions R/checkcra.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
#' @export
#'
#' @examples
#' # Example DAG for which complete records analysis is not valid
#' # Example DAG for which complete records analysis is not valid, but could be
#' ## valid for a different set of covariates
#' checkCRA(y="bmi7", covs="matage", r_cra="r",
#' mdag="matage -> bmi7 mated -> matage mated -> bmi7 sep_unmeas ->
#' mated sep_unmeas -> r")
Expand All @@ -37,17 +38,17 @@
#' mdag="matage -> bmi7 mated -> matage mated -> bmi7 sep_unmeas ->
#' mated sep_unmeas -> r")
#'
#' # Example DAG for which complete records analysis is not valid
#' checkCRA(y="bmi7", covs="matage mated", r_cra="r",
#' mdag="matage -> bmi7 mated -> matage mated -> bmi7 sep_unmeas ->
#' mated sep_unmeas -> r bmi7 -> r")
#'
#' # Example DAG for which complete records is not valid, but could be valid
#' ## for a different estimand
#' checkCRA(y="bmi7", covs="matage mated", r_cra="r",
#' mdag="matage -> bmi7 mated -> matage mated -> bmi7 sep_unmeas ->
#' mated sep_unmeas -> r matage -> bmi3 mated -> bmi3 bmi3 -> bmi7
#' bmi3 -> r")
#'
#' # Example DAG for which complete records analysis is not valid
#' checkCRA(y="bmi7", covs="matage mated", r_cra="r",
#' mdag="matage -> bmi7 mated -> matage mated -> bmi7 sep_unmeas ->
#' mated sep_unmeas -> r bmi7 -> r")
checkCRA <- function(y, covs, r_cra, mdag) {
mdagspec <- paste('dag {',mdag,'}')
covsvec <- unlist(strsplit(covs," "))
Expand Down
4 changes: 2 additions & 2 deletions R/proposeMI.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#' # Display the proposed 'mice' options
#' ## When specifying a single imputation model
#' proposeMI(mimodobj=mimod_bmi7, data=bmi)
#' ## When specifying more than one imputation model
#' proposeMI(mimodobj=list(mimod_bmi7,mimod_pregsize), data=bmi)
#' ## When specifying more than one imputation model (suppressing the plot)
#' proposeMI(mimodobj=list(mimod_bmi7,mimod_pregsize), data=bmi, plot = FALSE)
proposeMI <- function(mimodobj, data, message = TRUE, plot = TRUE, plotprompt = TRUE) {

m_min <- ceiling((1-mean(ifelse(apply(data,1,anyNA)==F,1,0)))*100)
Expand Down

0 comments on commit bd40789

Please sign in to comment.