Lung cancer cases due to radon in Europe: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
(→R code) |
||
Line 26: | Line 26: | ||
=== Formula === | === Formula === | ||
==== R code | ==== R code ==== | ||
*This code features R functions described on pages [[Opasnet Base Connection for R]] and [[Operating intelligently with multidimensional arrays in R]]. | *This code features R functions described on pages [[Opasnet Base Connection for R]] and [[Operating intelligently with multidimensional arrays in R]]. | ||
* | *Possible extensions, to accomodate more complex models, are left commented out with # for now. | ||
<nowiki> | <nowiki> | ||
Line 59: | Line 58: | ||
#mort0 <- mort0[,c(3,4,5,6,7,9)] | #mort0 <- mort0[,c(3,4,5,6,7,9)] | ||
pop <- pop[,c(3,4,5,6,7,8)] | pop <- pop[,c(3,4,5,6,7,8)] | ||
conc <- conc[,c(2,3,4,5)] | #conc <- conc[,c(2,3,4,5)] | ||
#mort0array <- DataframeToArray(mort0) | #mort0array <- DataframeToArray(mort0) | ||
levels(pop[,"Age"])[1] <- "All Ages" #Fixed to match mortality format | levels(pop[,"Age"])[1] <- "All Ages" #Fixed to match mortality format | ||
Line 81: | Line 80: | ||
#for (i in list(1=1:5, 2=8:3)) print(i[1]+i[2]) | #for (i in list(1=1:5, 2=8:3)) print(i[1]+i[2]) | ||
k <- 0.37 | k <- 0.37 | ||
lungmortality <- data.frame(popxconc[,c( | lungmortality <- data.frame(popxconc[,c("obs","Country","policy","Year","Age","Rate","Sex")], Result = k * popxconc[, | ||
"Concentration"] / 100 * popxconc[, "Population"] / 100000)</nowiki> | |||
== Result == | == Result == |
Revision as of 09:19, 13 January 2011
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 = impact function * concentration * population</math>. IF taken from HEIMTSA and INTARESE (Darby 2004; Darby 2005).
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 mortality (heande:ERFs of several pollutants), impact function on the same page used for code below.
Unit
cases per year
Formula
R code
- This code features R functions described on pages Opasnet Base Connection for R and Operating intelligently with multidimensional arrays in R.
- Possible extensions, to accomodate more complex models, are left commented out with # for now.
#library(ff) #mortlocs <- op_baseGetLocs("opasnet_base", "Op_en2778") #mort <- op_baseGetData("opasnet_base", "Op_en2778", include = mortlocs[grep("C34|1034|UE15|All Ages", mortlocs$loc),"loc_id"]) #poplocs <- op_baseGetLocs("opasnet_base", "Op_en4691") pop <- op_baseGetData("opasnet_base", "Op_en4691", include = 1367, exclude = c(1435, 1436)) #countries <- c("AT", "BE", "BG", "CH", "CY", "CZ", "DE", "DK", "EE", "ES", "FI", "FR", "GR", "HU", "IE", "IS", "IT", "LT", "LU", # "LV", "MT", "NL", "NO", "PL", "PT", "RO", "SE", "SI", "SK", "UK") countries <- c("Austria", "Belgium", "Bulgaria", "Switzerland", "Cyprus", "Czech Republic", "Germany", "Denmark", "Estonia", "Spain", "Finland", "France", "Greece", "Hungary", "Ireland", "Iceland", "Italy", "Lithuania", "Luxembourg", "Latvia", "Malta", "Netherlands", "Norway", "Poland", "Portugal", "Romania", "Sweden", "Slowenia", "Slovakia", "United Kingdom") conc <- op_baseGetData("opasnet_base", "Op_en4713") levels(pop[,"CountryID"]) <- countries colnames(pop)[4] <- "Country" colnames(pop)[8] <- "Population" #y <- 0 #mort0 <- mort[1,] #temp <- mort[1,] #for (i in 1:length(levels(mort[,"Country"]))) { # icountry <- levels(mort[,"Country"])[i] # temp <- mort[mort[,"Country"] == icountry&mort[,"Age"] == "All Ages"&mort[,"Year"] == as.character(max(as.numeric(as.character(mort[ # mort[, "Country"] == icountry, "Year"])))),] # if(nrow(temp)>0) mort0[(y+1):(y+nrow(temp)),] <- temp[,] # y <- nrow(mort0) #} #mort0 <- mort0[,c(3,4,5,6,7,9)] pop <- pop[,c(3,4,5,6,7,8)] #conc <- conc[,c(2,3,4,5)] #mort0array <- DataframeToArray(mort0) levels(pop[,"Age"])[1] <- "All Ages" #Fixed to match mortality format #popxmort0 <- IntArray(pop, mort0array, "Mortality") #ffpopxmort0 <- ffdf(Age=as.ff(popxmort0[,1]), Country=as.ff(popxmort0[,2]), Rate=as.ff(popxmort0[,3]), Sex=as.ff(popxmort0[,4]), # Year=as.ff(popxmort0[,5]), Population=as.ff(popxmort0[,6]), Cause=as.ff(factor(popxmort0[,7])), List=as.ff(factor(popxmort0[,8])), # Mortality=as.ff(popxmort0[,9])) concarray <- DataframeToArray(conc) #meanconcarray <- apply(concarray, c(2,3), mean) #ffconcarray <- as.ff(concarray) popxconc <- IntArray(pop, concarray, "Concentration") #popxmort0xconc <- IntArray(popxmort0, concarray[1:1000,,]) #y <- 1 #temp <- IntArray(ffpopxmort0[1,], concarray) #ffpopxmort0xconc <- temp[] #for (i in 1:(nrow(ffpopxmort0)%/%5)) { # temp[] <- IntArray(ffpopxmort0[(1+(i-1)*5):(i*5),], concarray) # ffpopxmort0xconc[y:(y+nrow(temp)-1)] <- temp[] # y <- y + nrow(temp) #} #for (i in list(1=1:5, 2=8:3)) print(i[1]+i[2]) k <- 0.37 lungmortality <- data.frame(popxconc[,c("obs","Country","policy","Year","Age","Rate","Sex")], Result = k * popxconc[, "Concentration"] / 100 * popxconc[, "Population"] / 100000)
Result
{{#opasnet_base_link:Op_en4715}}
See also
Keywords
References
Related files
<mfanonymousfilelist></mfanonymousfilelist>