[SOLVED] LINEST Yielding #VALUE! Error with intercept

Discuss the spreadsheet application
Post Reply
daddylight
Posts: 3
Joined: Thu Aug 09, 2018 2:56 am

[SOLVED] LINEST Yielding #VALUE! Error with intercept

Post by daddylight »

New to Calc, but long-time Excel user.

Using LINEST, my y array is 1 col x 60 rows. My x array is 3 x 60.

Using 0 for a Linear_type argument yields an intercept of 0 (of course). Using 1 (or TRUE or =TRUE() or anything but 0 - even omitting it) gets me any array full of #VALUE!

I'm sure I'm missing something elementary. I have a couple of workarounds, but I'd like to know how to use the tool I have chosen to work with. Any help would be appreciated. Thank you.
Last edited by robleyd on Fri Aug 10, 2018 1:48 am, edited 3 times in total.
Reason: Add green tick [robleyd, Moderator]
OpenOffice Version 4.1.5 - Windows 10
FJCC
Moderator
Posts: 9280
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: LINEST Yielding #VALUE! Error when asking for intercept

Post by FJCC »

Can you post an example set of data? To upload a file, click Post Reply and look for the Upload Attachment tab just below the box where you type a response.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
MrProgrammer
Moderator
Posts: 4908
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: LINEST Yielding #VALUE! Error when asking for intercept

Post by MrProgrammer »

Hi, and welcome to the forum.
daddylight wrote:Using 0 for a Linear_type argument yields an intercept of 0 (of course). Using 1 (or TRUE or =TRUE() or anything but 0 - even omitting it) gets me any array full of #VALUE!
Calc help wrote:LINEST: Returns a table of statistics for a straight line that best fits a data set.
If that line, without forcing the line to pass through the origin, is vertical, you could get #VALUE! from LINEST. As a simple example, the best fit line through (1,0), (1,1), (1,2) is vertical (slope ∞) passing through 1 on the X-axis, but best fit through the origin has a slope of 1. =LINEST(Y_data;X_data;TRUE) produces #VALUE!. =LINEST(Y_data;X_data;FALSE) produces the array {1;0}. Until you attach a document demonstrating the difficulty (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the document itself) we don't know if that might be the situation here. I realize you are doing multivariate analysis but one can presumably have a parameter estimate of ∞ for some sets of data.
Last edited by MrProgrammer on Thu Aug 09, 2018 8:56 pm, edited 2 times in total.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
daddylight
Posts: 3
Joined: Thu Aug 09, 2018 2:56 am

Re: LINEST Yielding #VALUE! Error when asking for intercept

Post by daddylight »

Problem attached with both versions of LINEST on sheet 5.

Thanks.
Attachments
LINEST Sample.ods
(36.88 KiB) Downloaded 160 times
OpenOffice Version 4.1.5 - Windows 10
User avatar
MrProgrammer
Moderator
Posts: 4908
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: LINEST Yielding #VALUE! Error when asking for intercept

Post by MrProgrammer »

daddylight wrote:Problem attached with both versions of LINEST on sheet 5.
Exclude Octane from your analysis. It is always 87 for this data. This situation is similar to my example where all the X-values were 1.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
daddylight
Posts: 3
Joined: Thu Aug 09, 2018 2:56 am

Re: LINEST Yielding #VALUE! Error when asking for intercept

Post by daddylight »

Yes! Thank you. I did not pick up on that.
OpenOffice Version 4.1.5 - Windows 10
Post Reply