Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Liner Regression
Replies: 10   Last Post: May 27, 2012 1:47 PM

 Messages: [ Previous | Next ]
 Frank Posts: 115 Registered: 12/27/07
Re: Liner Regression
Posted: May 27, 2012 1:47 PM

dpb <none@non.net> wrote in message <jppf05\$l6b\$1@speranza.aioe.org>...
> On 5/25/2012 7:17 PM, Loukas wrote:
> > dpb <none@non.net> wrote in message <jpp6av\$56a\$1@speranza.aioe.org>...
> >> On 5/25/2012 6:24 PM, Loukas wrote:
> >> ...
> >>

> >> > So what I have to do to get the same results as a excels' ? X is a
> >> > matrix of nXp observations

> >>
> >> Follow the instructions as given directly preceding...
> >>
> >> --

> > I done the following:
> > X = [ones(size(X)) X];

> ...
>
> "...X is a matrix of nXp..."
>
> Ergo, ones(size(X)) is _NOT_ a _column of ones.
>
> --
>

-----------------------------------------------------------------

Since X is [n x p], to end the agony:

X = [ones(n,1) X];

should work.

Note: The google groups posts are still not posting on the TMW Newsreader. This seems to be a google groups problem.

Date Subject Author
5/25/12 Loukas
5/25/12 mjahanbin@gmail.com