[Solved+Issue] Polynomial regression

Discuss the spreadsheet application
Post Reply
calcuser
Posts: 3
Joined: Mon Mar 31, 2008 3:12 pm

[Solved+Issue] Polynomial regression

Post 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,[*]
Last edited by calcuser on Mon Mar 31, 2008 7:25 pm, edited 1 time in total.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: polinomial regression

Post 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.
AOO4/LO5 • Linux • Fedora 23
User avatar
Villeroy
Volunteer
Posts: 31346
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: polinomial regression

Post by Villeroy »

Quick simple demo attached.
2014-06-15 new version because of sloppy formula in C which had become incompatible.
Attachments
polycurve.ods
(20 KiB) Downloaded 1499 times
Last edited by Villeroy on Sun Jun 15, 2014 1:08 pm, edited 2 times in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: polinomial regression

Post 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?
AOO4/LO5 • Linux • Fedora 23
User avatar
Villeroy
Volunteer
Posts: 31346
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: polinomial regression

Post 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".
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: polinomial regression

Post by acknak »

Forgot what? ;-)

I think I've got it now--Thanks!
AOO4/LO5 • Linux • Fedora 23
User avatar
Villeroy
Volunteer
Posts: 31346
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: polinomial regression

Post 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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
calcuser
Posts: 3
Joined: Mon Mar 31, 2008 3:12 pm

Re: polinomial regression

Post 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!!
User avatar
Villeroy
Volunteer
Posts: 31346
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: polinomial regression

Post 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
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
calcuser
Posts: 3
Joined: Mon Mar 31, 2008 3:12 pm

Re: polinomial regression

Post 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.
Post Reply