circfit {circtree} | R Documentation |
The function circfit
carries out maximum-likelihood estimation of
parameters for a circular response employing the von Mises distribution.
The parameters can be transformed through link functions but do not depend
on further covariates (i.e., are constant across observations).
circfit(y, weights = NULL, start = NULL, start.eta = NULL, response_range = NULL, vcov = TRUE, type.hessian = c("checklist", "analytic", "numeric"), method = "L-BFGS-B", estfun = TRUE, optim.control = list(), ...)
y |
numeric vector of the response |
weights |
optional numeric vector of case weights. |
start |
starting values for the distribution parameters handed over to |
start.eta |
starting values for the distribution parameters on the link scale handed over to
|
response_range |
either a logical value indicating whether the response should be transformed to its original range (TRUE) or kept on the interval (-pi,pi] or a two-dimensional vector specifying a range of the circular response. |
vcov |
logical. Specifies whether or not a variance-covariance matrix should be calculated and returned. |
type.hessian |
Can either be 'checklist', 'analytic' or 'numeric' to decide how the hessian matrix should be
calculated in the fitting process in |
method |
Optimization which should be applied in |
estfun |
logical. Should the matrix of observation-wise score contributions (or empirical estimating functions) be returned? |
optim.control |
A list with |
... |
further arguments passed to |
The function circfit
fits the parameter of the von Mises distribution to a
circular response variable by applying distfit
.
An object of S3 class circfit
inheriting from class distfit
.
## example on parameter range: sdat.par <- circtree_simulate(response_range = c(-pi, pi)) cf.par <- circfit(sdat.par$y) ## example on response range (0, 2pi): sdat.rad <- circtree_simulate(response_range = c(0, 2*pi)) cf.rad <- circfit(sdat.rad$y) ## example on response range (0, 360): sdat.deg <- circtree_simulate(response_range = c(0, 360)) cf.deg <- circfit(sdat.deg$y)