next up previous contents home.gif
Next: Example Code: mrop() Up: A Nonparametric Approach Previous: Definition   Contents

Example Code: anchors()

This example again first loads the library and example dataset, and then anchors() calculates $ C$ for each individual. In the non-parameteric estimation, only one self-question and corresponding set of vignettes are analyzed at a time.
library(anchors)
data(poleff)
C <- anchors(xsayself ~ xsay1 + xsay2 + xsay3 + xsay4 + xsay5, data = poleff)
The names of vignettes must be passed to the function in the same order as the direction of the responses. In the example, xsay5 is in the same (lowest) direction as the response category 1, while the xsay1 is in the same direction (highest) as the last response category. If anchors produces many ties you should check that you passed the vignettes in the correct order.



RBuild autobuild user 2010-09-02