 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
korax1214@mailandnews.co. Guest
|
Posted: Sun Jan 09, 2005 8:11 pm Post subject: Regression analysis -- how-to? |
|
|
(Yes, I know that sci.math would be more appropriate for this thread --
were it not for the fact that, the last time I asked an algorithm
question there, the newsgroup's troll replied with a post which started
"there's no such thing as rectangular or polar complex numbers, there
are only complex numbers" (which may be true of *pure* maths[1]
(although I won't believe this until I get confirmation from someone
intelligent) but is definitely *not* true of *applied* maths (e.g.
algorithms) where the distinction between rectangular and polar forms
is very real (pun not intended) and quite important. For instance, the
algorithm for multiplying two rectangular complex numbers is very
different from the algorithm for multiplying two polar complex numbers,
just as the algorithm for multiplying 1/2 by 3/4 is very different from
the algorithm for multiplying 0.5 by 0.75, even though the same pair of
fractions are involved in both cases), and went rapidly downhill from
there. (The idiot in question obviously not only doesn't know what
"twit" means, at least not in British English which is what I speak and
write (it's *not* an insult), but from his reply to my reply to him, he
obviously doesn't even know what "fraction" means.) Hence I am posting
this to a group where I am likely to get *some* intelligent replies --
besides, I already tried sci.math with this question, and it appears
that nobody there is capable of answering it.)
Could anyone give me one or more algorithms for performing regression
analysis, calculating the coefficient of correlation of a dataset, or
any related topic of interest? Or give me a pointer as to where
(preferably online) I could find this information?
I know that there are at least six types of regression analysis
(linear, quadratic, logarithmic, exponential, power and inverse) and at
least two types of linear correlation coefficient (rank and product
moment, IIRC), but I'd like to know the details...
I know how to calculate the arithmetic mean and the product/population
standard deviations of a dataset, which I think are at least 70% of
what I need to do linear regression analysis, but I have no idea how to
go beyond this.
[1] Please don't tell me that the "correct" spelling is "math" (British
English, remember?); "mathematics" is a plural-only word, so one can't
have only one math, any more than one can have only one applau. :-)
|
|
| Back to top |
|
 |
Tom de Neef Guest
|
Posted: Sun Jan 09, 2005 8:19 pm Post subject: Re: Regression analysis -- how-to? |
|
|
<korax1214 (AT) mailandnews (DOT) co.uk> schreef in bericht
news:1105301500.658864.275730 (AT) c13g2000cwb (DOT) googlegroups.com...
| Quote: | Could anyone give me one or more algorithms for performing regression
analysis, calculating the coefficient of correlation of a dataset, or
any related topic of interest? Or give me a pointer as to where
(preferably online) I could find this information?
|
When I google for "regression analysis delphi freeware" I get more than 7000
references and there are certainly some worthwhile ones amongst the first
ten.
Tom
|
|
| Back to top |
|
 |
