f

#### confidence bound estimation

Dear All,

For example, I can fit experiment data by normal distbution as the
following. However, I want to estimate the confidence interval, too.
How could I acheive this purpose (shown in figure with confidence
bound) from fitting information such as stdfit, WSSR and others?

f(x)=a+b*x
fit f(x) 'data.dat' using 2:(invnorm($1)) via a,b plot 'data.dat' using 2:(invnorm($1)) t 'data' w lp pt 7,\
f(x) t 'fit'

Thanks!

mylee 0  mylee
7/11/2005 3:13:43 PM comp.graphics.apps.gnuplot  5008 articles. 0 followers. 8 Replies 686 Views Similar Articles

[PageSpeed] 11

mylee <mylee@mxic.com.tw> wrote:
> Dear All,

> For example, I can fit experiment data by normal distbution as the
> following.

That's a seriously strange way of doing that, though.

If you want to fit column(1) = norm(a*column(2)+b),

then I think you should have said so, rather than going this
circuitous way of transforming the y values with an inverse function.

> However, I want to estimate the confidence interval, too.

The confidence interval of *what*?

> How could I acheive this purpose (shown in figure with confidence
> bound) from fitting information such as stdfit, WSSR and others?

You don't.  You look at the parameter errors instead.  That's what you
have them for.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain. 0  Hans
7/11/2005 3:25:10 PM
Dear Sir,

To get a probability y axis, I refer the method used in
http://t16web.lanl.gov/Kawano/gnuplot/plot7-e.html#5.17
Do you suggest a straightfoward way?
f(x)=norm(a+b*x)
fit 'data.dat' using 2:1 via a,b
plot 'data.dat' using 2:invnorm($1),\ a+b*x On the other hand, is it no way to plot confidence bound, eg. 95% confidence level, for experiment data? | \ * / | \ * / | \ * / | | * / | / * | | / * / | / * | | / * | |____/__ *_____\__________ mylee 0  mylee 7/12/2005 5:05:45 AM mylee <mylee@mxic.com.tw> wrote: > To get a probability y axis, I refer the method used in > http://t16web.lanl.gov/Kawano/gnuplot/plot7-e.html#5.17 > Do you suggest a straightfoward way? > f(x)=norm(a+b*x) > fit 'data.dat' using 2:1 via a,b > plot 'data.dat' using 2:invnorm($1),\
>      a+b*x

In the essence, yes.  The indirect way of doing it may work, and if you're
going to display the results that way, there's not much point trying to
avoid doing the same transformation for the fit.

> On the other hand, is it no way to plot confidence bound, eg. 95%
> confidence level, for experiment data?

There's probably a way, but you have to know a good deal about
statistics and about gnuplot to do it.  Due to the transformation,
which has the dependent variable go from left to right, i.e. it's
x=f(y), not the other way round, you'll need parametric mode to do it.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain. 0  Hans
7/12/2005 12:26:11 PM
Dear Sir,

I find some formula on internet to describe the confidence band of
linear regression line as
Y+-SSE^1/2*W, W^2=2F(1-a,2,n-2),
where F is F-distribution with 1-a confidence level, n is degree of
freedom.
I think I need to how to get or calculate these parameters from fitting
log file or by hand.
Thanks for your help.

mylee 0  mylee
7/13/2005 4:46:09 PM
Dear Sir,

The confidence band of fitted line with confidence \alpha is in form of
(with linear regression)
Y+-\sigma\sqrt(2*fv(2,n-2,\alpha)*(1/n+(x-xmean)^2/S_{xx}))
where xmean is mean value of x and S_xx is sum of (x-xmean)^2
I take use of the information in .log file to draw the confidence band
as the following,

##f-distribution for confidence band of fitting line
n=3D2 #number of fitted parameters: a,b
ndf=3D10-2 # number of degree of freedom: number of data - 2
fdist(x)=3Dibeta(n/2,ndf/2,n*x/(n*x+ndf)) #definition of f-distribution
##get fv with fdist(fv)=3Dconf by iteration
fv=3D0 ##initial value
fv_step=3D1.0 ##initial step
conf=3D0.95 ##target confidence level
##fitting function
f(x)=3Da+b*x
fit f(x) 'fit_dist.dat' using 2:(invnorm($1)) via a,b ##fitting coefficient, manual setup after fitting stdfit=3D0.159561 ASEa=3D0.2679 ASEb=3D0.7933 Sxx=3D(stdfit/ASEb)**2 xmean=3Dsqrt(((ASEa/stdfit)**2-1.0/(n+ndf))*Sxx) plot 'fit_dist.dat' using 2:(invnorm($1)) t 'STD' w p pt 7,\
f(x) notitle lt 1,\
f(x)+stdfit*sqrt(2*fv*(1.0/10+(x-xmean)**2/Sxx)) t '95%' lt 0,\
f(x)-stdfit*sqrt(2*fv*(1.0/10+(x-xmean)**2/Sxx)) notitle lt 0

file 'f-dist.loop'
fv=3Dfv+fv_step
if ( fdist(fv)-conf<0 ) reread;
if ( fv_step>0.000001 ) fv=3Dfv-fv_step; fv_step=3Dfv_step/10; reread

Although it is not automatic in use (one the part of getting Sxx and
xmean, which could be resolve by modifying fit.c?) but I hope it is
helpful for others. And thanks for your assistance.

mylee

mylee =E5=AF=AB=E9=81=93=EF=BC=9A
> Dear Sir,
>
> I find some formula on internet to describe the confidence band of
> linear regression line as
> Y+-SSE^1/2*W, W^2=3D2F(1-a,2,n-2),
> where F is F-distribution with 1-a confidence level, n is degree of
> freedom.
> I think I need to how to get or calculate these parameters from fitting
> log file or by hand.
> Thanks for your help.
>=20
> mylee 0  mylee
7/19/2005 10:34:03 AM
mylee <mylee@mxic.com.tw> wrote:
> Dear Sir,

> The confidence band of fitted line with confidence \alpha is in form of
> (with linear regression)
> Y+-\sigma\sqrt(2*fv(2,n-2,\alpha)*(1/n+(x-xmean)^2/S_{xx}))
> where xmean is mean value of x and S_xx is sum of (x-xmean)^2

But gnuplot is not doing linear regression, so it doesn't even compute
those numbers.  But there's a way to get around that.  xmean and S_xx
are (almost) directly available as the result and squared parameter
error if you fit a constant function to your data, instead of a
straight line.  I.e.

set fit errorvar
fit xmean 'file' using {whatever} via xmean
S_xx = xmean_err**2  (may have to change from (n-1) to (n)...)

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain. 0  Hans
7/19/2005 11:51:46 AM
Dear Sir,

It is a good idea to get xmean and Sxx by fitting a constant funtion.
But Sxx should be xmean_err*m*ndf.
There is only one manual-input parameter, m, number of data points,
left now.
Many thanks for your suggestion.

##get xmean and Sxx
set fit errorvar
m=10 #number of data points
n=1 #number of fitted parameters: xmean
ndf=m-n # number of degree of freedom: number of data - n
fit xmean 'fit_dist.dat' using (invnorm($1)):2 via xmean Sxx=xmean_err**2*m*ndf ##fitting function f(x)=a+b*x fit f(x) 'fit_dist.dat' using 2:(invnorm($1)) via a,b
stdfit=b_err*sqrt(Sxx)
##f-distribution for confidence band of fitting line
n=2 #number of fitted parameters: a,b
ndf=m-n # number of degree of freedom: number of data - 2
fdist(x)=ibeta(n/2,ndf/2,n*x/(n*x+ndf)) #definition of f-distribution
##get fv with fdist(fv)=conf by iteration
fv=0 #initial value
fv_step=1.0 #initial step
conf=0.95 #target confidence level
plot 'fit_dist.dat' using 2:(invnorm($1)) t 'STD' w p pt 7,\ f(x) notitle lt 1,\ f(x)+stdfit*sqrt(2*fv*(1.0/10+(x-xmean)**2/Sxx)) t '95% Confidence' lt 0,\ f(x)-stdfit*sqrt(2*fv*(1.0/10+(x-xmean)**2/Sxx)) notitle lt 0 mylee 0  mylee 7/20/2005 4:40:38 AM mylee wrote: > There is only one manual-input parameter, m, number of data points, > left now. > Many thanks for your suggestion. Dear mylee, I've read this thread and interested in the same feature. Unfortunately I could not get it to work. Would you please share the fit_dist.dat format (or file) you've used? I've used a very simple dataset and receive the error: FIT: data read from 'fit_dist.dat' using (invnorm($1)):2
BREAK:  No data to fit

