lugtigheid / quickpsy

quickly fits and plots psychometric functions for multiple conditions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

quickpsy is an R package developed by Daniel Linares and Joan López-Moliner to quickly fit and plot psychometric functions for multiple conditions. It makes an extensive use of Hadley Wickham's packages ggplot2 and dplyr.

To understand the fundamentals of fitting psychometric functions in R, we recommend the book Modeling Psychophysical Data in R.

Features

  • Fits and plots multiple conditions with minimal coding.

  • Exploits the computational speed of dplyr.

  • The user does not need to introduce initial parameters.

  • Calculates parametric and non-parametric bootstrap confidence intervals.

  • Guess and lapses can be fixed or free as parameters.

  • Fits cumulative normal, logistic, weibull functions or any function defined by the user.

  • Facilitates the reading of several data files.

  • The optimization can call DEoptim which uses differential evolution optimization.

Install

Download and install R (we also recommend Rstudio).

In R, install the following packages: boot, DEoptim, dplyr, ggplot2, tidyr and devtools.

install.packages('boot')
install.packages('DEoptim')
install.packages('tidyr')
install.packages('devtools')

Install quickpsy from github (will also install dplyr and ggplot2) and load the package

install_github('danilinares/quickpsy')

Example

library(quickpsy)
library(MPDiR) # contains the Vernier data; use ?Venier for the reference

fit <- quickpsy(Vernier, Phaseshift, NumUpward, N, 
                grouping = .(Direction, WaveForm, TempFreq))
plotcurves(fit)
plotpar(fit)
plotthresholds(fit)

Help

To obtain information and examples for specific functions use ?

?plotcurves

For further information visit www.dlinares.org/quickpsy.html

Other R packages

About

quickly fits and plots psychometric functions for multiple conditions


Languages

Language:R 99.5%Language:Rebol 0.5%