Training assessment: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(→‎Calculations: new things seem to work but a lot of debugging needed)
(→‎Calculations: bugs corrected)
Line 158: Line 158:
#endp <- function(dectable)
#endp <- function(dectable)
endpoints <- tidy(opbase.data("Op_en5677.endpoints"))
endpoints <- tidy(opbase.data("Op_en5677.endpoints"))
endpoints
out <- health.impact@output


# Conditions: Constructing a list of logical vectors which correspond to those rows of our new data.frame that we want to apply  
# Conditions: Constructing a list of logical vectors which correspond to those rows of our new data.frame that we want to apply  
Line 175: Line 173:


dectable <- endpoints[endpoints$Stakeholder == i, ]
dectable <- endpoints[endpoints$Stakeholder == i, ]
#print(dectable)


endpoint[[i]] <- new("ovariable", name = "endpoint", output = data.frame(Result = 0))
endpoint[[i]] <- new("ovariable", name = "endpoint", output = data.frame(Result = 0))
Line 193: Line 189:
tempovar <- get(as.character(dectable[j, "Variable"]))
tempovar <- get(as.character(dectable[j, "Variable"]))
temp <- tempovar@output
temp <- tempovar@output[tempovar@output$health.impactSource == "Formula", ]


for (k in 1:length(sel1)) { # For each condition separated by ";"
for (k in 1:length(sel1)) { # For each condition separated by ";"
Line 203: Line 199:


cat(j, k, "\n")
cat(j, k, "\n")
#print(head(temp))
 


}  
}  
}
}
#print(head(temp))
 
# Make an ovariable out of the rows matching the condition.
# Make an ovariable out of the rows matching the condition.
tempovar@output <- temp
tempovar@output <- temp
#print(head(tempovar@output))
 
# Multiply by the weight and add to previous stakeholder endpoint.
# Multiply by the weight and add to previous stakeholder endpoint.
#print(as.numeric(as.character(dectable[j, "Result"])))
 
tempovar <- tempovar * as.numeric(as.character(dectable[j, "Result"]))
tempovar <- tempovar * as.numeric(as.character(dectable[j, "Result"]))
cat("Tempovar\n")
 
tempovar@output <- tempovar@output[ , !colnames(tempovar@output) %in% removals]
#print(xtable(tempovar@output[
print(head(tempovar@output))
# tempovar@output$Iter == 1 &
cat("endpoint[[i]]\n")
# tempovar@output$Health.promotion == "Increase health education" &
print(head(endpoint[[i]]@output))
# tempovar@output$Cleaning.policy == "BAU", ]), type = 'html')
 
# Remove columns that are not needed but may confuse merge.
tempovar@output <- tempovar@output[ , !colnames(tempovar@output) %in% removals]
 
#cat("Tempovar\n")
#print(head(tempovar@output))
#print(nrow(tempovar@output))
 
endpoint[[i]] <- endpoint[[i]] + tempovar
endpoint[[i]] <- endpoint[[i]] + tempovar
cat("Endpoint updated\n")
 
print(head(endpoint[[i]]@output))
#cat("Endpoint updated\n")
#print(head(endpoint[[i]]@output))
#print(nrow(endpoint[[i]]@output))


}}
}}
endpoint
endpoint


ggplot(endpoint[[1]]@output, aes(x = Health.promotion, y = Result, colour = Cleaning.policy)) +  
ggplot(endpoint[[1]]@output, aes(x = Cleaning.policy, y = Result, colour = Health.promotion)) +  
geom_boxplot() +  
geom_boxplot() +  
theme_grey(base_size = 24)
theme_grey(base_size = 24) +
labs( # label names
title = names(endpoint)[1],
y = "Euro",
x = "Cleaning policy decision"
)


ggplot(endpoint[[2]]@output, aes(x = Health.promotion, y = Result, colour = Cleaning.policy)) +  
ggplot(endpoint[[2]]@output, aes(x = Health.promotion, y = Result, colour = Cleaning.policy)) +  
geom_boxplot() +  
geom_boxplot() +  
theme_grey(base_size = 24)
theme_grey(base_size = 24) +
 
labs( # label names
 
title = names(endpoint)[2],  
#Pseudocode for the rest:
y = "Euro",
# Take each Stakeholder, one at a time.
x = "Health promotion decision"
# Take each row of Endpoints table that belongs to that stakeholder.
)
# Make an ovariable of the data.frame that is on the jth row, renaming the Result column as jvariableResult so that it can be used in computing.
# Multiply each ovariable with Result on row j.
# Sum each ovariable that belongs to that Stakeholder.
# Give outputs as a list that has one ovariable for each Stakeholder.


</rcode>
</rcode>

Revision as of 05:10, 2 January 2013



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

The causal diagram for the training assessment.

Assessment-specific data

Decisions
Decisions(-)
ObsDecisionmakerDecisionOptionVariableCellChangeUnitAmountDescription
1FactoryCleaning.policyReduce emissionsexposureYear:2020Multiply-0.5
2SchoolHealth.promotionIncrease health educationhealth.impactYear:2020Multiply-0.9
3SchoolHealth.promotionPromotion budget reducedhealth.impactYear:2020Multiply-1.1
Probabilities
Probabilities(P)
ObsStakeholderVariableCellProbabilityDescription
1City of KuopioexposureCleaning.policy: Reduce emissions0.8
2City of KuopioexposureCleaning.policy: BAU0.2
3Factoyhealth.impactHealth.promotion: Increase health education0.1
4Factoyhealth.impactHealth.promotion: Promotion budget reduced0.4
5Factoyhealth.impactHealth.promotion: BAU0.5
Endpoints
Endpoints(-)
ObsStakeholderVariableCellModelResultDescription
1City of Kuopiohealth.impactYear:2012Weighted sum1000
2City of Kuopiohealth.impactYear:2020Weighted sum1000
3Citizenshealth.impactYear:2012Weighted sum1000
4Citizenshealth.impactYear:2020Weighted sum2000Future years are twice as important.
Variables
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

+ 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


  • 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>