Skip to content
Prev 132846 / 398502 Next

How to catch data from the different dataframes and lm problem?

What does the variable "test" represent?  It isn't clear from your code 
what it means.  (Currently it looks like a cumulative rate of change of 
concentration with respect to time; are you really sure you want this?)
regression,
Once you have all your "test" values, you probably want to perform a 
regression on all the data, in a single data frame, with "formulation" and 
"subject" as effects, e.g.
lm(test~concentration+formulation+subject, data=df)

If the subjects are drawn from a large population, it is better to 
represent them as random effects in a mixed effects model.
library(nlme)
lme(test~concentration+formulaion, data=df, random=~1|subject)

Regards,
Richie.

Mathematical Sciences Unit
HSL


------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential information intended
for the addressee(s) only. If this message was sent to you in error,
you must not disseminate, copy or take any action in reliance on it and
we request that you notify the sender immediately by return email.

Opinions expressed in this message and any attachments are not
necessarily those held by the Health and Safety Laboratory or any person
connected with the organisation, save those by whom the opinions were
expressed.

Please note that any messages sent or received by the Health and Safety
Laboratory email system may be monitored and stored in an information
retrieval system.
------------------------------------------------------------------------

------------------------------------------------------------------------
This e-mail message has been scanned for Viruses and Content and cleared 
by NetIQ MailMarshal
------------------------------------------------------------------------