Any hints?!

Thanks in advance. With regards,

Martin. 0  Martin
8/9/2005 6:35:56 AM Similar Artilces:

Hovsepian: Apps! Apps! Apps!
Novell CEO: Apps Are Job No. 1 for Linux http://www.cio-today.com/story.xhtml?story_id=021001VE8HV3 <<< In order for Linux to grow into the computing mainstream, the open- source OS needs more applications and a standardized approach to software certification, Novell CEO Ron Hovsepian said in his keynote Wednesday at the LinuxWorld conference and trade show in San Francisco. "The No. 1 thing that we need on Linux is applications," he said. "Whether we like it or not, the application is what drives the final customer decision," he added. >>> John Bail...

graphics and bounds
hi there, I'm a long-time fan of linux f77 and have two queries (3 actually) : 1- is there anyway to produces graphics apart from making a system call to some external prog like gnuplot or xmgr ? 2 - are there compiling options to produces arrays bound checks ? are these reliable ? 3 - if f77 compiles, links and produces and executable, what is a makefile for ?? thanks :) ! G. In a previous article, rafat@caramail.com wrote: >hi there, >I'm a long-time fan of linux f77 and have two queries (3 actually) : >1- is there anyway to produces graphics apart from making a system call...

95 %Confidence Interval for parameters estimated using Simulink Parameter Estimation
How can you obtain the 95% confidence interval and other statistical measures for parameters estimated using the Simulink Parameter Estimation tool? Does the Simulink Parameter Estimation tool use functions from the Optimization Toolbox such as nlinfit, nlparci, etc to perform the parameter estimation. If so, are the outputs from these functions available in someway? "Kenneth Debelak" <kenneth.a.debelak.nospan@mathworks.com> wrote in message <feoc73$s3p$1@fred.mathworks.com>... > How can you obtain the 95% confidence interval and other > statistical meas...

95 %Confidence Interval for parameters estimated using Simulink Parameter Estimation #2
How can you obtain the 95% confidence interval and other statistical measures for parameters estimated using the Simulink Parameter Estimation tool? Does the Simulink Parameter Estimation tool use functions from the Optimization Toolbox such as nlinfit, nlparci, etc to perform the parameter estimation. If so, are the outputs from these functions available in someway? Statistical measures for parameter estimates are not currently available in Simulink Parameter Estimation. Yes, it uses the functionality available from the Optimization toolbox (lsqnonin, fmincon, fminsearch). Which o...

Confidence bounds with mnrval
Hello, I have been using mnrfit and mnrval to perform multinomial (ordinal) regression, and wanted to obtained the confidence intervals for the cumulative fitted probabilities, simply using: [b,dev,stats]=mnrfit(x,y,'interactions','off','model','ordinal','link','logit'); [yfit,lo,hi]=mnrval(b,x,stats,'interactions','off','type','cumulative','model','ordinal','link','logit'); My issue is, I obtain 95% confidence intervals which are extremely narrow, which originally I attributed to the large number of data points used, but there are also some obvious systematic deviations of the data from the fit which I would expect to influence the standard error - thus to have wider CIs. Generally, when I use the same procedure to fit this model to smaller datasets, the CIs get wider, but somehow this seems to be irrespective of any deviations from the fit, which I find strange. I have been researching some documentation on how CIs are calculated in Matlab for multinomial distributions, and potential issues, without success. Any insight on this matter would be greatly appreciated! Thanks, IC "Ingrid " <ingrid@tsunami2.civil.tohoku.ac.jp> wrote in message <laj6l7$1j0$1@newscl01ah.mathworks.com>... > Hello, > > I have been using mnrfit and mnrval to perform multinomial (ordinal) regression, and wanted to obtained the co...

