--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Any chance w is not of length 3?Also, here is a starter on debugging in R:
On Tue, Sep 26, 2017 at 6:39 PM, Asaf Weinstein <assafwe...@gmail.com> wrote:
Shalom,This might be a silly question, but here it goes.I have a function "ratio" which I'm calling inside another function as follows:ratio_normal <- function(w,delta,epsilon,sigma,rho=1){Fstar <- function(mu) w[1] * pnorm( mu,0,.1 ) + w[2] * pnorm( mu,0,1 ) + w[3] * pnorm( mu,0,3 )ratio(Fstar,delta,epsilon,sigma,rho=1)}The version above is working fine, but when I replace it with the more convenient formratio_normal <- function(w,delta,epsilon,sigma,rho=1){Fstar <- function(mu) sum( w * pnorm(mu,0,c(.1,1,3)) )ratio(Fstar,delta,epsilon,sigma,rho=1)}I get an error when I run it. Any idea why?Thanks a lot and hope this was clear,Asaf
--
You received this message because you are subscribed to the Google Groups "Israel R User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to israel-r-user-group+unsubscribe...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
----Jonathan RosenblattDept. of Industrial Engineering and ManagementBen Gurion University of the Negev