Running examples in ‘optrdd-Ex.R’ failed
The error most likely occurred in:

> ### Name: optrdd
> ### Title: Optimized regression discontinuity design
> ### Aliases: optrdd
> 
> ### ** Examples
> 
> # Simple regression discontinuity with discrete X
> n = 4000; threshold = 0
> X = sample(seq(-4, 4, by = 8/41.5), n, replace = TRUE)
> W = as.numeric(X >= threshold)
> Y = 0.4 * W + 1 / (1 + exp(2 * X)) + 0.2 * rnorm(n)
> # using 0.4 for max.second.derivative would have been enough
> out.1 = optrdd(X=X, Y=Y, W=W, max.second.derivative = 0.5, estimation.point = threshold)
[1] "Running quadrprog with problem of size: 4042 x 87..."
> print(out.1); plot(out.1, xlim = c(-1.5, 1.5))
[1] "95% CI for tau: 0.4 +/- 0.11"
> 
> # Now, treatment is instead allocated in a neighborhood of 0
> thresh.low = -1; thresh.high = 1
> W = as.numeric(thresh.low <= X & X <= thresh.high)
> Y = 0.2 * (1 + X) * W + 1 / (1 + exp(2 * X)) + rnorm(n)
> # This estimates CATE at specifically chosen points
> out.2 = optrdd(X=X, Y=Y, W=W, max.second.derivative = 0.5, estimation.point = thresh.low)
Acquiring MOSEK environment
MOSEK Warning 710    : 2 near zero elements are specified in sparse col '' (98) of matrix 'A'.
MOSEK Warning 710    : 2 near zero elements are specified in sparse col '' (198) of matrix 'A'.
Computer   - Platform               : Linux/64-X86    
Computer   - CPU type               : Intel-P4        
MOSEK      - task name              :                 
MOSEK      - objective sense        : min             
MOSEK      - problem type           : CONIC (conic optimization problem)
MOSEK      - constraints            : 8042              variables              : 249             
MOSEK      - integer variables      : 0               
Optimizer started.
MOSEK Error 1010     : The problem has 249 constraint(s) but the license allows only 150 constraint(s) for feature 'PTS'.
MOSEK Error 1011     : The problem has 8042 variable(s) but the license allows only 300 variable(s) for feature 'PTS'.
Optimizer terminated. Time: 0.01    
Optimization interrupted.
ERROR: MSK_RES_ERR_SIZE_LICENSE_CON: The problem has too many constraints.
Error in -mosek.out$sol$itr$xx[1:num.realized.0] : 
  invalid argument to unary operator
Calls: optrdd
Execution halted
Releasing MOSEK environment