# likpowbat: Likelihood of the power Batschelet distribution In keesmulder/flexcircmix: Fit Mixtures of Flexible Circular Distributions

## Description

Two functions to obtain the power Batschelet likelihood of a set parameters, given a data set of angles.

## Usage

 ```1 2 3``` ```likpowbat(x, mu, kp, lam, weights = rep(1, length(x)), log = TRUE) likfunpowbat(x, weights = rep(1, length(x)), log = TRUE) ```

## Arguments

 `x` A set of angles in radians. `mu` A mean direction, in radians. `kp` Numeric, > 0,the concentration parameter. `lam` The shape parameter (peakedness), -1 < `lam` < 1. `weights` A vector of length `length(x)`, which gives importace weights to be used for `x`. `log` If `TRUE` (the default), the log-likelihood is used.

## Value

`likpowbat` returns a value, the likelihood given the data and parameters. `likfunpowbat` returns a function of mu, kp and lam, which can be evaluated later for a given set of parameters.

## Functions

• `likfunpowbat`: Return a likelihood function.

## Examples

 ```1 2 3 4 5 6 7 8 9``` ```vm_data <- circglmbayes::rvmc(10, 1, 5) llfun <- likfunpowbat(vm_data) # log-likelihood value of true parameters. llfun(mu = 1, kp = 5, lam = 0) # Plot the conditional log-likelihood. kp_conditional_ll <- Vectorize(function(x) llfun(mu = 1, kp = x, lam = 0)) curve(kp_conditional_ll, 0, 20) ```

keesmulder/flexcircmix documentation built on May 29, 2019, 3:02 a.m.