Difference between revisions of "Training health impact"
From Testiwiki
(created pages for training) |
(update does not work here, otherwise promising) |
||
Line 1: | Line 1: | ||
− | + | [[Category:Costs and valuations]] | |
− | + | [[Category:Opasnet training]] | |
− | + | {{variable|moderator=Jouni|stub=Yes}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | {{variable|moderator=|stub=Yes}} | ||
== Question == | == Question == | ||
+ | What is the health impact in the [[Training assessment]]? | ||
== Answer == | == Answer == | ||
+ | |||
+ | There is no data; the answer is based on modelling only. | ||
+ | |||
+ | <rcode | ||
+ | name="answer" | ||
+ | label="Run code" | ||
+ | include=" | ||
+ | page:Object-oriented_programming_in_Opasnet|name:answer| | ||
+ | page:OpasnetBaseUtils|name:generic| | ||
+ | page:Training_health_impact|name:formula | ||
+ | " | ||
+ | > | ||
+ | |||
+ | cat("Initiation successful. Now starting the model.\n") | ||
+ | |||
+ | library(xtable) | ||
+ | out <- make.ovariable( | ||
+ | data = NULL, | ||
+ | formula = formula.Op_en5675, | ||
+ | dependencies = dependencies.Op_en5675) | ||
+ | cat("Computing training exposures.\n") | ||
+ | print(out) | ||
+ | |||
+ | </rcode> | ||
== Rationale == | == Rationale == | ||
+ | === Formula === | ||
+ | |||
+ | <rcode | ||
+ | name="formula" | ||
+ | label="Initiate functions" | ||
+ | include=" | ||
+ | page:Object-oriented_programming_in_Opasnet|name:answer| | ||
+ | page:OpasnetBaseUtils|name:generic| | ||
+ | page:Training_exposure|name:formula | ||
+ | " | ||
+ | variables="name:population|description:What is the size of the population|default:100000" | ||
+ | > | ||
+ | |||
+ | dependencies.Op_en5675 <- list( | ||
+ | exposure = formula.Op_en5674(dependencies.Op_en5674), # Training exposure | ||
+ | erf = data.frame(Unit = "RR per ug/m3", Result = 1.5), | ||
+ | population = population, | ||
+ | background = 100 / 100000 # cases per 100000 person-years | ||
+ | ) | ||
+ | |||
+ | formula.Op_en5675 <- function(x) { | ||
+ | cases <- x@population * x@background * exp(x@exposure * ln(x@erf)) | ||
+ | return(cases) | ||
+ | } | ||
+ | |||
+ | cat("Initiation successful. Now starting the model.\n") | ||
+ | |||
+ | library(xtable) | ||
+ | out <- make.ovariable( | ||
+ | data = "0 - 100000", | ||
+ | formula = formula.Op_en5675, | ||
+ | dependencies = dependencies.Op_en5675) | ||
+ | cat("Computing training health impact.\n") | ||
+ | print(out) | ||
+ | |||
+ | ########### update updates the sample of an ovariable based on data and function. | ||
+ | setMethod( | ||
+ | f = "update", | ||
+ | signature = "ovariable", | ||
+ | definition = function(object) { | ||
+ | dat <- data.frame(Source = "Data", interpret(object@data)) | ||
+ | dep <- object@dependencies | ||
+ | for(i in 1:length(dep)) { | ||
+ | if(class(dep[[i]]) == "ovariable") { | ||
+ | dep[[i]] <- dep[[i]]@sample | ||
+ | } else { | ||
+ | if(length(grep("Op_(en|fi)", dep[[i]])) > 0) { | ||
+ | dep[[i]] <- op_baseGetData("opasnet_base", dep[[i]])} | ||
+ | else { | ||
+ | if(class(dep[[i]]) != "data.frame" & !is.numeric(dep[[i]])) { | ||
+ | print(dep[[i]]) | ||
+ | print(class(dep[[i]])) | ||
+ | dep[[i]] <- get(dep[[i]]) | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | form <- data.frame(Source = "Formula", make.ovariable(object@formula(dep))@sample) | ||
+ | object@sample <- orbind(dat, form)@sample | ||
+ | return(object) | ||
+ | } | ||
+ | ) | ||
− | + | out <- update(out) | |
+ | print(out) | ||
− | + | </rcode> | |
==See also== | ==See also== | ||
+ | |||
+ | {{Opasnet training}} | ||
==Keywords== | ==Keywords== | ||
Line 56: | Line 118: | ||
{{mfiles}} | {{mfiles}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 20:54, 14 May 2012
This page is a variable.
The page identifier is Op_en5675 |
---|
Moderator:Jouni (see all) |
This page is a stub. You may improve it into a full page, and then a rating bar will appear here. |
Upload data
|
Contents
Question
What is the health impact in the Training assessment?
Answer
There is no data; the answer is based on modelling only.
Rationale
Formula
See also
Help pages | Wiki editing • How to edit wikipages • Quick reference for wiki editing • Drawing graphs • Opasnet policies • Watching pages • Writing formulae • Word to Wiki • Wiki editing Advanced skills |
Training assessment (examples of different objects) | Training assessment • Training exposure • Training health impact • Training costs • Climate change policies and health in Kuopio • Climate change policies in Kuopio |
Methods and concepts | Assessment • Variable • Method • Question • Answer • Rationale • Attribute • Decision • Result • Object-oriented programming in Opasnet • Universal object • Study • Formula • OpasnetBaseUtils • Open assessment • PSSP |
Terms with changed use | Scope • Definition • Result • Tool |
Keywords
References
Related files
<mfanonymousfilelist></mfanonymousfilelist>