Trellis graphics in gnuplot?
Anybody working on importing/ scripting trellis graphics for gnuplot? Here are some examples (I think some fancy multiplots might do the trick, but maybe not quite, plus I am hoping to stand on the shoulders of giants): http://plan9.bell-labs.com/cm/ms/departments/sia/project/trellis/display.examples.html TIA ...

Graphics Mapping App?
Are there any OS/2 apps running -- besides XAct -- which would be able to plot a data set on a map background given geographical coordinates? Anything from Unix/Linux which has been cross-compiled? It is not necessary the data is displayed on the monitor but rather that a standard graphics output file is created which can then be used by another application. TIA. Do you count Java apps? <www.cohort.com> CoPlot runs on OS/2 (I tried it) and seems to have facilities for plotting on maps (Orthographic, Mercator, and Conic) Actually, 1-2-3 also handles maps, it may do what you wan...

Matrix Confidence Bounds
Hi, When using "crosscorr" matlab computes the confidence bounds using: bounds = [nSTDs,-nSTDs] / sqrt(n); nSTDs being 2 by default and n is the size of the vector. When using xcorr2 for 2-Dimensional cross-correlation, how should the confidence bounds be calculated? Thanks. Y. ...

Graphical APPS replacement
Someone emailed me to tell me my icon choose utility wasn't working. Shucks. Anyway, I finally got around to making an APPS replacement using the internal rom calls to get any user added items in the APPS menu. So there is now a new command in the library called IAPPS that will display an icon form of the APPS menu, as well as any user added programs in the STAT menu, NSOLVE menu, or FINANCE menu. I'd like to make some nice little icons to put in there to make it into a true replacement, and possibly change/expand the order and content of the standard APPS menu, but I am fresh out o...

CFtool and confidence bound
when i chose x, y, w as my data and the weights respectively, I receive some p1 , p2, with some confidence interval in the CFTOOL. when i do x,y, 10*w ( meaning that I'm more certain about my data), again I receive same p1 and p2 with the same confidence interval. I think the confidence interval should change cause I'm more certain about my data, but it doesn't . Am i missing something here? "jezghaleh" <jezzghaleh@yahoo.com> wrote in message news:ef1a06f.-1@webx.raydaftYaTP... > when i chose x, y, w as my data and the weights respectively, I > receive so...

adding graphics to my console app
I need to add scientific visualization capability to my "console" application (text-based UI, C code). This just means being able to open a window and display data in graphical format. I have a couple of options: 1. Dredge up ancient QuickDraw code I wrote back in the '90s, Carbonize it, and adapt it for my needs. I used to know all about GrafPorts, etc. I don't know if this is still useful :-) 2. Develop a graphical front-end in Java, and implement a two-way communication protocol between the Java code and my C application. My C app would ship data to the Java app for display, and the Java app would send graphics-related user commands back to my C app. I would retain the text-based UI for non-graphics related stuff. The advantage to #1 is tight integration between the number-crunching and display code. The disadvantage to #1 is loss of cross-platform compatibility. An advantage to #2 is learning Java (the company I work for has gone bonkers over Java - I gotta get with the program). Also, a Java-based solution would be cross-platform. A disadvantage to #2 is possible headaches implementing the dynamic interface between Java and my C app (I currently don't know how to do this, although I've heard that it can be done). I've been experimenting with the graphics capability of J2SE 1.5 on Windows. There appears to be sufficiently rich graphics functionality within Java to do what I need. Anyone have any thoughts o...

