Dear list
I am creating a WinBUGS program in which I define a vector v[] and a vector
of weights w[] (coded 0 or 1) which are cross-multiplied to form a third
vector wv[]. I would then like to get the mean and standard deviation of
wv[], but with 0 values excluded. Is there any way in which I can create a
subset of wv[] containing only non-zero values? Or, if I were to replace the
0's with NA's, does mean() and sd() exclude missing values from its
calculation?
Thanks
Barth
-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
|