Training costs: Difference between revisions

From Opasnet
Jump to navigation Jump to search
(first draft)
 
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{variable|moderator=Jouni}}
{{variable|moderator=Jouni}}
[[Category:Code under inspection]]
'''Training costs''' are an example of a cost variable in an assessment.
'''Training costs''' are an example of a cost variable in an assessment.


Line 8: Line 9:
==Answer==
==Answer==


<t2b index="Payer,Decision,Option,Year,Observation" locations="Result,Description" unit="€">
<rcode graphics=1>
Factory|Cleaning.policy|Reduce emissions|2020|20000|
 
Factory|Cleaning.policy|BAU|2020|0|
library(OpasnetUtils)
School|Health.promotion|Increase health education|2020|10000|
library(ggplot2)
School|Health.promotion|Promotion budget reduced|2020|-5000|
 
School|Health.promotion|BAU|2020|0|
objects.latest("Op_en5871", code_name = "initiate") # [[Training assessment]] costs
 
costs <- EvalOutput(costs)
 
ggplot(costs@output, aes(x = Year, weight = costsResult, fill = Expenditure)) +
geom_bar(position = "dodge") +
theme_grey(base_size = 24)
 
</rcode>
 
==Rationale==
 
=== Data ===
 
<t2b index="Payer,Expenditure,Year" obs="Result" desc="Description" unit="€">
Factory|Cleaning equipment use|2012|20000-22000|  
Factory|Cleaning equipment use|2020|22000-24000|
Society|Health promotion campaign|2012|10000|
Society|Health promotion campaign|2020|10000|
</t2b>
</t2b>


==Rationale==
=== Calculations ===
 
<rcode label="Initiate variable" name="initiate" embed=1>
 
library(OpasnetUtils)
 
costs <- Ovariable("costs",
dependencies = data.frame(
Name = c("health_impact", "unitcost"),
Ident = c("Op_en5675/initiate", NA)
),
formula = function(...) {
 
fixedcosts <- Ovariable("fixedcosts", ddata = "Op_en5871") # [[Training costs]]
 
socialcosts <-  unitcost * health_impact * Ovariable(output = data.frame(
Payer = c("Society", "Factory"),
Result = c(1, 0)
), marginal = c(TRUE, FALSE))
 
totcosts <- fixedcosts + socialcosts
 
return(totcosts)
}
)
 
objects.store(costs)
 
cat("Ovariable costs saved.\n")
 
</rcode>


==See also==
==See also==
Line 27: Line 76:


==Related files==
==Related files==
{{mfiles}}

Latest revision as of 19:18, 24 March 2015

Training costs are an example of a cost variable in an assessment.

Question

What are the costs in the training assessment?

Answer

+ Show code

Rationale

Data

Training costs: Difference between revisions(€)
ObsPayerExpenditureYearResultDescription
1FactoryCleaning equipment use201220000-22000
2FactoryCleaning equipment use202022000-24000
3SocietyHealth promotion campaign201210000
4SocietyHealth promotion campaign202010000

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


References


Related files