I am not sure about "overwrite mean() with data".  My purpose was
to generate random numbers that are from a multivariate normal
distribution with the mean vector.

For the var.f function, since I already specify m and J, so the only
variable is really rho, so I wrote it as a function of rho only.

Could you be a little more specific? Thanks a lot again.
2010/5/28 Sarah Goslee <sarah.gos...@gmail.com>

> There are a bunch of problems in your code:
> you overwrite mean() with data, and that could screw things up.
> you have a function var.f that isn't passed all the arguments it needs.
> est.4 is defined several times, each overwriting the previous.
>
> First you need to clean up these sorts of problems since they can
> lead to all kinds of bizarre results.
>
> Then, if you are still getting unexpected results, please send the list
> a minimal example so that we can take a look.
>
> Sarah
>
> On Fri, May 28, 2010 at 10:17 AM, li li <hannah....@gmail.com> wrote:
> > Thanks very much for your reply.  The function is a bit long. I attached
> it.
> >
> > rho.f () is in second text document. It uses rada1.mnorm() function which
> > is contained in the first document.
> >
> > Thank you very very much!!!
> >
>
>  --
> Sarah Goslee
> http://www.functionaldiversity.org
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to