# 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")
# For the DAG in the example above, complete records analysis is valid
## if a different set of covariates is used
checkCRA(y="bmi7", covs="matage mated", r_cra="r",
mdag="matage -> bmi7 mated -> matage mated -> bmi7
sep_unmeas -> mated sep_unmeas -> 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 never 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")
Run the code above in your browser using DataLab