mrd_power | R Documentation |

`mrd_power`

computes the empirical probability that a resulting parameter
estimate of the MRD is significant,
i.e. the empirical power (1 - beta).

```
mrd_power(
num.rep = 100,
sample.size = 100,
x1.dist = "normal",
x1.para = c(0, 1),
x2.dist = "normal",
x2.para = c(0, 1),
x1.cut = 0,
x2.cut = 0,
x1.fuzzy = c(0, 0),
x2.fuzzy = c(0, 0),
x1.design = NULL,
x2.design = NULL,
coeff = c(0.1, 0.5, 0.5, 1, rep(0.1, 9)),
eta.sq = 0.5,
alpha.list = c(0.001, 0.01, 0.05)
)
```

`num.rep` |
A non-negative integer specifying the number of repetitions used to calculate the empirical power. The default is 100. |

`sample.size` |
A non-negative integer specifying the number of observations in each sample. The default is 100. |

`x1.dist` |
A string specifying the distribution of the first assignment variable, |

`x1.para` |
A numeric vector of length 2 specifying parameters of the distribution of the first assignment variable, |

`x2.dist` |
A string specifying the distribution of the second assignment variable, |

`x2.para` |
A numeric vector of length 2 specifying parameters of the distribution of the second assignment variable, |

`x1.cut` |
A numeric value containing the cutpoint at which assignment to the treatment is determined for the first assignment variable, |

`x2.cut` |
A numeric value containing the cutpoint at which assignment to the treatment is determined for the second assignment variable, |

`x1.fuzzy` |
A numeric vector of length 2 specifying the probabilities to be
assigned to the control condition, in terms of the first
assignment variable, |

`x2.fuzzy` |
A numeric vector of length 2 specifying the probabilities to be assigned to the control, in terms of the second
assignment variable, |

`x1.design` |
A string specifying the treatment option according to design for |

`x2.design` |
A string specifying the treatment option according to design for |

`coeff` |
A numeric vector specifying coefficients of variables in the linear model to generate data. Coefficients are in the following order: The 1st entry is the intercept. The 2nd entry is the slope of treatment 1, i.e. treatment effect 1. The 3rd entry is the slope of treatment 2, i.e. treatment effect 2. The 4th entry is the slope of treatment, i.e. treatment effect. The 5th entry is the slope of assignment 1. The 6th entry is the slope of assignment 2. The 7th entry is the slope of interaction between assignment 1 and assignment 2. The 8th entry is the slope of interaction between treatment 1 and assignment 1. The 9th entry is the slope of interaction between treatment 2 and assignment 1. The 10th entry is the slope of interaction between treatment 1 and assignment 2. The 11th entry is the slope of interaction between treatment 2 and assignment 2. The 12th entry is the slope of interaction between treatment 1, assignment 1 and assignment 2. The 13th entry is the slope of interaction between treatment 2, assignment 1 and assignment 2.
The default is |

`eta.sq` |
A numeric value specifying the expected partial eta-squared of the linear model with respect to the treatment itself. It is used to control the variance of noise in the linear model. The default is 0.50. |

`alpha.list` |
A numeric vector containing significance levels (between 0 and 1) used to calculate the empirical alpha.
The default is |

`mrd_power`

returns an object of class
"`mrdp`

" containing the number of successful iterations,
mean, variance, and power (with `alpha`

of 0.001, 0.01, and 0.05)
for six estimators. The function `summary`

is used to obtain and print a summary of the power analysis.
The six estimators are as follows:

The 1st estimator,

`Linear`

, provides results of the linear regression estimator of combined RD using the centering approach.The 2nd estimator,

`Opt`

, provides results of the local linear regression estimator of combined RD using the centering approach, with the optimal bandwidth in the Imbens and Kalyanaraman (2012) paper.The 3rd estimator,

`Linear`

, provides results of the linear regression estimator of separate RD in terms of`x1`

using the univariate approach.The 4th estimator,

`Opt`

, provides results of the local linear regression estimator of separate RD in terms of`x1`

using the univariate approach, with the optimal bandwidth in the Imbens and Kalyanaraman (2012) paper.The 5th estimator,

`Linear`

, provides results of the linear regression estimator of separate RD in terms of`x2`

using the univariate approach.The 6th estimator,

`Opt`

, provides results of the local linear regression estimator of separate RD in terms of`x2`

using the univariate approach, with the optimal bandwidth in the Imbens and Kalyanaraman (2012) paper.

Imbens, G., Kalyanaraman, K. (2012). Optimal bandwidth choice for the regression discontinuity estimator. The Review of Economic Studies, 79(3), 933-959. https://academic.oup.com/restud/article/79/3/933/1533189.

```
## Not run:
summary(mrd_power(x1.design = "l", x2.design = "l"))
summary(mrd_power(x1.dist = "uniform", x1.cut = 0.5,
x1.design = "l", x2.design = "l"))
summary(mrd_power(x1.fuzzy = c(0.1, 0.1), x1.design = "l", x2.design = "l"))
## End(Not run)
```

rddapp documentation built on April 6, 2023, 1:15 a.m.

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.