Description Usage Arguments Value Examples

Perform model averaging on a list of DAGs.

1 2 3 4 5 6 |

`fitted_DAGs` |
A list of |

`weights` |
A vector of associated model weights. |

`avg_method` |
Either |

`...` |
Additional arguments passed to For details on the error calculations, see |

An object of class `fitted_DAG`

, including standard errors and
confidence intervals.

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
# Normally, I would advocate the use of the phylo_path and average
# functions, but this code shows how to average any set of models. Note
# that not many checks are implemented, so you may want to be careful and
# make sure the DAGs make sense and contain the same variables!
candidates <- define_model_set(
A = NL ~ BM,
B = NL ~ LS,
.common = c(LS ~ BM, DD ~ NL)
)
fit_cand <- lapply(candidates, est_DAG, rhino, rhino_tree,
model = 'lambda', method = 'logistic_MPLE')
ave_cand <- average_DAGs(fit_cand)
coef_plot(ave_cand)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.