This package contains a collection of R functions for the analysis of psychophysical data in R.It is based on lme4.0. You can download the package by clicking here or on MERpsychophysics R code in the Blogroll.

Together with the r-files, you should also receive a copy of the GNU Public License (LICENSE.txt) and the reference manual (MERpsychophysics_Reference_Manual.pdf). In order to load the package on your current R workspace, you should:

  1. Unzip the MERpsychophysics.0 folder, if necessary.
  2. Put the MERpsychophysics.0 folder in your favorite path (e.g. “/Users/alessandro”)
  3. Open the R session, and type: setwd(“my path/MERpsychophysics.0”) – for example, setwd(“/Users/alessandro/MERpsychophysics.0”)
  4. Type: source(“MERpsychophysics.r”)
  5. Use again the setwd function in order to change the working directory. For example: setwd(“my path/my data folder”). If you don’t change the working directory, all exported file will be saved in MERpsychophysics.0 folder.
  6. Have fun with it! If is the first time you use the package, you might want to open the file MERdemo.r and see some examples.

It is necessary to repeat steps 3-4 at each new working session – or simply write the the two command lines at the beginning of your R script. The first time you use the MERpsychophysics, remember to install all the R packages indicated in the Reference Manual.

The code provides the following tools for the analysis of psychophysical data with the Generalized Linear Mixed Model (GLMM):

  • Estimate of PSE and JND and their confidence interval with Bootstrap Method
  • Estimate of PSE and JND and their variance with Delta Method
  • GLMM plotting

The CRAN package lme4.0 is used for GLMM fitting. This package is widely used in the statistical community for the analysis of clustered data. Please, refer to the CRAN and to the lme4 web-page for further details on this package (you will find all the links here). The MERpsychophysics.0 is compatible with the version of lme4.0 (not with the the current CRAN version version lme4.1). See here to install lme4.0 (if you are running on OS X Maverick see also here).

The code is in a beta release, I am considering to write it as CRAN package later on – any feedback is welcome!

Contacts details are in the Blogroll.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: