dg2pop | R Documentation |
Standardisation and decomposition of rates over K rate-factors and 2 populations. We suggest using dgnpop, which will internally call this function.
dg2pop(pw, pop, factors, id_vars, ratefunction = NULL, quietly = TRUE)
pw |
dataframe containing two populations worth of factor data, with columns specifying 1) population and 2) each rate-factor to be considered. must have column named "pop" indicating the population ID. |
pop |
name (character string) of variable indicating population |
factors |
names (character vector) of variables indicating compositional factors |
id_vars |
character vector of variables indicating sub-populations |
ratefunction |
user defined character string in R syntax that when evaluated specifies the function defining the rate as a function of factors. if NULL then will assume rate is the product of all factors. |
quietly |
logical indicating whether interim messages should be outputted indicating progress through the P factors |
named list along set of K factors included in the standardisation. Each list element contains a data.frame that includes K-a standardised rates for each population, along with differences between standardised rates
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.