Displaying 2 results from an estimated 2 matches for "0.53333".
Did you mean:
0.3333
2017 Jul 28
3
problem with "unique" function
I have the joint distribution of three discrete random variables z1, z2 and
z3 which is captured by "z"
and "prob" as described below.
For example, the probability for z1=0.46667, z2=-1 and z3=-1 is 2.752e-13.
Also, the probability adds up to 1.
> head(z) z1 z2 z3
[1,] -0.46667 -1.0000 -1.0000
[2,] -0.33333 -0.9333 -0.9333
[3,] -0.20000 -0.8667 -0.8667
2017 Jul 28
0
problem with "unique" function
Most likely, previous computations have ended up giving slightly different values of say 0.13333. A pragmatic way out is to round to, say, 5 digits before applying unique. In this particular case, it seems like all numbers are multiples of 1/30, so another idea could be to multiply by 30, round, and divide by 30.
-pd
> On 28 Jul 2017, at 17:17 , li li <hannah.hlx at gmail.com> wrote: