CausalQueries icon indicating copy to clipboard operation
CausalQueries copied to clipboard

is.informative(model, query, given)

Open macartan opened this issue 5 years ago • 7 comments

says which nodes are informative for a query given other nodes

for example:

A -> B -> C

A is not informative for B causes C given B

macartan avatar Jun 09 '19 08:06 macartan

This is not yet implemented right?

till-tietz avatar Sep 01 '23 18:09 till-tietz

No. This can be done using the dagitty package.

The question is:

  • Which no nodal types are involved in a query
  • Which nodes are d connected to these nodal types given specified data

On Fri, 1 Sept 2023, 11:56 Till Tietz, @.***> wrote:

This is not yet implemented right?

— Reply to this email directly, view it on GitHub https://github.com/integrated-inferences/CausalQueries/issues/42#issuecomment-1703196787, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBE57LQENFUR5YRBSPLH5LXYIVWDANCNFSM4HWI67MQ . You are receiving this because you were assigned.Message ID: @.***>

macartan avatar Sep 01 '23 21:09 macartan

This seems like a somewhat trickier problem. It's basically the same question we were working on with regards to graph splitting right? That is we need to figure out how missingness and confounding affect d-separation here.

till-tietz avatar Sep 02 '23 00:09 till-tietz

For a population yes but was thinking of this just for a case

On Fri, 1 Sept 2023, 17:38 Till Tietz, @.***> wrote:

This seems like a somewhat trickier problem. It's basically the same question we were working on with regards to graph splitting right? That is we need to figure out how missingness and confounding affect d-separation here.

— Reply to this email directly, view it on GitHub https://github.com/integrated-inferences/CausalQueries/issues/42#issuecomment-1703586533, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBE57N2IZJM6TS4DHR5VNDXYJ52FANCNFSM4HWI67MQ . You are receiving this because you were assigned.Message ID: @.***>

macartan avatar Sep 02 '23 00:09 macartan

I see. How would you go about figuring this out for a case? I feel like I need to read about case vs population level queries in the book again.

till-tietz avatar Sep 02 '23 00:09 till-tietz

something like this: in this version you specify which thetas you need to learn about; that's easier than having to figure them out

is_informative <- function(model, given_nodes, query_nodes) {

  statement <-
    model$statement |>
    paste(";", paste0(query_nodes, " <- t_", query_nodes, collapse = "; " ))

    dag <- dagitty(paste("dag{", statement, "}"))

  sapply(model$nodes, function(X) {
  dconnected(dag, X, query_nodes, given_nodes)})

}


model <- make_model("X -> M -> Y")

# Y is not informative about theta^X given M
is_informative(model, given_nodes = list("M"), query_nodes = "X")

# X is informative about theta^M given M
is_informative(model, given_nodes = list("M"), query_nodes = "M")

# X is not informative about theta^Y given M
is_informative(model, given_nodes = list("M"), query_nodes = "Y")


# is this right
is_informative(model, query_nodes = c("M", "Y"), given_nodes = c("X", "Y"))

On Sat, Sep 2, 2023 at 2:50 AM Till Tietz @.***> wrote:

I see. How would you go about figuring this out for a case?

— Reply to this email directly, view it on GitHub https://github.com/integrated-inferences/CausalQueries/issues/42#issuecomment-1703603142, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBE57PERSTCGE72XEN4EC3XYJ7DVANCNFSM4HWI67MQ . You are receiving this because you were assigned.Message ID: @.***>

macartan avatar Sep 02 '23 04:09 macartan

Ahhh ok; this makes sense

till-tietz avatar Sep 05 '23 08:09 till-tietz