lpois {MPDiR}R Documentation

Likelihoods for Poisson and Gaussian psychometric functions

Description

These functions define likelihoods for binomial models with Gaussian or Poisson psychometric functions.

Usage

lpois(p, d)
lpois1(q, p, d)
lnorm(p, d)

Arguments

p

numeric vector of parameters (in lpois and lnorm) or fixed Poisson parameter (lpois2).

d

data frame with number of correct (nyes) and incorrect (nno) responses and intensity levels (Q)

q

numeric vector of length 1 giving scale parameter (lpois2)

Details

These functions calculate the log likelihood for binomial models with Gaussian or Poisson psychometric functions and can be used with optim to find the best parameters.

Value

Returns a numeric value giving minus the log likelihood for the given model.

Author(s)

Kenneth Knoblauch

See Also

See optim

Examples

data(HSP)
SHR2 <- subset(HSP, Obs == "SH" & Run == "R2")
SHR2 <- within(SHR2, {
	nyes <- N * p/100
	nno <- N - nyes
	})
optim(par = c(5, 0.35), lnorm, d = SHR2)

[Package MPDiR version 0.2 Index]