search for: mu1b

Displaying 1 result from an estimated 1 matches for "mu1b".

Did you mean: mu1
2012 Feb 15
2
integrate (error: evaluation of function gave a result of wrong length)
Dear all, I am trying to use the integrate function in R but it seems that it does not work in my example and I cannot figure out why. I create a function Mu1 (which works fine) and try to integrate by the code: n <- 100 Ctrl <- as.matrix(cbind(runif(n, -30, 30))) W <- Ctrl + as.matrix(rnorm(n)) Rsp <- (W>as.matrix(sample(10, n, T)))*1 Mu1 <- function(x, Y=Rsp, Xc=Ctrl){ x