       fit with cdf of skew normal distriubtion

• To: mathgroup at smc.vnet.net
• Subject: [mg112131] fit with cdf of skew normal distriubtion
• From: Tom Pether <pethert at googlemail.com>
• Date: Wed, 1 Sep 2010 06:27:47 -0400 (EDT)

```Hi,

to am trying to fit the integral of the skew normal distribution to a
set of data. xhis is my fit function:

upperlimit[x_, y0_, p2_, a_] = p2 (1 - (x/y0)^(1/a));
f[x_, y0_, a_, p2_, s_, skew_, A_, b_, p_] :=
b - 2 A NIntegrate[
PDF[NormalDistribution[p, s], x] CDF[
NormalDistribution[p*skew, s], (skew*x)], {x, -100,
uperlimit[x, y0, p2, a]}, MaxPoints -> 200, MaxRecursion -> 6,
PrecisionGoal -> 4];

then i call the fit by

FitResult =
NonlinearModelFit[data, f[x, y0, a, p2, s, skew, A, b, p], init,
{index, t},
Weights -> weights, VarianceEstimatorFunction -> Automatic,
PrecisionGoal -> 4];

if i then want to get error estimates for the fit parameters by calling

FitResult["ParameterTable"]

i get the following error messages (and no error estimates):

General::stop: Further output of NIntegrate::nlim will be suppressed
during this calculation. >>

Function::slotn: Slot number 2 in
FittedModels`NonlinearFitDump`cnf[{T0,a,pc,s,skew},<<1>>,{},Sequence@@{WorkingPrecision->MachinePrecision}]/.FittedModels`NonlinearFitDump`cnf-><<36>>&
cannot be filled from (<<1>>)[##1]. >>

Function::slotn: Slot number 2 in
FittedModels`NonlinearFitDump`cnf[{T0,a,pc,s,skew},<<1>>,{},Sequence@@{WorkingPrecision->MachinePrecision}]/.FittedModels`NonlinearFitDump`cnf-><<36>>&
cannot be filled from (<<1>>)[##1]. >>

Power::infy: Infinite expression 1/0. encountered. >>

Power::infy: Infinite expression 1/0. encountered. >>

Power::infy: Infinite expression 1/0. encountered. >>

General::stop: Further output of Power::infy will be suppressed during
this calculation. >>

\[Infinity]::indet: Indeterminate expression 0. ComplexInfinity
encountered. >>

\[Infinity]::indet: Indeterminate expression 0. ComplexInfinity
encountered. >>

\[Infinity]::indet: Indeterminate expression 0. ComplexInfinity
encountered. >>

General::stop: Further output of \[Infinity]::indet will be suppressed
during this calculation. >>

does anybody have any idea how to fix this? if i do a fit with
CDF[NormalDistribution...] it works well. with my "self made" CDF f[] it
doesn't... i am stuck here. thanks in advance

tom

```

• Prev by Date: Re: Weighted graphs with sum of weights determining vertex placement?
• Next by Date: Re: FindRoots?
• Previous by thread: Re: Weighted graphs with sum of weights determining vertex placement?
• Next by thread: Re: fit with cdf of skew normal distriubtion