[R] Possible with lm() or glm()?

From: John Vokey <vokey_at_uleth.ca>
Date: Tue 23 May 2006 - 15:34:49 EST


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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue May 23 15:40:20 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 23 May 2006 - 16:10:16 EST.

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