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

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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,523
Messages
6,120,047
Members
448,940
Latest member
mdusw

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