Training assessment: Difference between revisions
(→Calculations: Fixed) |
|||
(28 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Open policy practice]] | |||
[[Category:Decision analysis and risk management]] | |||
[[Category:Urgenche]] | [[Category:Urgenche]] | ||
{{assessment|moderator=Jouni|stub=Yes}} | [[Category:Contains R code]] | ||
{{assessment|moderator=Jouni|stub=Yes|status=Ongoing}} | |||
This is a '''training assessment''' about an imaginary, simple case. The purpose is to illustrate assessment functionalities. | This is a '''training assessment''' about an imaginary, simple case. The purpose is to illustrate assessment functionalities. | ||
Line 27: | Line 30: | ||
** YMAL, | ** YMAL, | ||
** Summer workers of YMAL in 2012, | ** Summer workers of YMAL in 2012, | ||
** Participants of [[Decision analysis and risk management 2013 | ** Participants of [[Decision analysis and risk management 2013]] | ||
==Answer== | ==Answer== | ||
Line 40: | Line 43: | ||
==Rationale== | ==Rationale== | ||
[[image:Training assessment.svg|thumb|500px|The causal diagram for the [[training assessment]].]] | [[image:Training assessment.svg|thumb|center|500px|The causal diagram for the [[training assessment]].]] | ||
===Assessment-specific data=== | ===Assessment-specific data=== | ||
Line 46: | Line 49: | ||
;Decisions | ;Decisions | ||
<t2b name="Decisions" index="Decisionmaker,Decision,Option,Variable,Cell,Change, | <t2b name="Decisions" index="Decisionmaker,Decision,Option,Variable,Cell,Change,Unit" obs="Amount" desc="Description" unit="-"> | ||
Factory| | Factory|Cleaning_policy|BAU|exposure|Year:2020|Multiply|-|1| | ||
Factory|Cleaning_policy|Reduce emissions|exposure|Year:2020|Multiply|-|0.5| | |||
Factory|Cleaning_policy|BAU|costs||Add|€|0| | |||
Factory|Cleaning_policy|Reduce emissions|costs|Year:2020;Expenditure:Cleaning equipment use|Add|€|30000-40000| | |||
City of Kuopio|Health_promotion|BAU|health_impact||Multiply|-|1| | |||
City of Kuopio|Health_promotion|Increase health education|health_impact||Multiply|-|0.9| | |||
City of Kuopio|Health_promotion|BAU|costs||Add|€|0| | |||
City of Kuopio|Health_promotion|Increase health education|costs|Year:2020;Expenditure:Health promotion campaign|Add|€|10000| | |||
</t2b> | </t2b> | ||
; Variables | ; Variables | ||
* exposure: [[Training exposure]] | * exposure: [[Training exposure]] | ||
* | * health_impact: [[Training health impact]] | ||
* | * costs: [[Training costs]] | ||
; Analyses | ; Analyses | ||
Line 82: | Line 72: | ||
===Calculations=== | ===Calculations=== | ||
<rcode | <rcode graphics=1 | ||
variables="name:unitcost|description:What is the unit cost of one case of disease?|type:text|default:100" | |||
> | > | ||
library(OpasnetUtils) | library(OpasnetUtils) | ||
library(ggplot2) | library(ggplot2) | ||
DecisionTableParser(opbase.data("Op_en5677", subset = "Decisions")) # [[Training assessment]] | |||
objects.latest("Op_en5675", code_name = "initiate") # [[Training health impact]] health_impact | |||
objects.latest("Op_en5871", code_name = "initiate") # [[Training costs]] costs | |||
unitcost <- Ovariable("unitcost", data = data.frame(Result = unitcost)) | |||
costs <- CheckDecisions(EvalOutput(costs)) | |||
costs2 <- oapply(unkeep(costs, sources = TRUE), cols ="Expenditure", FUN = sum) | |||
cat("Summary of exposures\n") | |||
oprint(summary(exposure)) | |||
cat("Summary of health impacts\n") | |||
) | |||
oprint(summary(health_impact), digits = 0) | |||
) | |||
cat("Summary of all costs\n") | |||
oprint(summary(costs2), digits = 0) | |||
ggplot(exposure@output, aes(x = exposureResult, colour = Year)) + geom_density() + | |||
theme_gray(base_size = 24) + | |||
facet_grid(Cleaning_policy ~ .) | |||
ggplot(health_impact@output, aes(x = health_impactResult, colour = Year)) + geom_density() + | |||
theme_gray(base_size = 24) + | |||
facet_grid(Cleaning_policy ~ Health_promotion) | |||
ggplot(subset(costs2@output, Year == 2020), aes(x = costsResult, colour = Payer)) + geom_density() + | |||
theme_gray(base_size = 24) + | |||
facet_grid(Cleaning_policy ~ Health_promotion) | |||
ggplot(subset(costs2@output, Year == 2020), aes(x = Payer, weight = costsResult / openv$N, fill = Payer)) + geom_bar() + | |||
theme_gray(base_size = 24) + | |||
facet_grid(Cleaning_policy ~ Health_promotion) | |||
</rcode> | </rcode> | ||
=== Explanations of the code === | |||
<pre> | |||
<rcode graphics=1 | |||
variables="name:unitcost|description:What is the unit cost of one case of disease?|type:text|default:100" | |||
> | |||
</pre> | |||
The tag above starts the R code. It turns on the graphics so that graphs can be drawn. It also asks the user to give a value for the variable ''unitcost''. | |||
library(OpasnetUtils) | |||
library(ggplot2) | |||
In the beginning of a code, packages that are needed are loaded. These are the two most commonly used. OpasnetUtils is for all Opasnet functionalities, ggplot2 is for cool graphs. | |||
DecisionTableParser(opbase.data("Op_en5677", subset = "Decisions")) # <nowiki>[[Training assessment]]</nowiki> | |||
This code defines from where to take the assessment-specific decisions. In this case, they are on the page Training assessment, in a table called ''Decisions''. The page has identifier Op_en5677, which can be found from the metadata box, which is typically in the top right corner of a page. | |||
objects.latest("Op_en5675", code_name = "initiate") # <nowiki>[[Training health impact]]</nowiki> health_impact | |||
objects.latest("Op_en5871", code_name = "initiate") # <nowiki>[[Training costs]]</nowiki> costs | |||
These lines fetch ready-made ovariables that are needed in this assessment. The code defining these ovariables are located on the pages mentioned. Note that # is the comment character and everything after it is ignored in the model; so it is used to put explanations for the reader within the code. | |||
unitcost <- Ovariable("unitcost", data = data.frame(Result = unitcost)) | |||
Unitcost was asked from the user as a value, and now it is converted to an ovariable. | |||
costs <- EvalOutput(costs) | |||
costs2 <- oapply(unkeep(costs, sources = TRUE), cols ="Expenditure", FUN = sum) | |||
Because all ovariables are connected in the model, it is enough to evaluate the last one. The model will automatically evaluate all ovariables that are causally upstream. Also, the decisions that apply to this assessment will change the results of the ovariables as necessary. Ovariable costs2 is used to summarise contents of costs for easier presentation. | |||
cat("Summary of health impacts\n") | |||
Function cat is used to print outputs for the user. | |||
oprint(summary(health_impact), digits = 0) | |||
Function oprint is used to print tables for the user. | |||
cat("Summary of all costs\n") | |||
oprint(summary(costs2), digits = 0) | |||
ggplot(exposure@output, aes(x = exposureResult, colour = Year)) + geom_density() + | |||
theme_gray(base_size = 24) + | |||
facet_grid(Cleaning_policy ~ .) | |||
Function ggplot is very effective in creating all kinds of graphs with just a few lines. It is really worth learning. | |||
ggplot(health_impact@output, aes(x = health_impactResult, colour = Year)) + geom_density() + | |||
theme_gray(base_size = 24) + | |||
facet_grid(Cleaning_policy ~ Health_promotion) | |||
ggplot(subset(costs2@output, Year == 2020), aes(x = costsResult, colour = Payer)) + geom_density() + | |||
theme_gray(base_size = 24) + | |||
facet_grid(Cleaning_policy ~ Health_promotion) | |||
<pre> | |||
</rcode> | |||
</pre> | |||
The code must always end with this tag. | |||
==See also== | ==See also== |
Latest revision as of 20:01, 24 March 2015
Moderator:Jouni (see all) |
This page is a stub. You may improve it into a full page. |
Upload data
|
This is a training assessment about an imaginary, simple case. The purpose is to illustrate assessment functionalities.
Scope
Question
What decisions are worth implementing in the training assessment?
Boundaries
- Time: Year 2012 - 2020
Scenarios
- Factory can reduce emissions, or continue business as usual.
- School can increase health education, decrease it to save money, or continue business as usual.
Intended users
- Anyone who wants to learn to make open assessments.
Participants
- Main participants:
- YMAL,
- Summer workers of YMAL in 2012,
- Participants of Decision analysis and risk management 2013
Answer
Conclusions
Results
Not yet available.
Rationale
Assessment-specific data
- Decisions
Obs | Decisionmaker | Decision | Option | Variable | Cell | Change | Unit | Amount | Description |
---|---|---|---|---|---|---|---|---|---|
1 | Factory | Cleaning_policy | BAU | exposure | Year:2020 | Multiply | - | 1 | |
2 | Factory | Cleaning_policy | Reduce emissions | exposure | Year:2020 | Multiply | - | 0.5 | |
3 | Factory | Cleaning_policy | BAU | costs | Add | € | 0 | ||
4 | Factory | Cleaning_policy | Reduce emissions | costs | Year:2020;Expenditure:Cleaning equipment use | Add | € | 30000-40000 | |
5 | City of Kuopio | Health_promotion | BAU | health_impact | Multiply | - | 1 | ||
6 | City of Kuopio | Health_promotion | Increase health education | health_impact | Multiply | - | 0.9 | ||
7 | City of Kuopio | Health_promotion | BAU | costs | Add | € | 0 | ||
8 | City of Kuopio | Health_promotion | Increase health education | costs | Year:2020;Expenditure:Health promotion campaign | Add | € | 10000 |
- Variables
- exposure: Training exposure
- health_impact: Training health impact
- costs: Training costs
- Analyses
- Decision analysis on each policy: Which option minimises the health risks?
- Value of information (VOI) analysis for each policy about the major variables in the model and the total VOI.
Calculations
Explanations of the code
<rcode graphics=1 variables="name:unitcost|description:What is the unit cost of one case of disease?|type:text|default:100" >
The tag above starts the R code. It turns on the graphics so that graphs can be drawn. It also asks the user to give a value for the variable unitcost.
library(OpasnetUtils) library(ggplot2)
In the beginning of a code, packages that are needed are loaded. These are the two most commonly used. OpasnetUtils is for all Opasnet functionalities, ggplot2 is for cool graphs.
DecisionTableParser(opbase.data("Op_en5677", subset = "Decisions")) # [[Training assessment]]
This code defines from where to take the assessment-specific decisions. In this case, they are on the page Training assessment, in a table called Decisions. The page has identifier Op_en5677, which can be found from the metadata box, which is typically in the top right corner of a page.
objects.latest("Op_en5675", code_name = "initiate") # [[Training health impact]] health_impact objects.latest("Op_en5871", code_name = "initiate") # [[Training costs]] costs
These lines fetch ready-made ovariables that are needed in this assessment. The code defining these ovariables are located on the pages mentioned. Note that # is the comment character and everything after it is ignored in the model; so it is used to put explanations for the reader within the code.
unitcost <- Ovariable("unitcost", data = data.frame(Result = unitcost))
Unitcost was asked from the user as a value, and now it is converted to an ovariable.
costs <- EvalOutput(costs) costs2 <- oapply(unkeep(costs, sources = TRUE), cols ="Expenditure", FUN = sum)
Because all ovariables are connected in the model, it is enough to evaluate the last one. The model will automatically evaluate all ovariables that are causally upstream. Also, the decisions that apply to this assessment will change the results of the ovariables as necessary. Ovariable costs2 is used to summarise contents of costs for easier presentation.
cat("Summary of health impacts\n")
Function cat is used to print outputs for the user.
oprint(summary(health_impact), digits = 0)
Function oprint is used to print tables for the user.
cat("Summary of all costs\n") oprint(summary(costs2), digits = 0)
ggplot(exposure@output, aes(x = exposureResult, colour = Year)) + geom_density() + theme_gray(base_size = 24) + facet_grid(Cleaning_policy ~ .)
Function ggplot is very effective in creating all kinds of graphs with just a few lines. It is really worth learning.
ggplot(health_impact@output, aes(x = health_impactResult, colour = Year)) + geom_density() + theme_gray(base_size = 24) + facet_grid(Cleaning_policy ~ Health_promotion) ggplot(subset(costs2@output, Year == 2020), aes(x = costsResult, colour = Payer)) + geom_density() + theme_gray(base_size = 24) + facet_grid(Cleaning_policy ~ Health_promotion)
</rcode>
The code must always end with this tag.
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 |
- Descriptions of a previous structure
- ----#: . Päätöksenteon sokea piste: se mitä ihmiset eivät näe mutta eivät myöskään huomaa etteivät näe. Kuitenkin tutkimalla sitä mitä mitä ihmiset eivät näe saadaan selville asioita sokeasta pisteesta. Ymmärtämällä sokeaa pistettä voidaan keksiä asioita jotka järjestelmällisesti jäävät huomaamatta ja asioita, joilla voidaan korjata järjestelmällisiä puutteita. Avoin arviointi on tämmöinen päätöksenteon järjestelmällisten puutteiden korjausmekanismi. --Jouni 08:55, 1 May 2012 (EEST) (type: truth; paradigms: science: comment)
References
Related files
<mfanonymousfilelist></mfanonymousfilelist>