lpois | R Documentation |
These functions define likelihoods for binomial models with Gaussian or Poisson psychometric functions.
lpois(p, d)
lpois1(q, p, d)
lnorm(p, d)
p |
numeric vector of parameters (in |
d |
data frame with number of correct ( |
q |
numeric vector of length 1 giving scale parameter ( |
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.
Returns a numeric value giving minus the log likelihood for the given model.
Kenneth Knoblauch
See optim
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.