Difference between revisions of "Training health impact"

From Testiwiki
Jump to: navigation, search
(updated based on new structure)
(Explanations: the whole section is outdated and removed)
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
[[Category:Costs and valuations]]
 
[[Category:Costs and valuations]]
 
[[Category:Opasnet training]]
 
[[Category:Opasnet training]]
 +
[[Category:Contains R code]]
 
{{variable|moderator=Jouni|stub=Yes}}
 
{{variable|moderator=Jouni|stub=Yes}}
  
Line 9: Line 10:
 
== Answer ==
 
== Answer ==
  
<rcode  
+
<rcode graphics=1>
name="answer"
 
label="Run code"
 
graphics="1"
 
include="
 
page:Opasnet_(R_library)|name:answer|
 
page:Training_health_impact|name:formula|
 
page:Training_exposure|name:formula
 
"
 
variables="name:population|description:What is the size of the population|default:100000"
 
>
 
  
cat("Initiation successful. Now starting the model.\n")
+
library(OpasnetUtils)
 +
library(ggplot2)
  
out <- make.ovariable(
+
objects.latest("Op_en5675", code_name = "initiate") # [[Training health impact]]
name        = "health.impact",
 
data        = fetch("Op_en5675"),
 
formula      = formula.Op_en5675,
 
dependencies = dependencies.Op_en5675)
 
  
print(out)
+
health_impact <- EvalOutput(health_impact)
plot(out)
+
 
 +
oprint(summary(health_impact))
 +
 
 +
ggplot(health_impact@output, aes(x = health_impactResult, colour = Year)) +
 +
geom_density() +
 +
facet_grid(Trait ~ Year) +
 +
theme_grey(base_size = 24)
  
 
</rcode>
 
</rcode>
Line 38: Line 32:
 
===Data===
 
===Data===
  
<t2b index="Year,Observation" locations="Unit,Result,Description" unit="-">
+
<t2b index="Trait" obs="Result" desc="Description" unit="cases /(µg/m3) /a">
2012|cases/year|10 - 100|
+
Respiratory disease|20 - 30|
2020|cases/year|15 - 150|
 
 
</t2b>
 
</t2b>
  
===Formula===
+
===Dependencies===
 +
 
 +
* [[Training exposure]]
 +
 
 +
===Calculations===
  
<rcode  
+
<rcode label="Initiate ovariable" name="initiate">
name="formula"  
 
label="Initiate functions"  
 
>
 
  
exposure <- fetch("Op_en5674")
+
library(OpasnetUtils)
erf <- data.frame(Unit = "RR per ug/m3", Result = 1.5)
 
  
background <- 100 / 100000 # cases per 100000 person-years
+
health_impact <- Ovariable("health_impact",
 +
dependencies = data.frame(Name = "exposure", Ident = "Op_en5674/initiate"), # [[Training exposure]] exposure
 +
formula = function(...) {
 +
ERF <- Ovariable("ERF", ddata = "Op_en5675") # [[Training health impact]]
 +
colnames(ERF@data) <- gsub("[ \\.]", "_", colnames(ERF@data))
  
dependencies.Op_en5675 <- data.frame(
+
out <- exposure * ERF
Name = "",
+
 
Identifier = c("Op_en5674", "", "", ""),
+
return(out)
Direction = "wide",
+
}
Result = c("exposure", "erf", "population", "background")
 
 
)
 
)
  
 +
objects.store(health_impact)
  
formula.Op_en5675 <- function(x) {
+
cat("Ovariable health_impact saved.\n")
exposure  <- make.ovariable(fetch(x[1, "Result"]))
 
erf        <- make.ovariable(fetch(x[2, "Result"]))
 
population <- make.ovariable(fetch(x[3, "Result"]))
 
background <- make.ovariable(fetch(x[4, "Result"]))
 
cases      <- population * background * exp(exposure * log(erf))
 
return(cases)
 
}
 
  
 
</rcode>
 
</rcode>
Line 85: Line 75:
  
 
==Related files==
 
==Related files==
 
{{mfiles}}
 

Latest revision as of 15:48, 24 March 2015



Question

What is the health impact in the Training assessment?

Answer

+ Show code

Rationale

Data

Difference between revisions of "Training health impact"(cases /(µg/m3) /a)
ObsTraitResultDescription
1Respiratory disease20 - 30

Dependencies

Calculations

+ Show code

See also

Materials and examples for training in Opasnet and open assessment
Help pages Wiki editingHow to edit wikipagesQuick reference for wiki editingDrawing graphsOpasnet policiesWatching pagesWriting formulaeWord to WikiWiki editing Advanced skills
Training assessment (examples of different objects) Training assessmentTraining exposureTraining health impactTraining costsClimate change policies and health in KuopioClimate change policies in Kuopio
Methods and concepts AssessmentVariableMethodQuestionAnswerRationaleAttributeDecisionResultObject-oriented programming in OpasnetUniversal objectStudyFormulaOpasnetBaseUtilsOpen assessmentPSSP
Terms with changed use ScopeDefinitionResultTool


Keywords

References


Related files