[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Location of probability PDF's and CDF's in gnuplot?
From: |
Paul Kienzle |
Subject: |
Re: Location of probability PDF's and CDF's in gnuplot? |
Date: |
Sat, 27 Aug 2005 00:44:51 -0400 |
Avocado:~ paulkienzle$ locate prob.dem
/sw/share/doc/gnuplot/demo/prob.dem
/Users/paulkienzle/darwinports/dports/math/gnuplot/work/gnuplot-3.8h.0/
demo/prob.dem
The functions are defined in stat.inc in the same directory. For
logistic it is:
# Logistic PDF
logistic(x)=lambda*exp(-lambda*(x-a))/(1.0+exp(-lambda*(x-a)))**2
Note that many statistical functions are defined in Octave, though in
the case of logistic_pdf, it does not include the lambda and a
parameters so you instead need to use:
y = lambda*logistic_pdf(lambda*(x-a))
to get the same function as gnuplot.
- Paul
On Aug 26, 2005, at 11:15 PM, Henry F. Mollet wrote:
Where are the probability PDF's and CDF's located in gnuplot so I can
set
the path that they can be found. When in my home directory and trying
for
example 'logistic(x)' the function cannot be found. After I load the
demo
'prob.dem' and do a few functions and then quit, plot logistic(x) will
work
using my own parameters for a and lambda.
Henry
gnuplot> show loadpath
loadpath is "/usr/local/share/gnuplot/demo/"
"/usr/local/bin/gnuplot"
system loadpath is
gnuplot> pwd
/Users/hfm
gnuplot> plot logistic(x)
undefined function: logistic
gnuplot> load 'prob.dem'
Statistical Library Demo, version 2.3
Copyright (c) 1991, 1992, Jos van de Woude, address@hidden
NOTE: contains 54 plots and consequently takes a lot of time to run
Press Ctrl-C to exit right now
Press Return to start demo ...
Hit return to continue^C
gnuplot> plot logistic(x) # Now I get a graph
gnuplot>
I assume that default value would be used for the parameters if I
don't give
them but this is not the problem:
gnuplot> plot logistic (x)
undefined function: logistic
gnuplot> a = 0.0
gnuplot> lambda = 2.0
gnuplot> mu = a
gnuplot> sigma = pi/(sqrt(3.0) + lambda)
gnuplot> plot logistic (x)
undefined function: logistic
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------