run_pattern | R Documentation |

This function fits a JAGS using the `jags`

funciton and obtain posterior inferences.

```
run_pattern(type, dist_e, dist_c, inits, d_list, d1, d2, restriction, ppc)
```

`type` |
Type of missingness mechanism assumed. Choices are Missing At Random (MAR), Missing Not At Random for the effects (MNAR_eff), Missing Not At Random for the costs (MNAR_cost), and Missing Not At Random for both (MNAR). |

`dist_e` |
distribution assumed for the effects. Current available chocies are: Normal ('norm'), Beta ('beta'), Gamma ('gamma'), Exponential ('exp'), Weibull ('weibull'), Logistic ('logis'), Poisson ('pois'), Negative Binomial ('nbinom') or Bernoulli ('bern'). |

`dist_c` |
Distribution assumed for the costs. Current available chocies are: Normal ('norm'), Gamma ('gamma') or LogNormal ('lnorm'). |

`inits` |
a list with elements equal to the number of chains selected; each element of the list is itself a list of starting values for the BUGS model, or a function creating (possibly random) initial values. If inits is NULL, JAGS will generate initial values for parameters. |

`d_list` |
a list of the number and types of patterns in the data. |

`d1` |
Patterns in the control. |

`d2` |
Patterns in the intervention. |

`restriction` |
type of identifying restriction to be imposed. |

`ppc` |
Logical. If |

```
#Internal function only
#No examples
#
#
```

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.