[R] Possible with lm() or glm()?
John Vokey
vokey at uleth.ca
Tue May 23 07:34:49 CEST 2006
HelpeRs,
I have what amounts to a stupid design---entirely my fault, but it
seemed like a good idea at the time. Every participant in the
experiment receives a series of a two-alternative forced-choice
(2afc) pairs generated at random from a pool of items that make up
the pairs. The independent variable of interest is the difference in
the 2afc pairs on a metric measure to predict 2afc accuracy. For
each participant, the 2afc pairs are generated at random (without
replacement) from set of items. This approach means that for any
participant there are 40 2afc trials in which the independent
variable varies at random from differences of 0 to some large
absolute difference. The problem is that that because of the random
construction of the pairs there is no consistent variation in the IV
over participants (e.g., some participants contribute a high
frequency of judgements on small difference pairs, others on large
difference pairs, etc.). What I want is the relationship between the
IV (pair differences on the metric measure) and 2afc accuracy, with
the variation due to the random assignment of pair differences to
participants removed. To do so, I want to compute the residuals
relating IV differences to 2afc accuracy after participant variation
(relating to the covariation with absolute difference) is removed.
So, I don't want to remove participant variation per se, bit only
that arising from the covariation of participant with IV pair
difference. Ultimately, I want to plot the psychometric function,
complete with some variant of confidence intervals. I hope that is
clear. So, is there some approach within lm() or glm() that will
provide for this? Any ideas? To make it concrete, imagine I have a
data frame consisting of participant as a factor, absolute pair
difference within participant as the vector IV and response (correct/
incorrect) as the vector DV. [The actual design is more complex, but
this simple structure captures my concern.]
--
Please avoid sending me Word or PowerPoint attachments.
See <http://www.gnu.org/philosophy/no-word-attachments.html>
-Dr. John R. Vokey
More information about the R-help
mailing list