Description Usage Arguments Value Source Examples
View source: R/simdata.R View source: R/functions.R
This function simulates data for the mate preference model described by Clancey, Johnson, Harmon, and Hohenlohe (2021).
1 |
alpha |
Value of the alpha parameter. |
delta |
Value of the delta parameter. |
mx |
Value of the mean of the X trait. |
my |
Value of the mean of the Y trait. |
sx |
Value of the standard deviation of the X trait. |
sy |
Value of the standard deviation of the Y trait. |
np |
Number of paired observations of X and Y. |
nx |
Number of unpaired observations of X. |
ny |
Number of unpaired observations of Y. |
gamma |
Value of the gamma parameter (defaults to one). |
The function returns a list of four vectors consisting of the paired observations of X and Y (xp
and yp
, respectively), and the unpaired observations of X and Y (x
and y
, respectively).
Clancey, E., Johnson, T. R., Harmon, L. J., and Hohenlohe, P. A. Estimation of the strength of mate preference from mated pairs observed in the wild. Unpublished manuscript.
1 | mydata <- simdata(0.5, 0, 50, 52, 1, 1, 100, 50, 50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.