ff_se_prod | R Documentation |
This function calculates the standard error for the product of two estimates. An example is if users want to derive the number of people working by multiplying the total population by the percentage of the population that is working.
ff_se_prod(estimate_first, se_first, estimate_second, se_second)
estimate_first |
Point estimate of the first value. |
se_first |
Standard error for the first estimate. |
estimate_second |
Point estimate of the second value. |
se_second |
Standard error for the second estimate |
Reference for calculations: US Census Bureau, A Compass for Understanding and Using ACS Data, October 2008, A-16
The standard error of the derived products.
df <- data.frame(pop = rnorm(n = 10, mean = 100000, sd = 20000), se_pop = rnorm(n = 10, mean = 1000, sd = 200), perc_working = runif(n = 10, min = .6, max = .9), perc_working_se = runif(n = 10, min = .05, max = .2)) # calculate standard errors of the products for each observation ff_se_ratio(df$pop, df$se_pop, df$perc_working, df$perc_working_se) # add columns to dataframe showing products and standard errors of products dplyr::mutate(df, total_working = pop / perc_working, se_total_working = ff_se_prod(pop, se_pop, perc_working, perc_working_se))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.