[R] Fwd: linear regression with replication

From: Christof Kluß <ckluss_at_email.uni-kiel.de>
Date: Tue, 24 May 2011 12:17:19 +0200


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

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.

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. Received on Tue 24 May 2011 - 10:20:28 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 24 May 2011 - 11:30:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive