Bug in line(X,Y)
Jan 11, 2010
03:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Jan 11, 2010
03:00 AM
Bug in line(X,Y)
Hello.
I did a quick search and didn't come across a post that covered this bug in line(X,Y). If the vector Y holds all-zeros then the line function (linear regression) fails. Oddly, the error message varies.
In some cases the message is:
"The calculation resulted in a vector with no elements."
In more cases, the message reads:
"Object reference not set to an instance of an object."
- Guy
I did a quick search and didn't come across a post that covered this bug in line(X,Y). If the vector Y holds all-zeros then the line function (linear regression) fails. Oddly, the error message varies.
In some cases the message is:
"The calculation resulted in a vector with no elements."
In more cases, the message reads:
"Object reference not set to an instance of an object."
- Guy
Labels:
- Labels:
-
Other
1 REPLY 1
Jan 11, 2010
03:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Jan 11, 2010
03:00 AM
That's an obscure bug! It works fine if Y is a vector with all the elements identical, unless all the elements are 0. The slope, intercept, and medfit functions all work even if Y is all zeros.
As you say, a weird error message too!
Richard
As you say, a weird error message too!
Richard
