[R] Figuring out the right formula

Turgut Durduran durduran at yahoo.com
Wed Nov 1 18:12:40 CET 2006


This question is bugging me because of my ignorance on the subject. I can't even figure out what to read to understand it. 

I am trying to start an lme or nlme analysis of some data but I can't figure out the right formula to use. The data has the following structure:

1) A measurement , say "y"  was made at 5 different angles ("A") on few days ("d") on the ith subject on location "x" (two possibilities). Both locations were measured on all subjects but not all angles or all days were measured.

2) Everything is in a table. I tried creating "groupedData" using a variety of formulas and played with the trellis plots to investigate whether my formula seem to be entered right, so I tried:

y ~  A/d | i/x 
y ~  A | i/x/d
y ~ A*d | i/x

My problem is  I can't figure out the proper way to say y depends on both A and d and is grouped by subject (i) and  location (x).

Any help with this particular formula and any pointers to a tutorial/text on this type of formulas would be greatly appreciated.



More information about the R-help mailing list