[R] canonical correlation

John Fox jfox at mcmaster.ca
Sun Jul 13 16:14:23 CEST 2014


Dear Raghuraman and Monaly,

Why would one want to do canonical correlation with a single Y variable? The canonical correlation is just the R^2 from the LS regression of Y on the Xs.

Best,
 John

------------------------------------------------
John Fox, Professor
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/
	
	
On Sun, 13 Jul 2014 09:00:52 +0100
 Raghuraman Ramachandran <optionsraghu at gmail.com> wrote:
> Try package CCA.
> 
> 
> On Sat, Jul 12, 2014 at 11:13 PM, Monaly Mistry <monaly.mistry at gmail.com>
> wrote:
> 
> > Hi,
> >
> > I was wondering if it's possible in R to do a canonical correlation with
> > only one dependent variable and several independent variables.
> >
> > I've tried using cc(X,Y) but I got an error message. In this case I had 1
> > dependent variable and 10 independent variables.
> >
> > Error in cor(X, use = "pairwise") :
> >   supply both 'x' and 'y' or a matrix-like 'x'
> >
> > When I use two dependent variables I don't get the error message.
> >
> > Best,
> >
> > Monaly.
> >
> >         [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list