Estimate sex ratio (R) of females for each sample in a survey. If multple years and/or regions are included in the data then a separate estimate of R can be provided by specifying the columns that correspond to these variables
Estimate_sex_ratio(data, Region = NULL, Time = NULL)
data | A data.frame that contains at least the following columns for number of females, number of males, and total sample size. The function can determine these columns based on similarly named variables. Each line of the data.frame is assumed to be an indvivudal sample |
---|---|
Region | A string containing the column name for a region if desired as a grouping variable |
Time | A string containing the column name for a timestep if desired as a grouping variable |
A data.frame that includes the female sex ratio estimate, variance, standard error and coefficient of variation (CV).