Description Objects from the Class Slots Methods Details on the confint method Examples

This class encapsulates results of a generic maximum likelihood procedure.

Objects can be created by calls of the form `new("mle2", ...)`

, but
most often as the result of a call to `mle2`

.

`call`

:(language) The call to

`mle2`

.`call.orig`

:(language) The call to

`mle2`

, saved in its original form (i.e. without data arguments evaluated).`coef`

:(numeric) Vector of estimated parameters.

`data`

:(data frame or list) Data with which to evaluate the negative log-likelihood function

`fullcoef`

:(numeric) Fixed and estimated parameters.

`vcov`

:(numeric matrix) Approximate variance-covariance matrix, based on the second derivative matrix at the MLE.

`min`

:(numeric) Minimum value of objective function = minimum negative log-likelihood.

`details`

:(list) Return value from

`optim`

.`minuslogl`

:(function) The negative log-likelihood function.

`optimizer`

:(character) The optimizing function used.

`method`

:(character) The optimization method used.

`formula`

:(character) If a formula was specified, a character vector giving the formula and parameter specifications.

- coef
`signature(object = "mle2")`

: Extract coefficients. If`exclude.fixed=TRUE`

(it is`FALSE`

by default), only the non-fixed parameter values are returned.- confint
`signature(object = "mle2")`

: Confidence intervals from likelihood profiles, or quadratic approximations, or root-finding.- show
`signature(object = "mle2")`

: Display object briefly.- show
`signature(object = "summary.mle2")`

: Display object briefly.- summary
`signature(object = "mle2")`

: Generate object summary.- update
`signature(object = "mle2")`

: Update fit.- vcov
`signature(object = "mle2")`

: Extract variance-covariance matrix.- formula
`signature(object="mle2")`

: Extract formula- plot
`signature(object="profile.mle2,missing")`

: Plot profile.

When the parameters in the original fit are constrained using
`lower`

or `upper`

, or when `prof.lower`

or
`prof.upper`

are set, and the confidence intervals lie
outside the constraint region, `confint`

will return `NA`

.
This may be too conservative – in some cases, the appropriate
answer would be to set the confidence limit to the lower/upper
bound as appropriate – but it is the most general answer.

(If you have a strong opinion about the need for a new
option to `confint`

that sets the bounds to the limits
automatically, please contact the package maintainer.)

1 2 3 4 5 6 7 8 9 10 11 | ```
x <- 0:10
y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)
lowerbound <- c(a=2,b=-0.2)
d <- data.frame(x,y)
fit1 <- mle2(y~dpois(lambda=exp(a+b*x)),start=list(a=0,b=2),data=d,
method="L-BFGS-B",lower=c(a=2,b=-0.2))
(cc <- confint(fit1,quietly=TRUE))
## to set the lower bounds to the limit
na_lower <- is.na(cc[,1])
cc[na_lower,1] <- lowerbound[na_lower]
cc
``` |

```
Loading required package: stats4
2.5 % 97.5 %
a 2.814052 3.35794665
b NA -0.09444112
Warning messages:
1: In mle2(minuslogl = function (a = NULL, b = NULL) :
convergence failure: code=52 (ERROR: ABNORMAL_TERMINATION_IN_LNSRCH)
2: In mle2(minuslogl = function (a = NULL, b = NULL) :
convergence failure: code=52 (ERROR: ABNORMAL_TERMINATION_IN_LNSRCH)
2.5 % 97.5 %
a 2.814052 3.35794665
b -0.200000 -0.09444112
```

bbmle documentation built on Nov. 17, 2017, 6:42 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.