Maarten Wiltink Guest
|
Posted: Sun Jan 09, 2005 9:51 pm Post subject: Re: Regression analysis -- how-to? |
|
|
<korax1214 (AT) mailandnews (DOT) co.uk> wrote
| Quote: | (Yes, I know that sci.math would be more appropriate for this thread --
were it not for the fact that, the last time I asked an algorithm
question there, the newsgroup's troll replied with a post which started
"there's no such thing as rectangular or polar complex numbers, there
are only complex numbers" (which may be true of *pure* maths[1]
(although I won't believe this until I get confirmation from someone
intelligent) but is definitely *not* true of *applied* maths (e.g.
algorithms) where the distinction between rectangular and polar forms
is very real (pun not intended) and quite important. For instance, the
algorithm for multiplying two rectangular complex numbers is very
different from the algorithm for multiplying two polar complex numbers,
just as the algorithm for multiplying 1/2 by 3/4 is very different from
the algorithm for multiplying 0.5 by 0.75, even though the same pair of
fractions are involved in both cases), and went rapidly downhill from
there. (The idiot in question obviously not only doesn't know what
"twit" means, at least not in British English which is what I speak and
write (it's *not* an insult), but from his reply to my reply to him, he
obviously doesn't even know what "fraction" means.) Hence I am posting
this to a group where I am likely to get *some* intelligent replies --
besides, I already tried sci.math with this question, and it appears
that nobody there is capable of answering it.)
|
I tried to trim but failed.
The troll has a point that being polar or Carthesian is not a property
of the number, but of its notation. Every complex number can be expressed
both as (x+i*y) for some x and y, and as r*e^(i*phi) for some r and phi.
Several on-line dictionaries accessible through dictionary.com seem to
agree that "twit" _is_ an insult. They also seem to speak "slang" better
than British English, which is quite common on the Internet. It would
also seem that 0.5 and 0.75 are fractions only in the sense of being
between zero and one; they're not in the notation of one integer divided
into another.
As for intelligent replies, I think Tom gave one. Google knows everything
about everything; incidentally MathWorld knows more than I do about math.
Groetjes,
Maarten Wiltink
|
|
| Back to top |
|
 |
Mark Vaughan Guest
|
Posted: Mon Jan 10, 2005 2:05 am Post subject: Re: Regression analysis -- how-to? |
|
|
[email]korax1214 (AT) mailandnews (DOT) co.uk[/email] wrote in news:1105301500.658864.275730
@c13g2000cwb.googlegroups.com:
| Quote: | Could anyone give me one or more algorithms for performing regression
analysis, calculating the coefficient of correlation of a dataset, or
any related topic of interest? Or give me a pointer as to where
(preferably online) I could find this information?
|
for code, browse the links at the URL in my sig
for algorithms, books are better. the first two books listed
here contain some useful info on regression techniques, with
code examples in plain vanilla pascal:
http://www-rab.larc.nasa.gov/nmp/fNMPbook.htm
--
Mark Vaughan
____________
Visit the Numerical Methods in Pascal web page at
http://www-rab.larc.nasa.gov/nmp/fNMPhome.htm
|
|
| Back to top |
|
 |
korax1214@mailandnews.co. Guest
|
Posted: Mon Jan 10, 2005 7:13 pm Post subject: Re: Regression analysis -- how-to? |
|
|
Maarten Wiltink wrote:
| Quote: | I tried to trim but failed.
The troll has a point that being polar or Carthesian is not a
property of the number, but of its notation. Every complex
number can be expressed both as (x+i*y) for some x and y,
and as r*e^(i*phi) for some r and phi.
|
But that doesn't mean that there's "no such thing". As I already said,
in applied mathematics (especially algorithms) the concrete form of the
data *is* (all-)important. (Incidentally, I was taught to use "theta"
rather than "phi" in the above expression, but that's probably just
another cultural difference; it doesn't mean that either of us are
"wrong".)
| Quote: | Several on-line dictionaries accessible through dictionary.com
seem to agree that "twit" _is_ an insult.
|
Not in British English, it isn't (I've been speaking and writing that
dialect for nearly 50 years); maybe you should find a better online
dictionary. If you do a web/Usenet search (for robert.bak,
korax1214 or robert@fm) you will find several posts where I call
*myself* a twit. :-)
| Quote: | It would also seem that 0.5 and 0.75 are fractions only in the
sense of being between zero and one; they're not in the notation
of one integer divided into another.
|
But "one integer divided into another" is not a fraction in the general
sense; it's specifically a *rational* (a.k.a. solidus) fraction.
According to the Oxford English Dictionary, a fraction generally is
"any number which is not an integer" (and even that definition may be
too narrow, since of course the integers can be considered a special
case of the reals, just as the reals are a subset of the complex
numbers).
| Quote: | As for intelligent replies, I think Tom gave one.
Well, it's one more than I got from sci.trollheim.  |
|
|
| Back to top |
|
 |
Maarten Wiltink Guest
|
Posted: Mon Jan 10, 2005 8:23 pm Post subject: Re: Regression analysis -- how-to? |
|
|
<korax1214 (AT) mailandnews (DOT) co.uk> wrote
| Quote: | Maarten Wiltink wrote:
[...]
The troll has a point that being polar or Carthesian is not a
property of the number, but of its notation. ...
But that doesn't mean that there's "no such thing". As I already
said, in applied mathematics (especially algorithms) the concrete
form of the data *is* (all-)important.
|
Okay, _you_ have a point there. But, as we pedants are fond of saying,
that's just an implementation issue.
| Quote: | (Incidentally, I was taught to use "theta"
rather than "phi" in the above expression, but that's probably just
another cultural difference; it doesn't mean that either of us are
"wrong".)
|
I've seen that. I think it was the manual for my calculator. But in
university, it was all phi IIRC. Somehow, alpha, beta, gamma, phi,
chi, and psi are angles; kappa, lambda, mu, nu, and ksi are linear
parameters. Theta somehow doesn't have the "angle nature" right off.
It doesn't clash but it simply wouldn't be my first pick.
| Quote: | Several on-line dictionaries accessible through dictionary.com
seem to agree that "twit" _is_ an insult.
Not in British English, it isn't (I've been speaking and writing that
dialect for nearly 50 years); maybe you should find a better online
dictionary.
|
I only know the one. I'm still awaiting standardisation of International
English; until then I make do. Any dialect of English is better than
Portuguese - although I _have_ answered the odd message in it.
| Quote: | If you do a web/Usenet search (for robert.bak,
korax1214 or robert@fm) you will find several posts where I call
*myself* a twit.
|
Oh yeah, like that proves anything. Don't we all? Hey, I thought
"twit" wasn't an insult? (-:
[...]
| Quote: | According to the Oxford English Dictionary, a fraction generally is
"any number which is not an integer" ...
|
Too bad I don't own one. I have a Van Dale Groot Woordenboek der
Nederlandse Taal, though, if you ever thirst for the meaning of
"torntoffel"?
Groetjes,
Maarten Wiltink
|
|
| Back to top |
|
 |
Tom de Neef Guest
|
Posted: Mon Jan 10, 2005 10:32 pm Post subject: Re: Regression analysis -- how-to? |
|
|
"Maarten Wiltink" <maarten (AT) kittensandcats (DOT) net> schreef
| Quote: | [...]
According to the Oxford English Dictionary, a fraction generally is
"any number which is not an integer" ...
Too bad I don't own one. I have a Van Dale Groot Woordenboek der
Nederlandse Taal, though, if you ever thirst for the meaning of
"torntoffel"?
"Lastig of raar vrouwspersoon" (difficult or weird female). |
Tom
|
|
| Back to top |
|
 |
Joseph McDonnell Guest
|
Posted: Tue Jan 11, 2005 9:18 am Post subject: Re: Regression analysis -- how-to? |
|
|
[email]korax1214 (AT) mailandnews (DOT) co.uk[/email] wrote:
| Quote: | (Yes, I know that sci.math would be more appropriate for this thread --
were it not for the fact that, the last time I asked an algorithm
question there, the newsgroup's troll replied with a post which started
"there's no such thing as rectangular or polar complex numbers, there
are only complex numbers" (which may be true of *pure* maths[1]
(although I won't believe this until I get confirmation from someone
intelligent) but is definitely *not* true of *applied* maths (e.g.
algorithms) where the distinction between rectangular and polar forms
is very real (pun not intended) and quite important. For instance, the
algorithm for multiplying two rectangular complex numbers is very
different from the algorithm for multiplying two polar complex numbers,
just as the algorithm for multiplying 1/2 by 3/4 is very different from
the algorithm for multiplying 0.5 by 0.75, even though the same pair of
fractions are involved in both cases), and went rapidly downhill from
there. (The idiot in question obviously not only doesn't know what
"twit" means, at least not in British English which is what I speak and
write (it's *not* an insult), but from his reply to my reply to him, he
obviously doesn't even know what "fraction" means.) Hence I am posting
this to a group where I am likely to get *some* intelligent replies --
besides, I already tried sci.math with this question, and it appears
that nobody there is capable of answering it.)
|
You've forgotten Monty Python's Upper Class Twit of the Year Contest.
| Quote: |
Could anyone give me one or more algorithms for performing regression
analysis, calculating the coefficient of correlation of a dataset, or
any related topic of interest? Or give me a pointer as to where
(preferably online) I could find this information?
|
May I ask why you want to do this? Do you want to learn about regression?
Then I suggest you consult a few books. There are lots of books which will
provide you with theory, which, for linear regression, is fairly simple but
is much less so for other forms of regression. Trying to deduce what's
going on from code would be difficult and difficult to generalise to a new
situation.
| Quote: |
I know that there are at least six types of regression analysis
(linear, quadratic, logarithmic, exponential, power and inverse) and at
least two types of linear correlation coefficient (rank and product
moment, IIRC), but I'd like to know the details...
|
I suspect what you mean by 'quadratic' is the inclusion of an x^2 term as
well as an x term. If so, you're still talking about linear regression
('linear' here means linear in the regression parameters, not in the x's).
This might also be the case for the other forms you mention or you could be
talking about different 'links' e.g. y = log(a + b*x). The theory for these
kinds of models is a little more difficult, but you seem to have a maths
(note the spelling) background. I'd recommend Annette Dobson's
"Introduction to Generalized Linear Models".
| Quote: |
I know how to calculate the arithmetic mean and the product/population
standard deviations of a dataset, which I think are at least 70% of
what I need to do linear regression analysis, but I have no idea how to
go beyond this.
|
Basically you also need to calculate the correlation coefficients between
the variables and you have all you need.
| Quote: |
[1] Please don't tell me that the "correct" spelling is "math" (British
English, remember?); "mathematics" is a plural-only word, so one can't
have only one math, any more than one can have only one applau.
|
Even worse, them Yanks say "TOM-MAY-TOE." :-)
Regards
Joseph
|
|
| Back to top |
|
 |
korax1214@mailandnews.co. Guest
|
Posted: Wed Jan 12, 2005 5:37 pm Post subject: Re: Regression analysis -- how-to? |
|
|
Joseph McDonnell wrote:
| Quote: | korax1214 (AT) mailandnews (DOT) co.uk wrote:
I suspect what you mean by 'quadratic' is the inclusion of an x^2
term as
well as an x term. If so, you're still talking about linear
regression
('linear' here means linear in the regression parameters, not in the
x's). |
Well, my calculator offers "quadratic regression analysis" in which the
data are assumed to conform (or to closely conform) to a parabola
(y=a+bx+cx^2), although the manual also says that it can't calculate a
coefficient of correlation for this type (it doesn't say whether this
is because it's not possible, or because it's not feasible on a
calculator), so (in this case at least) quadratic regression doesn't
seem to be derived from linear, as the other four are (on this
calculator at least).
| Quote: | ... you seem to have a maths
(note the spelling) background. I'd recommend Annette Dobson's
"Introduction to Generalized Linear Models".
|
Thanks. (I've saved this thread, apart from this reply of course, so
I'll look up this book ASAP.)
|
|
| Back to top |
|
 |
Alf Christophersen Guest
|
Posted: Wed Feb 09, 2005 11:27 pm Post subject: Re: Regression analysis -- how-to? |
|
|
On 12 Jan 2005 09:37:23 -0800, [email]korax1214 (AT) mailandnews (DOT) co.uk[/email] wrote:
| Quote: | Well, my calculator offers "quadratic regression analysis" in which the
data are assumed to conform (or to closely conform) to a parabola
(y=a+bx+cx^2), although the manual also says that it can't calculate a
coefficient of correlation for this type (it doesn't say whether this
|
The opposite of linear regression is not quadratic or cubic regression
analysis, but nonlinear regression, like
y = a + bx +cxy
To take the simplest case :-)
|
|
| Back to top |
|
 |
korax1214@mailandnews.co. Guest
|
Posted: Fri Feb 11, 2005 9:28 pm Post subject: Re: Regression analysis -- how-to? |
|
|
Alf Christophersen wrote:
| Quote: | On 12 Jan 2005 09:37:23 -0800, [email]korax1214 (AT) mailandnews (DOT) co.uk[/email] wrote:
Well, my calculator offers "quadratic regression analysis" in which
the
data are assumed to conform (or to closely conform) to a parabola
(y=a+bx+cx^2), although the manual also says that it can't calculate
a
coefficient of correlation for this type (it doesn't say whether
this
The opposite of linear regression is not quadratic or cubic
regression
analysis
|
But who said anything about the opposite of linear regression analysis?
I didn't, in the passage you quoted or elsewhere -- I'm asking about
quadratic regression analysis...
|
|
| Back to top |
|
 |
Alf Christophersen Guest
|
Posted: Fri Feb 11, 2005 11:09 pm Post subject: Re: Regression analysis -- how-to? |
|
|
On 11 Feb 2005 13:28:15 -0800, [email]korax1214 (AT) mailandnews (DOT) co.uk[/email] wrote:
| Quote: | (y=a+bx+cx^2), although the manual also says that it can't calculate
But who said anything about the opposite of linear regression analysis?
I didn't, in the passage you quoted or elsewhere -- I'm asking about
quadratic regression analysis...
|
That is the linear regression to the function y=a+bx+cx2 :-)
It is always a linear regresson as long as y is on the left side and
depends only on x, or x and z etc. If y is on both side, it ain't not
any longer a linear regression.
Cubic regression is also a linear regression, but need more sums to be
made :-)
Just enlarge the matrix of constant, x-value, x^2-values of each
dataset with x^2 and evt. x^^3.
Many years ago I did a lot of linear regressions to both such
equations and hyperbolas like y = vx/(k+x) and more complex functions.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|