SAS Graphics for Confidence interval
I am trying to graph the confidence interval of the predicted value. There are 90 subjects which had a outcome variable Y and has been measured repeatedly for 6 years. I am doing a simple regression proc reg ; by subjects ; model Y = t /ci run ; Now, I have a datset with predicted value and confidence interval ( both upper and lower), I want to graph Subject vs Confidence interval. The graph should show all the subjects with their lower and upper confidence interval in form of a line. Does anyone have any examples from where I can start on ? Thank you for all of your time Regar...

Fitting + confidence bounds/plots
What is the easiest way to do fitting and calculate confidence boundaries and plot confidence intervals if I have: a) Linear regression ( y=a1*f(x1)+a2*f(x2)... ) b) Nonlinear regression ( y=a1*f(x1,b1)+a2*f(x2,b2)... ) Fitting in case a) is more or less trivial, but how to do the confidence bounds easily. -Jonne "Jonne " <jonne.haapalainen@gmail.com> wrote in message <gab1ou$i5v$1@fred.mathworks.com>... > What is the easiest way to do fitting and calculate confidence boundaries and plot confidence intervals if I have: > > a) Linear regression ( y=a1*f(x1)+a...

Is gnuplot good for custom graphics?
Is gnuplot good for pixel plotting in high colour (24 bits) to the screen, or is there a better library to use for this sort of application? vfunc@talktalk.net wrote: > Is gnuplot good for pixel plotting in high colour (24 bits) to the > screen, or is there a better library to use for this sort of > application? Hard, if not impossible to say, without knowing what you might mean by "pixel plotting to the screen"? gnuplot is a plotting program, not a generic pixel-based graphics engine. -- Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de) Even if all the snow were burnt, ashes would remain. ...

