# AT2: Average treatment effect from a two-part model In SemiParBIVProbit: Semiparametric Copula Regression Models

## Description

`AT2` can be used to calculate the sample average treatment effect from a two-part model, with corresponding interval obtained using posterior simulation.

## Usage

 ```1 2 3 4``` ```AT2(x1, x2, index1, index2, n.sim = 100, prob.lev = 0.05, hd.plot = FALSE, main = "Histogram and Kernel Density of Simulated Average Effects", xlab = "Simulated Average Effects", ...) ```

## Arguments

 `x1` A fitted `SemiParBIVProbit` object as produced by `SemiParBIVProbit()`. `x2` A fitted `SemiParBIVProbit` object as produced by `SemiParBIVProbit()`. `index1` This is useful to pick a particular individual. `index2` As above. `n.sim` Number of simulated coefficient vectors from the posterior distribution of the estimated model parameters. This is used when `delta = FALSE`. It may be increased if more precision is required. `prob.lev` Overall probability of the left and right tails of the AT distribution used for interval calculations. `hd.plot` If `TRUE` then a plot of the histogram and kernel density estimate of the simulated average effects is produced. This can only be produced when `delta = FALSE`. `main` Title for the plot. `xlab` Title for the x axis. `...` Other graphics parameters to pass on to plotting commands. These are used only when `hd.plot = TRUE`.

## Details

AT measures the sample average effect from a two-part model when a binary response (associated with a continuous outcome) takes values 0 and 1. Posterior simulation is used to obtain a confidence/credible interval.

## WARNINGS

This function is not suitable for `SemiParBIVProbit()`.

## Author(s)

Maintainer: Giampiero Marra [email protected]

`SemiParBIVProbit-package`, `SemiParBIVProbit`, `summary.SemiParBIVProbit`
 `1` ```## see examples for SemiParBIVProbit ```