Lung cancer cases due to radon in Europe: Difference between revisions
Jump to navigation
Jump to search
(→An alternative code for Finland: improved merge) |
|||
Line 56: | Line 56: | ||
<rcode include="page:OpasnetBaseUtils|name:generic"> | <rcode include="page:OpasnetBaseUtils|name:generic"> | ||
############ tidy: a function that | ############ tidy: a function that cleans the tables from Opasnet Base | ||
# data is a table from op_baseGetData function | # data is a table from op_baseGetData function | ||
tidy <- function (data) { | tidy <- function (data) { | ||
data$Result <- ifelse(!is.na(data$Result.Text), as.character(data$Result.Text), data$Result) | data$Result <- ifelse(!is.na(data$Result.Text), as.character(data$Result.Text), data$Result) | ||
data <- data[data$Observation != "Description", !colnames(data) %in% c("id", "obs", "Result.Text")] | data <- data[data$Observation != "Description", !colnames(data) %in% c("id", "obs", "Result.Text")] | ||
return(data) | return(data) | ||
} | } | ||
############### Bring parts of summary table | ############### Bring parts of summary table | ||
# data is the summary table. | # data is the summary table. | ||
summary.bring <- function(data){ | summary.bring <- function(data){ | ||
pages <- levels(data$Page) | pages <- levels(data$Page) | ||
temp <- data[data$Observation != "Description", !colnames(data) %in% c("Result", "Observation")] | ## temp contains the additional information that is not on the actual data table. | ||
temp <- reshape(temp, idvar = "Page", timevar = "Index", direction = "wide") | temp <- data[data$Observation != "Description", !colnames(data) %in% c("Result", "Observation")] | ||
colnames(temp) <- ifelse(substr(colnames(temp), 1, 12) == "Result.Text.", substr(colnames(temp), 13, 50), colnames(temp)) | temp <- reshape(temp, idvar = "Page", timevar = "Index", direction = "wide") | ||
colnames(temp) <- ifelse(substr(colnames(temp), 1, 12) == "Result.Text.", substr(colnames(temp), 13, 50), colnames(temp)) | |||
for(i in 1:length(pages)){ | ## Get all data tables one at a time and combine them. | ||
out <- op_baseGetData("opasnet_base", pages[i]) | for(i in 1:length(pages)){ | ||
out <- tidy(out) | out <- op_baseGetData("opasnet_base", pages[i]) | ||
out <- tidy(out) | |||
cols <- colnames(out)[!colnames(out) %in% c("Observation", "Result")] | |||
out <- reshape(out, timevar = "Observation", idvar = cols, direction = "wide") | |||
colnames(out) <- ifelse(substr(colnames(out), 1, 7) == "Result.", substr(colnames(out), 8, 50), colnames(out)) | |||
out <- merge(temp[temp$Page == pages[i], colnames(temp) != "Page"], out) | |||
colnames( | |||
out <- | ## Check that all data tables have all the same columns before you combine them with rbind. | ||
if(i == 1){out2 <- out} else { | |||
addcol <- colnames(out2)[!colnames(out2) %in% colnames(out)] | |||
if(length(addcol) > 0) { | |||
temp <- as.data.frame(array("*", dim = c(1,length(addcol)))) | |||
colnames(temp) <- addcol | |||
out <- merge(out, temp)} | |||
addcol <- colnames(out)[!colnames(out) %in% colnames(out2)] | |||
if(length(addcol) > 0) { | |||
temp <- as.data.frame(array("*", dim = c(1,length(addcol)))) | |||
colnames(temp) <- addcol | |||
out2 <- merge(out2, temp)} | |||
## Combine data tables. | |||
out2 <- rbind(out2, out)} | |||
} | |||
return(out2) | |||
} | |||
out2 <- rbind(out2, out)} | |||
} | |||
return(out2) | |||
} | |||
########## | ########## | ||
cat("Get data from Opasnet Base.\n") | cat("Get data from Opasnet Base.\n") | ||
library(OpasnetBaseUtils) | library(OpasnetBaseUtils) | ||
library(xtable) | library(xtable) | ||
Line 130: | Line 135: | ||
cat("Run the actual model.\n") | cat("Run the actual model.\n") | ||
concarray <- DataframeToArray(conc) | out$out <- out$ERF * out$Exposure | ||
popxconc <- IntArray(pop, concarray, "Concentration")#[1:1000,,,] | |||
erfarray <- DataframeToArray(erf[,c("obs","Result")]) | #concarray <- DataframeToArray(conc) | ||
popxconcxerf <- IntArray(popxconc, erfarray, "ERF") | #popxconc <- IntArray(pop, concarray, "Concentration")#[1:1000,,,] | ||
lungmortality <- data.frame(popxconcxerf[,c("obs","Country","policy","Year","Age","Sex")], Result = popxconcxerf[,"ERF"] * 58.2 * | #erfarray <- DataframeToArray(erf[,c("obs","Result")]) | ||
popxconcxerf[,"Concentration"] / 100 * popxconcxerf[, "Population"] / 100000) | #popxconcxerf <- IntArray(popxconc, erfarray, "ERF") | ||
#lungmortality <- data.frame(popxconcxerf[,c("obs","Country","policy","Year","Age","Sex")], Result = popxconcxerf[,"ERF"] * 58.2 * | |||
#popxconcxerf[,"Concentration"] / 100 * popxconcxerf[, "Population"] / 100000) | |||
</rcode> | </rcode> | ||
Revision as of 20:39, 2 January 2012
Moderator:Teemu R (see all) |
This page is a stub. You may improve it into a full page. |
Upload data
|
Scope
Mortality due to indoor radon concentrations.
- Spatial: Europe
- Temporal: years 2010-2050
Definition
- Lung cancer cases calculated from radon concentration using <math>cases = relative risk * background rate of cases * concentration * population</math>. RR taken from HEIMTSA and INTARESE (Darby 2004; Darby 2005).
- Background rate of new lung cancers is assumed constant for the whole Europe: 58.2 cases per 100,000 population (Globocan 2008, crude rate).
- Linear no threshold model assumed.
- In a given iteration, radon concentrations are assumed equal in all residences in a country.
Data
Dependencies
- Radon concentrations in European residences
- Population of Europe
- Lung cancer mortality in Europe (from WHO mortality data)
- ERF of radon exposure on lung cancer (heande:ERFs of several pollutants)
Unit
cases per year
Formula
- This code features R functions described on pages Opasnet Base Connection for R and Operating intelligently with multidimensional arrays in R.
An alternative code for Finland
This code uses the summary table approach for obtaining data. The data sources are the same except ERF for long-term indoor exposure to radon and lung cancer (summary table Category:Exposure-response functions) and Exposure to indoor radon in Finland (summary table Category:Exposures).
Result
{{#opasnet_base_link:Op_en4715}}
Year | ||||
---|---|---|---|---|
Policy | 2010 | 2020 | 2030 | 2050 |
BAU | 42691 (22042-95542) | 51138 (24733-111979) | 57618 (25785-137181) | 62461 (27023-143632) |
All | NA | 53385 (25402-130453) | 68338 (28863-171718) | 81873 (31372-239696) |
Biomass | NA | NA | NA | 81849 (32497-218247) |
Insulation | NA | NA | NA | 80534 (32445-236962) |
Renovation | NA | NA | NA | 94075 (35396-288323) |
Country of observation | Mean | SD |
---|---|---|
Austria | 1105 | 1146 |
Belgium | 857 | 796 |
Bulgaria | 303 | 382 |
Switzerland | 1636 | 2835 |
Cyprus | 10 | 14 |
Germany | 4754 | 4305 |
Denmark | 382 | 408 |
Estonia | 222 | 239 |
Spain | 8245 | 15249 |
Finland | 805 | 792 |
France | 8204 | 12176 |
Greece | 857 | 977 |
Hungary | 1583 | 1985 |
Ireland | 533 | 580 |
Italy | 5035 | 5117 |
Lithuania | 223 | 233 |
Luxembourg | 68 | 64 |
Latvia | 229 | 289 |
Malta | 43 | 50 |
Netherlands | 504 | 338 |
Norway | 566 | 667 |
Poland | 2175 | 1864 |
Portugal | 1183 | 1208 |
Romania | 1233 | 1357 |
Sweden | 1353 | 1475 |
Slovakia | 586 | 661 |
Total | 42691 |
See also
Keywords
References
Related files
<mfanonymousfilelist></mfanonymousfilelist>