I've fit a nonparametric density in the following manner:
x = Table[{RandomReal[], RandomReal[], RandomReal[]}, {i, 20}];
d = SmoothKernelDistribution[x];
RegionPlot3D[
PDF[d, {x1, x2, x3}] > 0.5, {x1, -.5, 1.5}, {x2, -.5, 1.5}, {x3, -.5,
1.5}, AxesLabel -> {"X1", "X2", "X3"}, SphericalRegion -> True,
Mesh -> None]
Now I'd like to calculate the volume of a region with density greater than, say, z. I've tried the following:
z = 0.5;
Volume[ImplicitRegion[
PDF[d, {x1, x2, x3}] >
z, {{x1, -.5, 1.5}, {x2, -.5, 1.5}, {x3, -.5, 1.5}}]]
But I get
Volume::nmet: Unable to compute the volume of region ImplicitRegion[(\[Piecewise] 0 Less[<<2>>]||Less[<<2>>]||Less[<<2>>]||Greater[<<2>>]||Greater[<<2>>]||Greater[<<2>>]
InterpolatingFunction[{{-0.598479,1.48061},{-0.776221,1.78808},{-0.660492,1.69809}},{4,7,0,{32,32,32},{2,2,2},0,0,0,0,Automatic,{},{},False},{<<1>>},{Developer`PackedArrayForm,{<<1>>},{1.06829*10^-18,7.07886*10^-17,<<47>>,0.,<<32718>>}},{Automatic,Automatic,Automatic}][<<1>>] <<4>>
)>0.5&&-0.5<=x1<=1.5&&-0.5<=x2<=1.5&&-0.5<=x3<=1.5,{x1,x2,x3}]. >>
Any suggestions would be greatly appreciated.