# NOT RUN {
make_model(statement = "X -> Y")
modelXKY <- make_model("X -> K -> Y; X -> Y")
# Example where cyclicaly dag attempted
# }
# NOT RUN {
modelXKX <- make_model("X -> K -> X")
# }
# NOT RUN {
# Examples with confounding
model <- make_model("X->Y; X <-> Y")
model$P
model <- make_model("Y2 <- X -> Y1; X <-> Y1; X <-> Y2")
model$P
model$confounds_df
dim(model$P)
model$P
model <- make_model("X1 -> Y <- X2; X1 <-> Y; X2 <-> Y")
dim(model$P)
model$parameters_df
# A single node graph is also possible
model <- make_model("X")
plot(model)
# Unconnected nodes cannot
# }
# NOT RUN {
model <- make_model("X <-> Y")
plot(model)
# }
Run the code above in your browser using DataLab