Description Usage Arguments Details Value Examples

Fit a regression model for a circular response by maximum likelihood estimation employing the von Mises distribution.

1 2 3 4 5 6 7 8 9 |

`formula` |
a formula expression of the form |

`data` |
an optional data frame containing the variables occurring in the formulas; y has to be given in radians. |

`subset` |
an optional vector specifying a subset of observations to be used for fitting. |

`na.action` |
a function which indicates what should happen when the data
contain |

`model` |
logical. If |

`x, y` |
for |

`z` |
a design matrix with regressors for the concentration. |

`...` |
arguments to be used to form the default |

`control, maxit, start` |
a list of control parameters passed to |

`method` |
The |

`solve_kappa` |
Which kappa solver should be used for the starting values for kappa.
By default a Newton Fourier is used ( |

`gradient` |
logical. Should gradients be used for optimization? If |

`hessian` |
logical or character. Should a numeric approximation of the
(negative) Hessian matrix by |

`circmax`

fits a regression model for a circular response assuming a von Mises distribution.

`circmax_fit`

is the lower level function where the parameters of the von Mises distribution
are fitted by maximum likelihood estimation.

An object of class `"circmax"`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
## Example 1: Simulated Data:
sdat <- circmax_simulate(n = 1000, beta = c(3, 5, 2), gamma = c(3, 3))
(m1.circmax <- circmax(y ~ x1 + x2 | x3, data = sdat))
## Example 2: Periwinkle Dataset of Fisher and Lee, 1992:
require("circular")
distance <- c(107, 46, 33, 67, 122, 69, 43, 30, 12, 25, 37, 69, 5, 83,
68, 38, 21, 1, 71, 60, 71, 71, 57, 53, 38, 70, 7, 48, 7, 21, 27)
directdeg <- c(67, 66, 74, 61, 58, 60, 100, 89, 171, 166, 98, 60, 197,
98, 86, 123, 165, 133, 101, 105, 71, 84, 75, 98, 83, 71, 74, 91, 38, 200, 56)
cdirect <- circular(directdeg * 2 * pi/360)
plot(as.numeric(cdirect) ~ distance, ylim = c(0, 4*pi), pch = 20)
points(as.numeric(cdirect) + 2*pi ~ distance, pch = 20)
(m2.circ <- lm.circular(type = "c-l", y = cdirect, x = distance, init = 0.0))
(m2.circmax <- circmax(cdirect ~ distance, data = data.frame(cbind(distance, cdirect))))
``` |

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.