Re: [R] multivariate analysis by using lme

From: hadley wickham <>
Date: Tue 22 Aug 2006 - 05:14:19 EST

> 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:

The plot was created using the following code:

s <- read.table("~/Desktop/sample.txt", header=T) s <- rename(s, c(two="value"))
s$res2 <- NULL
s <-, ... ~ res1))

qplot(X0, X1, c1 ~ c2, data=s, shape=factor(inter))

(note that you will need the latest version of ggplot available from mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code.
Received on Tue Aug 22 05:18:49 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 22 Aug 2006 - 10:21:57 EST.

Mailing list information is available at Please read the posting guide before posting to the list.