[R] Fwd: linear regression with replication

Christof Kluß ckluss at email.uni-kiel.de
Tue May 24 12:17:19 CEST 2011


Probably the question fits better in the lme4 mailing list, so I
forwarded it.

-------- Original-Nachricht --------
Betreff: linear regression with replication
Datum: Mon, 23 May 2011 16:31:54 +0200
Von: Christof Kluß <ckluss at email.uni-kiel.de>
An: <r-help at stat.math.ethz.ch>
Newsgruppen: gmane.comp.lang.r.general

Hi,

we want to calculate a linear regression that results from three test
series. (The "Average linear regression" over 3 replication.)
Each test serie consists of the values ​​for 3 times (0min, 25min,
50min) and is repeated three times.

We need such a regression for each combination of subject and day for a
file like this:

   subject time       date replication value
1        A    0 2011-01-01           1   0.2
2        A   25 2011-01-01           1   0.3
3        A   50 2011-01-01           1   0.4
4        A    0 2011-01-01           2   0.2
5        A   25 2011-01-01           2   0.2
6        A   50 2011-01-01           2   0.3
7        A    0 2011-01-01           3   0.3
8        A   25 2011-01-01           3   0.4
9        A   50 2011-01-01           3   0.5
...             2011-01-02  ...
...             2011-01-02  ...
                2011-01-02
[...]
         B

Can you give us a hint how the R-file could look for this example? We
think that we should choose the library "nlme" and the command "lme". We
are interested in the slope and intercept for each combination of
subject and date.

Greetings
Christof

______________________________________________
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