Re: mathematica fit data to inverse gamma distribution
- To: mathgroup at smc.vnet.net
- Subject: [mg117391] Re: mathematica fit data to inverse gamma distribution
- From: "Kevin J. McCann" <Kevin.McCann at umbc.edu>
- Date: Thu, 17 Mar 2011 06:31:02 -0500 (EST)
- References: <ilq6pf$bgh$1@smc.vnet.net>
I am running 8.0.1 under Windows7 and the code below works fine for me. Kevin On 3/16/2011 7:26 AM, Alex wrote: > Hi, > > I am trying to obtain same figure that is provided in Mathematica's website related to fitting an inverse gamma to a dataset. Here is the code I enter: > > data1 = RandomVariate[InverseGammaDistribution[0.5, 3], 10^4]; > Show[ > Histogram[data1, {0, 20, 1}, "PDF"], > Plot[PDF[ > TruncatedDistribution[{0, 20}, InverseGammaDistribution[0.5, 3]], > x], {x, 0, 20}, PlotStyle -> Thick]] > > > and here is the error I receive: > > Histogram::hspec: The height specification PDF is not one of the named height functions or a function that can be used to compute the heights for each bin.>> > Show::"gcomb" : StyleBox[Could not combine the graphics objects in ..... > > I would appreciate anyone's help. > > Regards > > Alex >