node_monitor {bnmonitor} | R Documentation |

## Node monitor

### Description

Contribution of each vertex of a Bayesian network to the global monitor

### Usage

```
node_monitor(dag, df, alpha = "default")
```

### Arguments

`dag` |
an object of class |

`df` |
a base R style dataframe |

`alpha` |
single integer. By default, number of max levels in |

### Details

Consider a Bayesian network over variables `Y_1,\dots,Y_m`

and suppose a dataset `(\boldsymbol{y}_1,\dots,\boldsymbol{y}_n)`

has been observed, where `\boldsymbol{y}_i=(y_{i1},\dots,y_{im})`

and `y_{ij}`

is the i-th observation of the j-th variable. The global monitor is defined as the negative log-likelihood of the model, i.e.

`-\log(p(\boldsymbol{y}_1,\dots,\boldsymbol{y}_n))= - \sum_{j=1}^m\sum_{i=1}^n \log(p(y_{ij} | \pi_{ij})),`

where `\pi_{ij}`

is the value of the parents of `Y_j`

for the i-th observation. The contribution of the j-th vertex to the global monitor is thus

`-\sum_{i=1}^n\log(p(y_{ij}|\pi_{ij})).`

### Value

A dataframe including the name of the vertices and the contribution of the vertices to the global monitor. It also returns a plot where vertices with higher contributions in absolute value are darker.

### References

Cowell, R. G., Dawid, P., Lauritzen, S. L., & Spiegelhalter, D. J. (2006). Probabilistic networks and expert systems: Exact computational methods for Bayesian networks. Springer Science & Business Media.

Cowell, R. G., Verrall, R. J., & Yoon, Y. K. (2007). Modeling operational risk with Bayesian networks. Journal of Risk and Insurance, 74(4), 795-827.

### See Also

`global_monitor`

, `influential_obs`

, `final_node_monitor`

, `seq_node_monitor`

, `seq_pa_ch_monitor`

### Examples

```
node_monitor(chds_bn, chds, 3)
```

*bnmonitor*version 0.1.4 Index]