| betabin {sensR} | R Documentation |
Fits the beta binomial model to data.
betabin(data, start = c(.5,.5), method = c("mu-gamma", "alpha-beta"),
vcov = TRUE, ...)
## S3 method for class 'betabin':
summary(object, alpha=.05, ...)
object |
an object of class "betabin", ie. the result of
betabin(). |
alpha |
the allowed type I error for confidence intervals |
data |
matrix or data.frame with two columns; first column contains the number of success and the second the total numnber of cases. The number of rows should correspond to the number of observations. |
start |
starting values to be used in the optimization |
vcov |
logical, should the variance-covariance matrix of the parameters be computed? |
method |
The desired representation. Note that while the "mu-gamma" is often the most natural and easiest to interpret, it can cause convergence problems when overdispersion is close to non-existence. |
... |
additional arguments passed to optim in
betabin. Not used in summary.betabin. |
The following additional methods are implemented objects of class
betabin:
print, vcov, logLik and coef.
An object of class betabin with elements
coef |
named vector of coefficients |
vcov |
variance-covariance matrix of the parameter estimates |
data |
a named vector with the data supplied to the function |
call |
the matched call |
logLik |
the value of the log-likelihood at the MLEs |
method |
the method used for the fit |
convergence |
0 indicates convergence. For other error messages,
see ?optim. |
message |
possible error messsage - see ?optim for
details |
counts |
the number of iterations used in the optimization - see
?optim for details |
Rune Haubo B Christensen
Brockhoff, P.B. (2003). The statistical power of replications in difference tests.
triangle, twoAFC,
threeAFC, duotrio,
discrimPwr, discrimSim,
discrimSS, samediff,
AnotA, findcr
## 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 = "mu-gamma")) summary(bb) vcov(bb) logLik(bb) AIC(bb) coef(bb)