Positive and negative data in a linear regression

moon miner

New Member
Joined
May 11, 2021
Messages
1
Office Version
  1. 2019
Platform
  1. MacOS
Hello everyone,

I am trying to use LINEST function in order to estimate a linear regression. However, I can't make the function work when the Y variable has BOTH positive and negative values.

Say I have the following data:
View attachment 38604

LINEST works fine when all Y values are positive or when they are all negative, but it returns an error when I select both positive and negative data.

Does anyone know why this is and if there is any way I can work around it?

Thanks!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Your above attachment doesn't work.
What error does your formula return?
Instead of using LINEST does it work if you use the regression tool in the DATA Analysis ToolPak? (see link below on how to add if it's not on your ribbon under Data - Data Analysis).
This link also shows some reasons you may get an error.
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,384
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top