Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10643 > unrolled thread

Re: "Bug" in SurvivalDistribution?

Started byDarren Glosemeyer <darreng@wolfram.com>
First post2012-06-27 08:09 +0000
Last post2012-06-27 08:09 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: "Bug" in SurvivalDistribution? Darren Glosemeyer <darreng@wolfram.com> - 2012-06-27 08:09 +0000

#10643 — Re: "Bug" in SurvivalDistribution?

FromDarren Glosemeyer <darreng@wolfram.com>
Date2012-06-27 08:09 +0000
SubjectRe: "Bug" in SurvivalDistribution?
Message-ID<jsef33$i5n$1@smc.vnet.net>
On 6/26/2012 3:48 AM, Mark Coleman wrote:
> Greetings,
>
> I've bumped into an unusual condition using the built-in SurvivalDistributi=
> on function in Mathematica v8.0.4. I'm hoping another list member could run this code on their system and let me know if they get the same behavior.
>
> I've been doing some basic exploratory survival analysis and attempted to generate a SurvivalDistribution object for n=1900 event times. On my system (Dell T3400 with 8 Gb Ram running 64-bit Windows 7 Enterprise edition, SP1), the following code works for n<1900:
>
> n = 1899;
> data0 = RandomReal[LogNormalDistribution[1, 5], n];
> survDist = SurvivalDistribution[data0]
> Plot[SurvivalFunction[survDist, z], {z, 1, 100}]
>
> but when n>= 1900, my call to SurvivalDistribution does not evaluate properly.
>
> I've duiplicated this on a much larger Mathematica v8 Linux server. I've also reported it to WRI.
>
> Any idea on what's going on would be most welcomed. My final datasets contain much larger samples, n>100000.
>
> Thanks,
>
> Mark
>

This appears to be fixed in the development version. As a workaround for 
now, you can evaluate the following (it seems the object being created 
is not being flagged as a valid distribution):

Unprotect[DataDistribution];
DataDistribution /:
  HoldPattern[
   DistributionParameterQ[
    DataDistribution["Survival", {_, _}, _, _]]] := True

After that,

n = 1900;
data0 = RandomReal[LogNormalDistribution[1, 5], n];
survDist = SurvivalDistribution[data0];

Plot[SurvivalFunction[survDist, x], {x, 1, 100}]


will work just fine.

Darren Glosemeyer
Wolfram Research

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web