Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1031

Re: two regression curves for two ranges of the same data set on the same chart

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!feeder.erje.net!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail
From Hans-Bernhard Bröker <HBBroeker@t-online.de>
Newsgroups comp.graphics.apps.gnuplot
Subject Re: two regression curves for two ranges of the same data set on the same chart
Date Fri, 13 Apr 2012 00:42:38 +0200
Lines 25
Message-ID <9up42tFd5tU1@mid.dfncis.de> (permalink)
References <c83ddafa-3bf9-4354-885a-8ff56e314cde@v22g2000vby.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.dfncis.de xDYtsl/Ga0Se684Q5YdyLgtA7hlDgFWzAI60ZWRJ0q15cIVcIkM9p3wSZL
Cancel-Lock sha1:sdZ/yXaadeR8Fyefj6D0zhdEizo=
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1
In-Reply-To <c83ddafa-3bf9-4354-885a-8ff56e314cde@v22g2000vby.googlegroups.com>
Xref csiph.com comp.graphics.apps.gnuplot:1031

Show key headers only | View raw


On 12.04.2012 22:50, TonyG wrote:
> I've been trying to obtain two sets of regression coefficients for the
> same data file, using two ranges of x values, then plot the two lines
> and the data points on the same graph.
>
> f(x)=a*x+b
> f(x1)=a1*+b1,  then

That one almost certainly doesn't do what you wanted.  There's no x1 on 
the right hand side, and you just overwrote your earlier definition of 
f(x).  You must have meant

	f1(x) = a1*x+b1

> fit [x=*:25] f(x)... via a, b  and
> fit [x1=25:*] f(x1) ... via a1, b1

	f(x) = (x<=25) ? (a*x+b) : (a1*x+b1)
	fit f(x) via a, b, a1, b1

would have been simpler.

> The trouble is with the x1... gnuplot doesn't understand what it is.

I'd have to state that you don't understand it either...

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

two regression curves for two ranges of the same data set on the same chart TonyG <tgozdz@gmail.com> - 2012-04-12 13:50 -0700
  Re: two regression curves for two ranges of the same data set on the same chart Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2012-04-13 00:42 +0200
    Re: two regression curves for two ranges of the same data set on the same chart TonyG <tgozdz@gmail.com> - 2012-04-13 05:23 -0700
      Re: two regression curves for two ranges of the same data set on the   same chart Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2012-04-13 20:37 +0200

csiph-web