Open atcrank opened 2 months ago
Sorry not to have seen this sooner;
We stopped exporting this when we introduced the grab funciton though it is still available like this: CausalQueries:::get_type_prob see below
@till-tietz I think we should export this again to avoid this problem with the book version
> model <- make_model("X -> M -> Y") |>
+ set_restrictions("X[]==0") |>
+ set_restrictions("M[X=1] < M[X=0]") |>
+ set_restrictions("Y[M=1] < Y[M=0]")
>
> q1 <- "Y[X = 1] > Y[X = 0]"
> q2 <- "X == 1 & Y == 1"
>
> df <- data.frame(
+ a1 = get_query_types(model, q1)$types,
+ a2 = get_query_types(model, q2)$types,
+ p = CausalQueries:::get_type_prob(model))
>
> df
a1 a2 p
X1.M00.Y00 FALSE FALSE 0.1111111
X1.M01.Y00 FALSE FALSE 0.1111111
X1.M11.Y00 FALSE FALSE 0.1111111
X1.M00.Y01 FALSE FALSE 0.1111111
X1.M01.Y01 TRUE TRUE 0.1111111
X1.M11.Y01 FALSE TRUE 0.1111111
X1.M00.Y11 FALSE TRUE 0.1111111
X1.M01.Y11 FALSE TRUE 0.1111111
X1.M11.Y11 FALSE TRUE 0.1111111
@atcrank @macartan thanks for flagging this and apologies on the delayed response here. Will push a patch release fixing this issue asap
Using Windows distribution, R 4.4. I have installed and loaded CausalQueries_1.1.1 into my workspace, but ls("package:CausalQueries") doesn't include function "get_type_prob", and so I'm unable to the introductory activity here: