[R] proc GLM with R
Michael Dewey
info at aghmed.fsnet.co.uk
Tue Dec 19 12:40:09 CET 2006
At 05:15 18/12/2006, Cressoni, Massimo \(NIH/NHLBI\) [F] wrote:
>I want to migrate from SAS to R.
>I used proc mixed to do comparison between multiple groups and to perform
>multiple comparison between groups since, as far as I know, proc
>mixed does not make assumptions about the data and so
>it is better than a simple anova (data must only be normal).
>Es. how can I translate a code like this (two way anova with a factor of
>repetition) :
>
>
>proc mixed;
>class kind PEEP codice;
>model PaO2_FiO2 = kind PEEP kind*PEEP;
>repeated /type = un sub=codice;
>lsmeans kind*PEEP /adjust=bon;
>run;
>
>codice is a unique identifier of patient
>kind is a variable which subdivided the patient (i.e. red or brown hairs)
>PEEP is positive end expiratory pressure. These are the steps of a clinical
>trial. Patient did the trial at PEEP = 5 and PEEP = 10
You could investigate either nlme or lme4
The best documentation for nlme (which should be included in your system) is
@BOOK{pinheiro00,
author = {Pinheiro, J C and Bates, D M},
year = 2000,
title = {Mixed-effects models in {S} and {S-PLUS}},
publisher = {Springer-Verlag},
address = {New York},
keywords = {glm; mixed models}
}
lme4 is a more recent development by Bates which as yet has slightly
fewer helper functions and no book.
Since you are assuming normal error you can use nlme. I am afraid I
do not read SAS so I think it would be wrong of me to try to
translate your example (traddutore, traditore and all that)
>Thank you
>
>Massimo Cressoni
>
>run;
Michael Dewey
http://www.aghmed.fsnet.co.uk
More information about the R-help
mailing list