Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Multivariate multiple linear regression?
Replies: 4   Last Post: Jul 30, 2013 7:53 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Tikkuhirvi Tietavainen

Posts: 94
Registered: 4/22/08
Re: Multivariate multiple linear regression?
Posted: Jul 30, 2013 7:53 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

dpb <none@non.net> wrote in message <kt6iil$dum$1@speranza.aioe.org>...
> On 7/29/2013 10:10 AM, Aino wrote:
> ...
>

> > Thank you for your quick reply! I read the instruction more carefully
> > and you seem to be right, mvregress can do multivariate multiple
> > regression. However, I still need to figure out how to construct the
> > "design matrix".

>
> Well, only you know what you want as the model...
>
> --


I think I thought that the design matrix was something mystical because of the eye-matrix that is part of the design matrix in the mvregress example. I found a function that creates a design matrix from a predictor matrix, x2fx. If 'interaction' is the right model for my case, then does this look right:

x=...;%prediction matrix, n x p
Y=...;%responces matrix, n x d
x=x2fx(x,'interaction');
[Yrow,Ycol]=size(Y);
X=cell(Yrow,1);
for j=1:Yrow
X{j}=[repmat(x(j,:),Ycol,1)];
end
[beta]=mvregress(X,Y);


-Aino



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.