Oh I forgot to mention that I had the standard normal distributed RVs in the exponent to form V5. Otherwise it would make no sense. -- View this message in context: http://r.789695.n4.nabble.com/If-commands-in-a-while-loop-tp4680775p4680793.html Sent from the R help mailing list archive at Nabble.com.