Difference between revisions of "Training health impact"

From Testiwiki
Jump to: navigation, search
(Formula)
(Explanations: the whole section is outdated and removed)
 
(10 intermediate revisions by 2 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 graphics=1>
 +
 +
library(OpasnetUtils)
 +
library(ggplot2)
 +
 +
objects.latest("Op_en5675", code_name = "initiate") # [[Training health impact]]
 +
 +
health_impact <- EvalOutput(health_impact)
 +
 +
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>
  
 
==Rationale==
 
==Rationale==
Line 14: 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===
  
<rcode
+
* [[Training exposure]]
label="Initiate functions"
+
 
>
+
===Calculations===
library(OpasnetUtils)
 
library(xtable)
 
  
dependencies <- data.frame(
+
<rcode label="Initiate ovariable" name="initiate">
Name = c("exposure"),
 
Key = c("muRtYjhkphoNPQJI")
 
)
 
  
formula <- function(dependencies, ...) {
+
library(OpasnetUtils)
ComputeDependencies(dependencies, ...)
 
erf <- 1.5 # RR per ug / m3
 
  
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
population <- 50000
+
formula = function(...) {
+
ERF <- Ovariable("ERF", ddata = "Op_en5675") # [[Training health impact]]
cases      <- exposure * population * background * (erf - 1)
+
colnames(ERF@data) <- gsub("[ \\.]", "_", colnames(ERF@data))
return(cases)
 
}
 
  
data <- tidy(op_baseGetData("opasnet_base", "Op_en5675"), "health.impact")
+
out <- exposure * ERF
  
health.impact <- new("ovariable",
+
return(out)
name        = "health.impact",
+
}
formula      = formula,
 
dependencies = dependencies,
 
data        = data
 
 
)
 
)
  
out <- EvalOutput(health.impact, N = 10)
+
objects.store(health_impact)
  
print(xtable(out@output), type = "html")
+
cat("Ovariable health_impact saved.\n")
  
objects.put(health.impact)
 
 
</rcode>
 
</rcode>
  
Line 71: 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