I am a bit stuck.

I have age startified risk ratios from published data from which i have sampled 10,000 iterations. I have a population census data of the population that i am going to apply the data to.

I effectively want to calculate an overall age standardised risk ratio weighted by the population proportion?

I have provided sample data below

structure(list(age = c("20-29", "30-39", "40-49"), pop_prop = c("0.2", 
"0.3", "0.5"), smpls = list(c("0.549887166573646", "1.06662760919436", 
"1.07106187160684", "0.853150943091018", "0.219922669374338"), 
c("1.00205787604554", "0.73378506481059", "1.25277379884288", 
"0.400571117409361", "0.832445422358434"), c("0.559245921265836", 
"0.9315495664855", "0.453168951982812", "-0.830177080275652", 
"0.459043679345258"))), row.names = c(NA, -3L), class = c("grouped_df", 
"tbl_df", "tbl", "data.frame"), groups = structure(list(age = c("20-29", 
"30-39", "40-49"), .rows = list(1L, 2L, 3L)), row.names = c(NA, 
-3L), class = c("tbl_df", "tbl", "data.frame"), .drop = TRUE))

Each row contains the age group, the population proportion and the nested variable smples which represents the log (RR)

I want to derive interations for an overall age standardised RR weighted by the population proportion.

Can i effectively mutiply the pop_prop * smpls and then add them up?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.