[R] multivariate analysis by using lme

Hui-Ju Tsai h-tsai at northwestern.edu
Mon Aug 21 22:21:50 CEST 2006


Thanks very much for all your comments and suggestions. First, the data in
my previous mail was made up, not real data. I just used it as an example to
state out my problem.

I completely agree that one should do some plot diagnosis and univariate
models before jumping into a multivariate approach. In our real data, we
have several clinical symptoms to define the disease of interest. I have
done normality check and univariate analyses for each symptom separately. It
is common that some predictor is the same risk factor for several symptoms
leading to the disease outcome. Therefore we think that multivariate
analysis may be potential application to take into account multiple testing
issue, and provide some information for the combination of high-related
clinical measures. Except for testing multi-level factor that I had a
problem to get 'lme' work, I have got consistent results for both univariate
and multivariate approaches. However if the results go to different
directions, it will really bother me because it would be hard to explain the
outputs in terms of clinical perspective.

Thanks,
Hui-Ju Tsai



-----Original Message-----
From: hadley wickham [mailto:h.wickham at gmail.com] 
Sent: Monday, August 21, 2006 2:14 PM
To: Spencer Graves
Cc: Hui-Ju Tsai; r-help at stat.math.ethz.ch
Subject: Re: 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)



The contents of this e-mail message and any attachments are private and confidential communications intended solely for the addressee(s) named in this message. If you are not the intended recipient of this message, please 1) immediately notify the sender by reply e-mail and then delete this message and its attachments and 2) do not read, use, distribute disclose or copy this message and/or any attachments.



More information about the R-help mailing list