[R] multivariate analysis by using lme

Berton Gunter gunter.berton at gene.com
Mon Aug 21 23:58:12 CEST 2006


FWIW, a small story.

Many a moon ago, I had the great good fortune and honor of driving John
Tukey to periodic consulting sessions at Merck (talk about precious cargo!).
So I got to chat with him about stuff. Basically for the reasons already
elaborated, he also had no use for multivariate methods; but of course when
**HE** elaborated, one paid attention.

Cheers,

-- Bert Gunter

No I'm not expressing an opinion. The discussion just reminded me...
 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of hadley wickham
> Sent: Monday, August 21, 2006 12:14 PM
> To: Spencer Graves
> Cc: r-help at stat.math.ethz.ch; Hui-Ju Tsai
> Subject: Re: [R] multivariate analysis by using lme
> 
> >        Only after doing the best I could with univariate 
> modeling would
> > I then consider multivariate modeling.  And then I'd want 
> to think very
> > carefully about whether the multivariate model(s) under 
> consideration
> > seemed consistent with the univariate results -- and what else they
> > might tell me that I hadn't already gotten from the 
> univariate model.
> >  If you've already done all this, I'm impressed.  In the 
> almost 30 years
> > since I realized I should try univariate models first and work up to
> > multivariate whenever appropriate, I've not found one 
> application where
> > the extra effort seemed justified.  R has made this much 
> easier, but I'm
> > still looking for that special application that would 
> actually require
> > the multivariate tools.
> 
> To add to Spencer's comments, I'd strongly recommend you look at your
> data before trying to model it.  The attached graph, a scatterplot of
> res1 vs res2 values conditional on c1 and c2, with point shape given
> by inter, reveals many interesting features of your data:
> 
>  * res1 and res2 values are highly correlated
>  * inter is constant for a given c1 and c2
>  * there are between 1 and 3 points for each level of inter - not very
> many and I don't think enough to investigate what the effect of inter
> is
> 
> The plot was created using the following code:
> 
> library(ggplot)
> s <- read.table("~/Desktop/sample.txt", header=T)
> s <- rename(s, c(two="value"))
> s$res2 <- NULL
> s <- as.data.frame(cast(s, ... ~ res1))
> 
> 
> qplot(X0, X1, c1 ~ c2, data=s, shape=factor(inter))
> 
> (note that you will need the latest version of ggplot available from
> http://had.co.nz/ggplot)
>



More information about the R-help mailing list