Dear Splus users,
given
mymean and myvariance which are two numbers and
myvector, a vector of n numbers
I need to build a function (called myfunction) in the variable x as follows:
N(mymean,myvariance) times the product for i from 1 to n of
exp(myvector[i]x)/(1+ exp(myvector[i]x)) if myvector[i] is non zero
1/(1+ exp(myvector[i]x)) if myvector[i] is equal to zero
The dimension of myvector is around 200 and myvector is updated thousands of
times.
I need to evaluate myfunction in different points of its dominium.
Could anybody suggest me the way of building a performing function that does
what I described?
thank you for your support
Stefano
|