vm2_mle | R Documentation |
Maximum likelihood estimation of bivariate von Mises parameters
vm2_mle(data, model = c("vmsin", "vmcos"), ...)
data |
data matrix (if bivarate, in which case it must have two columns) or vector. If outside, the values are transformed into the scale [0, 2π). *Note:* BAMBI cannot handle missing data. Missing values must either be removed or properly imputed. |
model |
Bivariate von Mises model. One of "vmsin", "vmcos" or "indep". |
... |
Additional arguments. See details. |
The parameters kappa1
and kappa2
are optimized
in log scales. The method of optimization used (passed to optim)
can be specified through method
in ...
(defaults to "L-BFGS-B"
). Note, however, that
lower (0) and upper (2*pi) bounds for mu1
and mu2
are specified; so not all methods implemented in optim will work.
An object of class mle-class.
pars <- list(kappa1 = 3, kappa2 = 2, kappa3 = 1.5, mu1 = 0.5, mu2 = 1.5) nsamp <- 2000 model <- "vmsin" set.seed(100) dat_gen <- do.call(paste0("r", model), c(list(n = nsamp), pars)) est <- vm2_mle(dat_gen, model = model) library(stats4) coef(est) vcov(est)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.