lpois: Likelihoods for Poisson and Gaussian psychometric functions

Description Usage Arguments Details Value Author(s) See Also Examples

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)


Search within the MPDiR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.