Description Usage Arguments Value Functions Examples
View source: R/InvBatschelet.R
Two functions to obtain the inverse Batschelet likelihood of a set parameters, given a data set of angles.
1 2 3 |
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 < |
weights |
A vector of length |
log |
If |
likinvbat
returns a value, the likelihood given the data and
parameters. likfuninvbat
returns a function of mu, kp and lam, which
can be evaluated later for a given set of parameters.
likfuninvbat
: Return a likelihood function.
1 2 3 4 5 6 7 8 9 | vm_data <- circglmbayes::rvmc(10, 1, 5)
llfun <- likfuninvbat(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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.