[R] strange error message when using rnorm and rbinom

Jim Lemon drjimlemon at gmail.com
Wed Jun 15 01:30:25 CEST 2016


Hi JI,
The most likely problems are negative numbers for sd or "k" being
larger than the number of mu.m2 or disp.m2 values.

Jim

On Wed, Jun 15, 2016 at 4:06 AM, JI Cho <ikycho at gmail.com> wrote:
> Dear R users,
>
> I have been using rnorm, rbinom and have been getting the following warning
> message when I do not have any NAs in my generated values.
>
> Warning messages:1: In rnorm(nref, mean = mu.m2[[k]], sd = sqrt(disp.m2[[k]])) :
>   NAs produced
>
>
> In one of the resources I found in over the internet explains that the
> mean and sd should be declared as integers. So I tried that which did
> not solve the issue.
>
>
> Can anyone advise me on how to eliminate the warning message?
>
>
> Thank you.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list