Likelihoods for Poisson and Gaussian psychometric functions

Share:

Description

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

Usage

1
2
3
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

1
2
3
4
5
6
7
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)