Page 1 of 1

[Solved+Issue] Polynomial regression

Posted: Mon Mar 31, 2008 3:17 pm
by calcuser
Hello,
I've been looking for an option to create a polinomial regression from a chart graph. I've found a linear one, exponential, logaritmical and potential, but I want a second degree polinomial regression, as my points describe a parabola.

Could someone help me, please?

Thanks in advance,[*]

Re: polinomial regression

Posted: Mon Mar 31, 2008 3:34 pm
by acknak
It's not supported in OOo. See Issue 20819: add polynomial regression type.

You can register there and add a vote (up to two) and/or a comment.

Re: polinomial regression

Posted: Mon Mar 31, 2008 4:35 pm
by Villeroy
Quick simple demo attached.
2014-06-15 new version because of sloppy formula in C which had become incompatible.

Re: polinomial regression

Posted: Mon Mar 31, 2008 5:59 pm
by acknak
Very nice example Villeroy!

Two questions for you:
1) When you calculate the regression values (column labeled "R"), you don't include the zero-order parameter (-6.91). Why not?
2) what the heck is the thing that shows the regression equation? I ungrouped the chart and the equation; I can edit the chart, and I can edit the text of the equation, but I can't move the equation or change the border--what is that thing?

Re: polinomial regression

Posted: Mon Mar 31, 2008 6:07 pm
by Villeroy
1) I forgot
2) It is a form control. A text box, linked to the cell at the far right. Get toolbar "Form Controls", turn on edit mode, right-click the box, context-menu:"Control...", tab:"Data".

Re: polinomial regression

Posted: Mon Mar 31, 2008 6:29 pm
by acknak
Forgot what? ;-)

I think I've got it now--Thanks!

Re: polinomial regression

Posted: Mon Mar 31, 2008 6:35 pm
by Villeroy
I forgot to include the factor in my equation.
D2: =$F$1*$A2^2+$A2*$G$1+$H$1
I'm going to replace the attachment now.

Re: polinomial regression

Posted: Mon Mar 31, 2008 7:00 pm
by calcuser
Thank you very much, Villeroy and Acknak!!

I still don't understand very much why you must construct a column with x^2 (I guess it is to indicate the program you want a 2nd degree equation, but it's not very intuitive...).

And besides, why it is not explained in the help file? Wouldn't it be better to add the option in the wizard window for regressions?

Thanks again!!

Re: polinomial regression

Posted: Mon Mar 31, 2008 7:18 pm
by Villeroy
Just give a try. Insert a column in C, label C1 "X3" with =$A2^3, copy down.
Reenter the LINEST array.

Code: Select all

{=LINEST($D$2:$D$26;$A$2:$C$26)}
It will expand to 4 columns.
The R-formula, now in E2:

Code: Select all

=$G$1*$A2^3+$A2*$H$1^2+$I$1*$A2+$J2
copy down.
Drag the decimal separator and the "y = ..." aside, copy I2 to J2 and adjust the formula-formula to:

Code: Select all

="y = "&$G2&"*x^3 "&$H2&"*x^2 "&$I2&"*x "&$J$2

Re: polinomial regression

Posted: Mon Mar 31, 2008 7:24 pm
by calcuser
you're right, I was just wondering how I'll explain in a simple way to my teenager students why you must add that column. I want to avoid the Excel "Add a trendline" option, but we must recognize it's much simplier to explain.

Thanks again, i'll put the "solved" tag in the title.