Skip to content
Prev 5485 / 10988 Next

[Rcpp-devel] not sure if it's a rcpp question or a cpp question

I am fairly certain that this line is not kosher (and in any case it is a
confusing):

  w = pd * 0.4 / (R::pnorm((qpd - sqrt(rsq) * (-0.42) * sgtemp), 0, 1, 1,
0));

try this instead:

w = qpd - sqrt(rsq) * (-0.42) * sgtemp
w = pd * 0.4 / (R::pnorm(w, 0, 1, 1, 0));

On Wed, Mar 13, 2013 at 11:42 PM, Aileen Lin
<aileenshanhong.lin at gmail.com>wrote:

            
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130314/4150d86b/attachment.html>