What is the simplest way to get the differential normal distribution from Scilab “cdfnor”?
diff(P) from P=cdfnor(“PQ”,x,Mean(k)*ones(x),sqrt(Std2(k))*ones(x)); is clumsy, because I have to do some acrobatics with the x-values…
Heinz
What is the simplest way to get the differential normal distribution from Scilab “cdfnor”?
diff(P) from P=cdfnor(“PQ”,x,Mean(k)*ones(x),sqrt(Std2(k))*ones(x)); is clumsy, because I have to do some acrobatics with the x-values…
Heinz
Hello Heinz,
I had to deal with that too.
It is pitty that Scilab do only provide cdf functions
you can “resample” the result from diff(P) with an interp1 like
interp1(x(1:$-1),diff(P),x,"linear")
but the “linear” option is sometimes creating NaNs
You can try “spline”
you can also, if your vector is large say,
y=diff(P); y($+1)=y($)
This is copying the last value of your derivative vector twice
Maybe you can live with this trick. I do … sometimes.
you can install STIXBOX, DISTFUN will come with it
In this DISTFUN tool box there is a function called distfun_normpdf that will do what you want.
y=distfun_normpdf(x,mu,sigma)
My hope is, one day, all the Statistics functions in STIXBOX and CASCI will be bundled in SCILAB (No need of Toolboxes)
BR
Fanch
Hello,
In the above case the mentioned toolboxes are made available along Scilab’s versions. So please let’s be constructive, letting Scilab become bigger and bigger is not a solution to particular needs.
S.
Hi Stephane,
I’m ok to leave the Statistic functions outside in a Toolbox. (What is existing inside Scilab, STIXBOX, CASCI … all in one, no duplicates, no conflicts). This looks like the same dream as this page: The-Ideal-Statistics-Module
Then we would need someone to maintain it. I would love to be capable of doing it (but time and competencies …)
I already discussed this at length with Vincent & Antoine.
Recently, I found a mistake in STIXBOX, reached out to the owners thru Gitlab but no answers. Fortunately, Vincent fixed it and we should have a new version soon. So that is why I was thinking, maybe, if it was all bundle in Scilab there will be someone to take care of it.
A good discussion topic for sure
BR
F