paintComponent(Graphics graphics)
Hi=20 I hope I can explain this clearly without getting into too much detail as t= he code in question is a couple of thousand of lines. So to begin, I have = a JPanel to which I add JLabels and JComponents using JPanel's add() method= .. It works fine, but now I would like to print an image ON TOP of the adde= d JLabels and JComponents. For this I manipulate my JPanel's paintComponen= t(Graphics graphics) method. In it I have something of the following sort: paintComponent(Graphics graphics){ Graphics2D g =3D (Graphics2D)graphics.create(); g.drawImage(image, 200, ...

confident Prediction Bounds of a fit
Hi, Anyone knows how to calculate a fitting 'Prediction Bounds' at some confident level like the one in CFTOOL (cftool->view->Prediction Bounds) ? I tried function polyconf, confint, but the results are not the same as the one shown in cftool. Monica mon wrote: > Hi, > > Anyone knows how to calculate a fitting 'Prediction Bounds' at some > confident level like the one in CFTOOL > (cftool->view->Prediction Bounds) ? > > I tried function polyconf, confint, but the results are not the same > as the one shown in cftool. Monica, I believe t...

adding graphics to my web app
I develop a small web application with NetBeans and Visual web pack. I need to add some dynamic 2D elements on my page. Which tehnology is the most suitable for that platform ? Mario wrote: >I develop a small web application with NetBeans and Visual web pack. I need >to add some dynamic 2D elements on my page. Which tehnology is the most >suitable for that platform ? The web? Web friendly graphics are generally the sames types that the J2SE supports. Types JPEG, GIF and PNG. GIF format offers animation, but for anything more complex in terms of 'dynamic', you mi...

Graphics--combining graphics
I am trying to create an animation of a piecewise function. I have a graph of a ball rolling and I would like to combine an animation for one equation of motion for the first part with another equation for the second part of the motion. It is easy enough to create the two animations individually, however I am stumped on how to combine them into one continuous animation. Link to the forum page for this post: http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Special:Forum_ViewTopic&pid=10007#p10007 Posted through http://www.mathematica-users.org [[postId=10007]] ...

the graphics and the concept of the graphic
Hiya all. everybody should applicate this type of guidelines This movement builds a strong visual link between the head and shoulders. If you get the correct relationship between the eyes, nose and mouth, you will end up with a good likeness. Our Pencil Portrait lesson explains and illustrates the step by step drawing techniques involved in creating the portrait of a young girl. At this stage, the drawing is no more than a set of carefully measured features that establish the final proportions of the portrait. There are three basic stages in the creation of the image...

confidence bounds using RSTOOL
Greetings, How do I retrieve the confidence bounds reported in RSTOOL (statistics toolbox)? Thanks. > How do I retrieve the confidence bounds reported in RSTOOL > (statistics toolbox)? Clay, paradoxically the easiest way to do this is to use the regstats function to do the fit, and the nlpredci function to compute the confidence bounds. The latter is geared toward nonlinear fits, but you can use it for a linear fit as well. Here's an example: % Fit a pure quadratic model to the Hald data load hald stats = regstats(heat,ingredients,'p'); % Define a function to compu...

Crypto-Apps: Ciphers App-1 and App-2.

Best computer for graphics apps?
Ok, boss man said that he is getting me a new computer, and has set a cap of \$2,000 with a little wiggle room if it is important enough. My standard usage includes Photoshop mostly, sometimes 300 DPI poster size documents that run extremely slow on this year-old HP pavillion (1 gig memory) I am currently using. For instance, applying a change in brightness/contrast could take up to 3 minutes to complete. I also use of 3ds max on occasion for product modeling. Rendering a two minute movie clip can take hours. Other programs used: Macromedia suite, Swift 3d, illustrator, micros...

graphic inside a graphic
Hi everyone Does anybody know how to insert a graphic inside a graphic?? I mean, to add a small graphic (as a zoom for example) inside a plot. Thanks augusto try axes try axes check out the tool 'imshow()', then try to bring the figure in shape get(gca) and superimpose your graph - 'hold on', 'plot()', 'hold off' (Haven't tried it my self so far) Thorben The example below shows you how to insert a graphic (e.g. photo) into another MATLAB figure. I = imread('peppers.png'); theta = linspace(-pi,pi,200); figure; plot(theta,cos(theta)); gr...

SVG graphics in wx app, how to?
------=_NextPart_000_000D_01C6C1F4.5AA2AF70 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi all, I'm working on a wx project where completely customized GUI is required. Is somebody using SVG renderings? If I could support SVG graphics (the best would be by using OpenGL for renderings since I also have to be very fast in - 2D only - drawings) all things would be a lot simpler. I searched the web for free or commercial libraries but no one seems to completely fit our needs. Target platforms are msw and mac. ... Web resources about - confidence bound estimation - comp.graphics.apps.gnuplot

In Europe, a full-blown crisis of public confidence
See more of the day's public opinion news at our sister site, OpinionToday. Confidence course training - Flickr - Photo Sharing!
Soldiers of A Company, 412th Aviation Support Battalion, 12th Combat Aviation Brigade conducted confidence course training as part of their pre-deployment ... Rep. Huizenga Asks Federal Reserve Chairman Ben Bernanke How the US Will Recover Consumer Confidence ...
As a small business owner, Rep. Huizenga knows there are three things they are looking for: Consumer confidence, availability of credit, and ... Market analysis: Confidence despite the slide
Mohieddine Kronfol, the chief investment officer for fixed income and global sukuk at Franklin Templeton Investments (ME), gives his view on ...

Stat Of The Week: Public Confidence In SCOTUS At Historic Low
Less than one-third of U.S. citizens express confidence in our highest court.

Fitbit CFO Blames First-Quarter Weakness on Timing; ‘The Confidence is Very High’
It’s been rough going for Fitbit (FIT) shares, ever since the company announced it’s Blaze smartwatch at CES in early January. The stock is down ...

Resources last updated: 3/2/2016 8:29:21 PM