emparam: EM Algorithm Estimator for Parametric Model

Description Usage Arguments Value References Examples

Description

Estimate the standard deviation of measurement error in the running variable of sharp RDD. This estimator is constructed under the assumption that true running variable and measurement error follow known parametric distribution.

Usage

1
2
3
4
emparam(d_vec, w_vec, cutoff, init_sigma = NULL, x_dist = c("gauss"),
  u_dist = c("gauss", "lap"), reltol = 1e-05, maxit = 200L,
  integ_method = c("romberg", "simpson", "trapezoid", "simpson2"),
  integ_reltol = reltol * 0.25, integ_depth = 100L, verbose = FALSE, ...)

Arguments

d_vec

binary integer vector of assignment

w_vec

numeric vector of observed running variable

cutoff

threshold value for assignment

init_sigma

initial values of sigma. If NULL, randomly assigned

x_dist, u_dist

distribution of x and u

reltol

relative tolerance requied

maxit

maximum number of iteration

integ_method

numerical integration method

integ_reltol

relative tolerance for numerical integration

integ_depth

maximum recursion depth for numerical integration

verbose

if true, progress is reported

...

currently not used

Value

object of rddsigma class

References

Kevin M. Murphy and Robert H. Topel (1985), Estimation and Inference in Two-Step Econometric Models. Journal of Business & Economic Statistics, 3(4), pp.370-379

Examples

1
2
3
4
5
6
7
## Not run: 
set.seed(456)
dat <- gen_data(500, 0.2, 0)
emparam(dat$d, dat$w, 0, x_dist = "gauss", u_dist = "gauss", verbose = TRUE)
emparam(dat$d, dat$w, 0, x_dist = "gauss", u_dist = "lap", verbose = TRUE)

## End(Not run)

kota7/rddsigma documentation built on May 20, 2019, 1:11 p.m.