betabin(data, start = c(.5,.5),
method = c("duotrio", "threeAFC", "twoAFC", "triangle"),
vcov = TRUE, corrected = TRUE, gradTol = 1e-4, ...)
## S3 method for class 'betabin':
summary(object, level = 0.95, ...)betabin().betabin: The only recognized (hidden) argument is
doFit (boolean) which by default is TRUE. When
FALSE betabin returns an environment which facilitates
examination of the likebetabin with elementsvcov = TRUEoptim.optim for
detailsoptim for detailsbeta,
$N$ is the number of independent binomial observations, i.e. the
number of rows in data, and $p_g$ is the guessing
probability, pGuess.
The variance-covariance matrix (and standard errors) is based on the
inverted Hessian at the optimum. The Hessian is obtained with the
hessian function from the numDeriv package.
The gradient at the optimum is evaluated with gradient from the
numDeriv package.
The bounded optimization is performed with the "L-BFGS-B" optimizer in
optim.
The following additional methods are implemented objects of class
betabin: print, vcov and logLik.triangle, twoAFC,
threeAFC, duotrio,## Create data:
x <- c(3,2,6,8,3,4,6,0,9,9,0,2,1,2,8,9,5,7)
n <- c(10,9,8,9,8,6,9,10,10,10,9,9,10,10,10,10,9,10)
dat <- data.frame(x, n)
(bb <- betabin(dat, method = "duotrio"))
(bb <- betabin(dat, corrected = FALSE, method = "duotrio"))
summary(bb)
vcov(bb)
logLik(bb)
AIC(bb)
coef(bb)Run the code above in your browser using DataLab