plot_cop_scat {cylcop} | R Documentation |
Scatterplot of Copula Values
Description
This function produces a scatterplot ('ggplot
' object) of
a sample from a copula. Either a sample is provided as input, or a sample
is drawn from a copula to quickly visualize it.
Usage
plot_cop_scat(traj = NULL, u = NULL, v = NULL)
Arguments
traj |
a data.frame containing the trajectory produced by e.g.
|
u |
(alternatively) numeric vector of first components of pseudo-observations or draws from a copula. |
v |
(alternatively) numeric vector of second components of pseudo-observations or draws from a copula. |
Details
Alternatively, instead of plotting a sample from a copula cop
using scatterplot(copula=cop)
, you can also use plot(cop)
.
If a trajectory is provided and n
is smaller than nrow(traj)
,
n
steps are randomly selected from the trajectory and plotted.
Value
A 'ggplot
' object, the scatterplot.
References
Hodel FH, Fieberg JR (2022). “Circular-Linear Copulae for Animal Movement Data.” Methods in Ecology and Evolution. doi:10.1111/2041-210X.13821.
Hodel FH, Fieberg JR (2021). “Cylcop: An R Package for Circular-Linear Copulae with Angular Symmetry.” bioRxiv. doi:10.1101/2021.07.14.452253, https://www.biorxiv.org/content/10.1101/2021.07.14.452253v3/.
See Also
plot_track()
,
plot_joint_circ()
, plot_cop_surf()
, plot_joint_scat()
.
Examples
set.seed(123)
traj <- traj_sim(100,
copula = cyl_quadsec(0.1),
marginal_circ = list(name = "vonmises", coef = list(0, 1)),
marginal_lin = list(name = "weibull", coef = list(shape = 3))
)
plot_cop_scat(traj = traj)
sample <- rcylcop(100,cyl_quadsec(0.1))
plot_cop_scat(u = sample[,1], v = sample[,2])